0 Replies Latest reply on Jun 18, 2013 12:12 PM by 7a29f8b3-3807-405e-a45b-6641801b8626

    hi I have started including coherence into my application. I am able to proceed reasonably well. But I am not able to map the serialization classes to the pof-config. can anybody help?

    7a29f8b3-3807-405e-a45b-6641801b8626

      This is the error I am getting. I don't have any java classes for serialization. I have my C++ classes. do I need java classes because the error is java.lang.ClassNotFoundException.

       

      2013-06-17 09:28:22.498/4.626 Oracle Coherence GE 3.7.1.0 <D5> (thread=Invocation:Management, member=1): Service Management joined the cluster with senior service member 1

      2013-06-17 09:28:22.779/4.907 Oracle Coherence GE 3.7.1.0 <Info> (thread=DistributedCache, member=1): Loaded POF configuration from "file:/privdir/xprk004/upapps/mdd/src/mdd_wayside_access/AEI/config/cluster/pof-config.xml"; this document does not refer to any schema definition and has not been validated.

      2013-06-17 09:28:22.808/4.936 Oracle Coherence GE 3.7.1.0 <Info> (thread=DistributedCache, member=1): Loaded included POF configuration from "jar:file:/privdir/xprk004/upapps/mdd/narendra/coherence/lib/coherence.jar!/coherence-pof-config.xml"

      2013-06-17 09:28:22.811/4.939 Oracle Coherence GE 3.7.1.0 <D4> (thread=DistributedCache, member=1): PartitionedCache caught an unhandled exception (com.tangosol.util.WrapperException: (Wrapped: error creating class "com.tangosol.io.pof.ConfigurablePofContext") (Wrapped: Unable to load class for user type (Config=pof-config.xml, Type-Id=1001, Class-Name=Key)) (Wrapped) Key) while exiting.

      2013-06-17 09:28:22.813/4.941 Oracle Coherence GE 3.7.1.0 <Error> (thread=DistributedCache, member=1): ClusterService.doServiceLeft: Unknown Service PartitionedCache{Name=DistributedCache, State=(SERVICE_STOPPED), Not initialized}

      2013-06-17 09:28:22.813/4.941 Oracle Coherence GE 3.7.1.0 <D5> (thread=DistributedCache, member=1): Service DistributedCache left the cluster

      2013-06-17 09:28:22.817/4.945 Oracle Coherence GE 3.7.1.0 <Error> (thread=main, member=1): Error while starting service "DistributedCache": (Wrapped) (Wrapped: error creating class "com.tangosol.io.pof.ConfigurablePofContext") (Wrapped: Unable to load class for user type (Config=pof-config.xml, Type-Id=1001, Class-Name=Key)) (Wrapped) java.lang.ClassNotFoundException: Key

              at com.tangosol.coherence.component.util.Daemon.start(Daemon.CDB:52)

       

       

      here is the pof-config.xml

      <?xml version="1.0"?>

      <!DOCTYPE pof-config SYSTEM "pof-config.dtd">

      <pof-config>

        <user-type-list>

       

       

          <!-- coherence POF user types -->

          <include>coherence-pof-config.xml</include>

       

       

          <!-- com.tangosol.examples package -->

          <user-type>

            <type-id>1001</type-id>

            <class-name>Key</class-name>

          </user-type>

          <user-type>

            <type-id>1002</type-id>

            <class-name>Value</class-name>

          </user-type>

       

       

        </user-type-list>

       

       

        <allow-interfaces>true</allow-interfaces>

        <allow-subclasses>true</allow-subclasses>

      </pof-config>

       

      this is the server-config

       

      <?xml version="1.0"?>

      <!DOCTYPE cache-config SYSTEM "cache-config.dtd">

      <cache-config>

         <defaults>

           <serializer>pof</serializer>

         </defaults>

         <caching-scheme-mapping>

            <cache-mapping>

               <cache-name>dist-extend</cache-name>

               <scheme-name>extend</scheme-name>

            </cache-mapping>

         </caching-scheme-mapping>

       

       

         <caching-schemes>

            <distributed-scheme>

               <scheme-name>extend</scheme-name>

               <lease-granularity>member</lease-granularity>

               <backing-map-scheme>

                  <local-scheme/>

               </backing-map-scheme>

               <autostart>true</autostart>

            </distributed-scheme>

       

       

            <proxy-scheme>

               <service-name>ExtendTcpProxyService</service-name>

               <thread-count>5</thread-count>

               <acceptor-config>

                  <tcp-acceptor>

                     <local-address>

                        <address>localhost</address>

                        <port>5678</port>

                     </local-address>

                  </tcp-acceptor>

               </acceptor-config>

               <autostart>true</autostart>

            </proxy-scheme>

         </caching-schemes>

      </cache-config>

       

      this is the overwritten coherence config on server side

       

      <?xml version='1.0'?>

       

       

      <!DOCTYPE coherence SYSTEM "coherence.dtd">

       

       

      <coherence>

      <cluster-config>

        <member-identity>

         <cluster-name system-property="tangosol.coherence.cluster">naren-cluster</cluster-name>

        </member-identity>

      </cluster-config>

      </coherence>

       

       

      this is the client config

       

      <?xml version="1.0"?>

      <!DOCTYPE cache-config SYSTEM "cache-config.dtd">

       

       

      <cache-config>

        <defaults>

          <serializer>pof</serializer>

        </defaults>

        <caching-scheme-mapping>

          <cache-mapping>

            <cache-name>dist-extend</cache-name>

            <scheme-name>remote</scheme-name>

          </cache-mapping>

        </caching-scheme-mapping>

       

       

        <caching-schemes>

          <remote-cache-scheme>

            <scheme-name>remote</scheme-name>

            <service-name>ExtendTcpCacheService</service-name>

            <initiator-config>

              <tcp-initiator>

                <remote-addresses>

                  <socket-address>

                    <address>localhost</address>

                    <port>5678</port>

                  </socket-address>

                </remote-addresses>

                <connect-timeout>10s</connect-timeout>

              </tcp-initiator>

              <outgoing-message-handler>

                <request-timeout>5s</request-timeout>

              </outgoing-message-handler>

            </initiator-config>

          </remote-cache-scheme>

       

       

          <remote-invocation-scheme>

            <scheme-name>extend-invocation</scheme-name>

            <service-name>ExtendTcpInvocationService</service-name>

            <initiator-config>

              <tcp-initiator>

                <remote-addresses>

                  <socket-address>

                    <address>localhost</address>

                    <port>5678</port>

                  </socket-address>

                </remote-addresses>

                <connect-timeout>10s</connect-timeout>

              </tcp-initiator>

              <outgoing-message-handler>

                <request-timeout>5s</request-timeout>

              </outgoing-message-handler>

            </initiator-config>

          </remote-invocation-scheme>

        </caching-schemes>

      </cache-config>

       

       

      this is the overwritten coherence-config on client side

       

      <?xml version='1.0'?>

       

       

      <!DOCTYPE coherence SYSTEM "coherence.dtd">

      <coherence>

        <configurable-cache-factory-config>

          <init-params>

            <init-param>

              <param-type>String</param-type>

              <param-value system-property="tangosol.coherence.cacheconfig">aei-client-config.xml</param-value>

            </init-param>

          </init-params>

        </configurable-cache-factory-config>

      </coherence>

       

      is the param-type in the above should be String or java.lang.String?

       

      Thanks in advance.

       

      solved: By giving a serializer class for Key in Java solves the problem. I did not found a way without using java though.