10 Replies Latest reply: Jun 18, 2012 8:42 AM by 878913 RSS

    Error while starting coherence server

    878913
      Hi I am working with the coherence in that i am using pof concept to build portable objects , i configured the cache , coherence server i was imported the cache , pof config paths into the these two servers when i am trying to start the coherence server its showing following error like pof config file not loaded ....is there any problem with my cache-config file....can u pls tell me how to approach to this task..


      Exception in thread "main" (Wrapped) (Wrapped: error configuring class "com.tangosol.io.pof.ConfigurablePofContext") java.lang.IllegalStateException: Duplicate included POF configuration (Config=Manager-pof-config.xml)
           at com.tangosol.coherence.component.util.Daemon.start(Daemon.CDB:52)
           at com.tangosol.coherence.component.util.daemon.queueProcessor.Service.start(Service.CDB:7)
           at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.start(Grid.CDB:6)
           at com.tangosol.coherence.component.util.SafeService.startService(SafeService.CDB:28)
           at com.tangosol.coherence.component.util.safeService.SafeCacheService.startService(SafeCacheService.CDB:5)
           at com.tangosol.coherence.component.util.SafeService.ensureRunningService(SafeService.CDB:27)
           at com.tangosol.coherence.component.util.SafeService.start(SafeService.CDB:14)
           at com.tangosol.net.DefaultConfigurableCacheFactory.ensureServiceInternal(DefaultConfigurableCacheFactory.java:1057)
           at com.tangosol.net.DefaultConfigurableCacheFactory.ensureService(DefaultConfigurableCacheFactory.java:892)
           at com.tangosol.net.DefaultConfigurableCacheFactory.ensureCache(DefaultConfigurableCacheFactory.java:874)
           at com.tangosol.net.DefaultConfigurableCacheFactory.configureCache(DefaultConfigurableCacheFactory.java:1231)
           at com.tangosol.net.DefaultConfigurableCacheFactory.ensureCache(DefaultConfigurableCacheFactory.java:290)
           at com.tangosol.net.CacheFactory.getCache(CacheFactory.java:735)
           at com.tangosol.net.CacheFactory.getCache(CacheFactory.java:712)
           at com.Manager.Main.main(Main.java:19)
      Caused by: (Wrapped: error configuring class "com.tangosol.io.pof.ConfigurablePofContext") java.lang.IllegalStateException: Duplicate included POF configuration (Config=Manager-pof-config.xml)
           at com.tangosol.coherence.component.util.daemon.queueProcessor.Service.instantiateSerializer(Service.CDB:17)
           at com.tangosol.coherence.component.util.daemon.queueProcessor.Service.ensureSerializer(Service.CDB:31)
           at com.tangosol.coherence.component.util.daemon.queueProcessor.Service.ensureSerializer(Service.CDB:4)
           at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onEnter(Grid.CDB:26)
           at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.PartitionedService.onEnter(PartitionedService.CDB:19)
           at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:14)
           at java.lang.Thread.run(Unknown Source)
      Caused by: java.lang.IllegalStateException: Duplicate included POF configuration (Config=Manager-pof-config.xml)
           at com.tangosol.io.pof.ConfigurablePofContext.report(ConfigurablePofContext.java:1260)
           at com.tangosol.io.pof.ConfigurablePofContext.createPofConfig(ConfigurablePofContext.java:848)
           at com.tangosol.io.pof.ConfigurablePofContext.initialize(ConfigurablePofContext.java:775)
           at com.tangosol.io.pof.ConfigurablePofContext.setContextClassLoader(ConfigurablePofContext.java:319)
           at com.tangosol.coherence.component.util.daemon.queueProcessor.Service.instantiateSerializer(Service.CDB:13)
           ... 6 more
      2012-06-15 15:03:38.953/2.043 Oracle Coherence GE 3.6.0.4 <Error> (thread=main, member=29): Error while starting service "DistributedCacheService": (Wrapped) (Wrapped: error configuring class "com.tangosol.io.pof.ConfigurablePofContext") java.lang.IllegalStateException: Duplicate included POF configuration (Config=Manager-pof-config.xml)
           at com.tangosol.coherence.component.util.Daemon.start(Daemon.CDB:52)
           at com.tangosol.coherence.component.util.daemon.queueProcessor.Service.start(Service.CDB:7)
           at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.start(Grid.CDB:6)
           at com.tangosol.coherence.component.util.SafeService.startService(SafeService.CDB:28)
           at com.tangosol.coherence.component.util.safeService.SafeCacheService.startService(SafeCacheService.CDB:5)
           at com.tangosol.coherence.component.util.SafeService.ensureRunningService(SafeService.CDB:27)
           at com.tangosol.coherence.component.util.SafeService.start(SafeService.CDB:14)
           at com.tangosol.net.DefaultConfigurableCacheFactory.ensureServiceInternal(DefaultConfigurableCacheFactory.java:1057)
           at com.tangosol.net.DefaultConfigurableCacheFactory.ensureService(DefaultConfigurableCacheFactory.java:892)
           at com.tangosol.net.DefaultConfigurableCacheFactory.ensureCache(DefaultConfigurableCacheFactory.java:874)
           at com.tangosol.net.DefaultConfigurableCacheFactory.configureCache(DefaultConfigurableCacheFactory.java:1231)
           at com.tangosol.net.DefaultConfigurableCacheFactory.ensureCache(DefaultConfigurableCacheFactory.java:290)
           at com.tangosol.net.CacheFactory.getCache(CacheFactory.java:735)
           at com.tangosol.net.CacheFactory.getCache(CacheFactory.java:712)
           at com.Manager.Main.main(Main.java:19)
      Caused by: (Wrapped: error configuring class "com.tangosol.io.pof.ConfigurablePofContext") java.lang.IllegalStateException: Duplicate included POF configuration (Config=Manager-pof-config.xml)
           at com.tangosol.coherence.component.util.daemon.queueProcessor.Service.instantiateSerializer(Service.CDB:17)
           at com.tangosol.coherence.component.util.daemon.queueProcessor.Service.ensureSerializer(Service.CDB:31)
           at com.tangosol.coherence.component.util.daemon.queueProcessor.Service.ensureSerializer(Service.CDB:4)
           at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onEnter(Grid.CDB:26)
           at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.PartitionedService.onEnter(PartitionedService.CDB:19)
           at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:14)
           at java.lang.Thread.run(Unknown Source)
      Caused by: java.lang.IllegalStateException: Duplicate included POF configuration (Config=Manager-pof-config.xml)
           at com.tangosol.io.pof.ConfigurablePofContext.report(ConfigurablePofContext.java:1260)
           at com.tangosol.io.pof.ConfigurablePofContext.createPofConfig(ConfigurablePofContext.java:848)
           at com.tangosol.io.pof.ConfigurablePofContext.initialize(ConfigurablePofContext.java:775)
           at com.tangosol.io.pof.ConfigurablePofContext.setContextClassLoader(ConfigurablePofContext.java:319)
           at com.tangosol.coherence.component.util.daemon.queueProcessor.Service.instantiateSerializer(Service.CDB:13)
           ... 6 more

      my cache-config file look like this...

      <!DOCTYPE cache-config SYSTEM "cache-config.dtd">
      <cache-config>
      <caching-scheme-mapping>
      <cache-mapping>
      <cache-name>hello</cache-name>
      <scheme-name>default-distributed</scheme-name>
      </cache-mapping>
      </caching-scheme-mapping>
      <caching-schemes>
      <distributed-scheme>
      <scheme-name>default-distributed</scheme-name>
      <service-name>DistributedCacheService</service-name>
      <serializer>
      <instance>
      <class-name>com.tangosol.io.pof.ConfigurablePofContext</class-name>
      <init-params>
      <init-param>
      <param-type>String</param-type>
      <param-value system-property="Manager-pof-config.xml">/C:/Users/lakshmana/JPACoherenceWorkspace/Application/appClientModule/Manager-pof-config.xml</param-value>
      </init-param>
      </init-params>
      </instance>
      </serializer>
      <backing-map-scheme>
      <local-scheme/>
      </backing-map-scheme>
      <autostart>true</autostart>
      </distributed-scheme>

      <class-scheme>
      <scheme-name>default-backing-map</scheme-name>

      <class-name>com.tangosol.util.SafeHashMap</class-name>
      </class-scheme>

      </caching-schemes>
      </cache-config>

      Thanks-Advance
        • 1. Re: Error while starting coherence server
          Jonathan.Knight
          Hi,

          Your cache config is not the problem, your POF config is.

          This...
          Exception in thread "main" (Wrapped) (Wrapped: error configuring class "com.tangosol.io.pof.ConfigurablePofContext") java.lang.IllegalStateException: Duplicate included POF configuration (Config=Manager-pof-config.xml)
          Tells you what is wrong. It looks like you are trying to import the same POF config file twice.

          Posting you Cache configuration file is not going to explain the problem you need to post your POF config file - presumably the one called C:/Users/lakshmana/JPACoherenceWorkspace/Application/appClientModule/Manager-pof-config.xml

          In your cache configuration you have this...
          <init-param>
            <param-type>String</param-type>
            <param-value system-property="Manager-pof-config.xml">/C:/Users/lakshmana/JPACoherenceWorkspace/Application/appClientModule/Manager-pof-config.xml</param-value>
          </init-param>
          I don't think this is doing what you think it is. The system-property="Manager-pof-config.xml" part will look for a system property called Manager-pof-config.xml and if that property is set will use the value of that property to override your config file name.

          Hard coding the full path of a file into your cache config is not a good idea as it is very prone to breaking if the code moves to another location.

          JK
          • 2. Re: Error while starting coherence server
            878913
            Hi jon , Thanks for reply ...i have changed the pof-config setting as (<param value>Manager-pof-config.xml</param value> )
            my pof look like this

            <?xml version="1.0"?>
            <!DOCTYPE pof-config SYSTEM "pof-config.dtd">
            <pof-config>

                 <user-type-list>
                 <include>Manager-pof-config.xml</include>
            <user-type>
            <type-id>1000</type-id>
            <class-name>com.Manager.Manager</class-name>

            </user-type>
            </user-type-list>
            </pof-config>

            Thanks
            • 3. Re: Error while starting coherence server
              Jonathan.Knight
              Hi,

              If the name of the file you posted above is Manager-pof-config.xml then it is importing itself which is obviously not a good thing to do. Remove the *<include>Manager-pof-config.xml</include>* line

              JK
              • 4. Re: Error while starting coherence server
                878913
                Hi Jon i removed the include option in the pof-config...

                when i am trying to deploy the main method its showing following error ..........


                2012-06-15 17:38:24.803/87.644 Oracle Coherence GE 3.6.0.4 <Info> (thread=main, member=3): Restarting Service: DistributedCacheService
                2012-06-15 17:38:24.803/87.644 Oracle Coherence GE 3.6.0.4 <D5> (thread=DistributedCache:DistributedCacheService, member=3): Service DistributedCacheService left the cluster
                2012-06-15 17:38:24.809/87.650 Oracle Coherence GE 3.6.0.4 <D5> (thread=DistributedCache:DistributedCacheService, member=3): Service DistributedCacheService joined the cluster with senior service member 3
                2012-06-15 17:38:24.810/87.651 Oracle Coherence GE 3.6.0.4 <Error> (thread=DistributedCache:DistributedCacheService, member=3): Terminating PartitionedCache due to unhandled exception: com.tangosol.util.WrapperException
                2012-06-15 17:38:24.810/87.651 Oracle Coherence GE 3.6.0.4 <Error> (thread=DistributedCache:DistributedCacheService, member=3):
                (Wrapped) java.io.IOException: unknown user type: com.tangosol.run.xml.SimpleElement
                     at com.tangosol.util.Base.ensureRuntimeException(Base.java:293)
                     at com.tangosol.util.Base.ensureRuntimeException(Base.java:269)
                     at com.tangosol.coherence.component.util.daemon.queueProcessor.packetProcessor.PacketPublisher.serializeMessage(PacketPublisher.CDB:34)
                     at com.tangosol.coherence.component.util.daemon.queueProcessor.packetProcessor.PacketPublisher$InQueue.add(PacketPublisher.CDB:8)
                     at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.dispatchMessage(Grid.CDB:62)
                     at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.post(Grid.CDB:53)
                     at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.send(Grid.CDB:1)
                     at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid$ConfigRequest.onReceived(Grid.CDB:83)
                     at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onMessage(Grid.CDB:11)
                     at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onNotify(Grid.CDB:33)
                     at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.PartitionedService.onNotify(PartitionedService.CDB:3)
                     at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache.onNotify(PartitionedCache.CDB:3)
                     at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:42)
                     at java.lang.Thread.run(Unknown Source)
                Caused by: java.io.IOException: unknown user type: com.tangosol.run.xml.SimpleElement
                     at com.tangosol.io.pof.ConfigurablePofContext.serialize(ConfigurablePofContext.java:341)
                     at com.tangosol.coherence.component.util.daemon.queueProcessor.Service.writeObject(Service.CDB:4)
                     at com.tangosol.coherence.component.util.ServiceConfig.writeObject(ServiceConfig.CDB:1)
                     at com.tangosol.coherence.component.util.ServiceConfig$Map.writeObject(ServiceConfig.CDB:1)
                     at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid$ConfigUpdate.write(Grid.CDB:17)
                     at com.tangosol.coherence.component.util.daemon.queueProcessor.packetProcessor.PacketPublisher.serializeMessage(PacketPublisher.CDB:28)
                     ... 11 more
                Caused by: java.lang.IllegalArgumentException: unknown user type: com.tangosol.run.xml.SimpleElement
                     at com.tangosol.io.pof.ConfigurablePofContext.getUserTypeIdentifier(ConfigurablePofContext.java:420)
                     at com.tangosol.io.pof.ConfigurablePofContext.getUserTypeIdentifier(ConfigurablePofContext.java:409)
                     at com.tangosol.io.pof.PofBufferWriter.writeUserType(PofBufferWriter.java:1660)
                     at com.tangosol.io.pof.PofBufferWriter.writeObject(PofBufferWriter.java:1622)
                     at com.tangosol.io.pof.ConfigurablePofContext.serialize(ConfigurablePofContext.java:335)
                     ... 16 more
                2012-06-15 17:38:24.811/87.652 Oracle Coherence GE 3.6.0.4 <D5> (thread=DistributedCache:DistributedCacheService, member=3): Service DistributedCacheService left the cluster
                2012-06-15 17:38:24.811/87.652 Oracle Coherence GE 3.6.0.4 <Error> (thread=main, member=3): Error while starting service "DistributedCacheService": java.lang.RuntimeException: Failed to start Service "DistributedCacheService" (ServiceState=SERVICE_STOPPED)
                     at com.tangosol.coherence.component.util.daemon.queueProcessor.Service.start(Service.CDB:38)
                     at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.start(Grid.CDB:6)
                     at com.tangosol.coherence.component.util.SafeService.startService(SafeService.CDB:28)
                     at com.tangosol.coherence.component.util.safeService.SafeCacheService.startService(SafeCacheService.CDB:5)
                     at com.tangosol.coherence.component.util.SafeService.restartService(SafeService.CDB:25)
                     at com.tangosol.coherence.component.util.SafeService.ensureRunningService(SafeService.CDB:39)
                     at com.tangosol.coherence.component.util.SafeService.getRunningService(SafeService.CDB:1)
                     at com.tangosol.coherence.component.util.SafeService.getInfo(SafeService.CDB:1)
                     at com.tangosol.coherence.component.net.management.Gateway.instantiateServiceModel(Gateway.CDB:6)
                     at com.tangosol.coherence.component.net.management.Gateway.instantiateLocalModel(Gateway.CDB:45)
                     at com.tangosol.coherence.component.net.management.Gateway.register(Gateway.CDB:6)
                     at com.tangosol.coherence.component.util.SafeService.register(SafeService.CDB:14)
                     at com.tangosol.coherence.component.util.SafeService.ensureRunningService(SafeService.CDB:56)
                     at com.tangosol.coherence.component.util.SafeService.start(SafeService.CDB:14)
                     at com.tangosol.net.DefaultConfigurableCacheFactory.ensureServiceInternal(DefaultConfigurableCacheFactory.java:1057)
                     at com.tangosol.net.DefaultConfigurableCacheFactory.ensureService(DefaultConfigurableCacheFactory.java:892)
                     at com.tangosol.net.DefaultCacheServer.startServices(DefaultCacheServer.java:81)
                     at com.tangosol.net.DefaultCacheServer.monitorServices(DefaultCacheServer.java:285)
                     at com.tangosol.net.DefaultCacheServer.startAndMonitor(DefaultCacheServer.java:56)
                     at com.tangosol.net.DefaultCacheServer.main(DefaultCacheServer.java:197)

                2012-06-15 17:38:24.811/87.652 Oracle Coherence GE 3.6.0.4 <Error> (thread=main, member=3): Failed to restart services: java.lang.RuntimeException: Failed to start Service "DistributedCacheService" (ServiceState=SERVICE_STOPPED)
                2012-06-15 17:38:29.811/92.652 Oracle Coherence GE 3.6.0.4 <Info> (thread=main, member=3): Restarting Service: DistributedCacheService
                2012-06-15 17:38:29.816/92.657 Oracle Coherence GE 3.6.0.4 <D5> (thread=DistributedCache:DistributedCacheService, member=3): Service DistributedCacheService joined the cluster with senior service member 3
                2012-06-15 17:38:29.817/92.658 Oracle Coherence GE 3.6.0.4 <Error> (thread=DistributedCache:DistributedCacheService, member=3): Terminating PartitionedCache due to unhandled exception: com.tangosol.util.WrapperException
                2012-06-15 17:38:29.817/92.658 Oracle Coherence GE 3.6.0.4 <Error> (thread=DistributedCache:DistributedCacheService, member=3):
                (Wrapped) java.io.IOException: unknown user type: com.tangosol.run.xml.SimpleElement
                     at com.tangosol.util.Base.ensureRuntimeException(Base.java:293)
                     at com.tangosol.util.Base.ensureRuntimeException(Base.java:269)
                     at com.tangosol.coherence.component.util.daemon.queueProcessor.packetProcessor.PacketPublisher.serializeMessage(PacketPublisher.CDB:34)
                     at com.tangosol.coherence.component.util.daemon.queueProcessor.packetProcessor.PacketPublisher$InQueue.add(PacketPublisher.CDB:8)
                     at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.dispatchMessage(Grid.CDB:62)
                     at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.post(Grid.CDB:53)
                     at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.send(Grid.CDB:1)
                     at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid$ConfigRequest.onReceived(Grid.CDB:83)
                     at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onMessage(Grid.CDB:11)
                     at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onNotify(Grid.CDB:33)
                     at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.PartitionedService.onNotify(PartitionedService.CDB:3)
                     at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache.onNotify(PartitionedCache.CDB:3)
                     at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:42)
                     at java.lang.Thread.run(Unknown Source)
                • 5. Re: Error while starting coherence server
                  Jonathan.Knight
                  Hi,

                  Yes, sorry, I meant to say you need to include the standard POF configuration coherence-pof-config.xml in your custom configuration
                  <?xml version="1.0"?>
                  <!DOCTYPE pof-config SYSTEM "pof-config.dtd">
                  <pof-config>
                  
                    <user-type-list>
                      <include>coherence-pof-config.xml</include>
                      <user-type>
                        <type-id>1000</type-id>
                        <class-name>com.Manager.Manager</class-name>
                      </user-type>
                    </user-type-list> 
                  </pof-config>
                  JK
                  • 6. Re: Error while starting coherence server
                    878913
                    hi jon ... one thing pls confirm me is it the correct process to implement the portable object ...
                    if yes how tio integrate with the other application .... is there any other format file comes into picture when this application deployed........?????

                    Thanks...
                    • 7. Re: Error while starting coherence server
                      Jonathan.Knight
                      Hi,

                      I assume you are asking about how to integrate your application using POF.

                      You have two choices, either implement PortableObject or if you do not want to change the class to be serialized, or in cases where you do not have the source for that class, i.e. it is from a third-party library, you can implement PofSerializer.

                      E.G. Suppose you wanted to POF serialize instances of javax.management.ObjectName - this is from the JRE so you do not have the source so obviously cannot make ObjectName implement PortableObject so you write a serializer.
                      public class ObjectNamePofSerializer implements PofSerializer {
                      
                          @Override
                          public Object deserialize(PofReader pofReader) throws IOException {
                              try {
                                  String domain = pofReader.readString(1);
                                  Hashtable table = new Hashtable(pofReader.readMap(2, new HashMap()));
                                  pofReader.readRemainder();
                                  return new ObjectName(domain, table);
                              } catch (MalformedObjectNameException e) {
                                  throw Base.ensureRuntimeException(e);
                              }
                          }
                      
                          @Override
                          public void serialize(PofWriter pofWriter, Object o) throws IOException {
                              ObjectName objectName = (ObjectName) o;
                              pofWriter.writeString(1, objectName.getDomain());
                              pofWriter.writeMap(2, objectName.getKeyPropertyList());
                              pofWriter.writeRemainder(null);
                          }
                      
                      }
                      Which you would then add to you POF config file.
                      <?xml version="1.0"?>
                      <!DOCTYPE pof-config SYSTEM "pof-config.dtd">
                      <pof-config>
                       
                        <user-type-list>
                          <include>coherence-pof-config.xml</include>
                      
                            <user-type>
                              <type-id>1115</type-id>
                              <class-name>javax.management.ObjectName</class-name>
                              <serializer>
                                <class-name>com.jk.ObjectNamePofSerializer</class-name>
                              </serializer>
                            </user-type>
                        </user-type-list> 
                      
                      </pof-config>
                      If you classes you want to serialize are your own then you can either make the implement PortableObject or write a serializer - the choice is yours. Some people always write external serializer classes for everything, even their own classes. Depending on what version of Coherence you are using there is also the option to use the Coherence Annotation based POF serializer instead of writing your own.

                      JK
                      • 8. Re: Error while starting coherence server
                        878913
                        Thanks jon for your reply... as u said in the post , yes my classes wants to be serialize to make it has a portable object .... after that how we this portable object can be used...?

                        and what is diff between serializer and pof serializer ?

                        Thanks...
                        this is my classes.. Manager.java
                        package com.Manager;

                        import java.io.IOException;

                        import com.tangosol.io.pof.PofReader;
                        import com.tangosol.io.pof.PofWriter;
                        import com.tangosol.io.pof.PortableObject;

                        public class Manager implements PortableObject
                        {
                             private String m_id ;
                        private String m_name ;


                        public Manager()
                        {
                             
                        }

                        public Manager(String m_id,String m_name)
                        {
                             this.m_id=m_id;
                             this.m_name=m_name;
                        }

                        public String getId()
                        {
                             return m_id;
                        }
                        public void setId(String id)
                        {
                             m_id = id;
                        }

                        public String getName()
                        {
                             return m_name;
                        }
                        public void setName(String name)
                        {
                             m_name = name;
                        }
                             @Override
                             public void readExternal(PofReader arg0) throws IOException {
                                  // TODO Auto-generated method stub
                                  m_id = arg0.readString(0);
                        m_name = arg0.readString(1);
                             }
                             @Override
                             public void writeExternal(PofWriter arg0) throws IOException {
                                  arg0.writeString(0, m_id);
                                  arg0.writeString(1, m_name);     
                             }
                        }


                        and Manager2.java
                        package com.Manager;

                        import java.io.IOException;

                        import com.tangosol.io.pof.PofReader;
                        import com.tangosol.io.pof.PofWriter;



                        public class Manager2
                        {
                             public void serialize(PofWriter out, Object o)
                             throws IOException
                             {
                             Manager trade = (Manager) o;
                             out.writeObject(0, trade.getId());
                             out.writeString(1, trade.getName());
                             
                             
                             // mark that writing the object is done
                             out.writeRemainder(null);
                             }
                             
                             
                             public Object deserialize(PofReader in)
                             throws IOException
                             {
                             
                             String ldtPlaced = in.readString(0);
                             String name = in.readString(1);
                             
                             // mark that reading the object is done
                             in.readRemainder();
                             
                             return new Manager(ldtPlaced,name);
                             }
                        }


                        Is it correct process to make it as portable object...........
                        • 9. Re: Error while starting coherence server
                          Jonathan.Knight
                          Hi,

                          Your Manager class is OK, it implements PortableObject so it can be used in a Coherence cluster and declared in the POF configuration file.

                          I do not understand why you have a Manager2 class. It looks like it is supposed to be a PofSerializer for the Manager class but it is not declared as implementing the PofSerializer interface, even though you have implemented the required methods. Also, you do not need a separate PofSerializer for the manager class as the Manager class implements PortableObject.

                          JK
                          • 10. Re: Error while starting coherence server
                            878913
                            Hi jon Manager.java is for implement the portable object , manager2.java is for to serialize and deserialize the object .........

                            Jon my intention is to implement the portable object and so any platform can use my p_object .... is it right way to do that.... or any modifications required ...



                            if Manager.java file is enough for to implement portable object , is there any format after deploying or is the same as class file...

                            Thanks