9 Replies Latest reply on Jun 18, 2007 12:33 PM by Manik Surtani

    Failed to start pojo cache with JDK 1.6

    Christophe Lallement Newbie

      Hi

      I try to start my application which need to be compiled with jdk 1.6 (due to external 1.6 lib dependencies) and it fails when i start the second client (during the state synchronization).
      I use PojoCache 2.0.0-RC1

      I have made a test by removing my 1.6 code dependencies,compile and run my sample under 1.5, and all works fine.

      Any idea ?
      Thx
      Christophe

      
      -------------------------------------------------------
      GMS: address is 191.254.42.78:2615
      -------------------------------------------------------
      Exception in thread "main" org.jboss.cache.pojo.PojoCacheException: init org.jboss.cache.config.Configuration@a6079c75 failed
       at org.jboss.cache.pojo.impl.PojoCacheImpl.init(PojoCacheImpl.java:100)
       at org.jboss.cache.pojo.impl.PojoCacheImpl.<init>(PojoCacheImpl.java:89)
       at org.jboss.cache.pojo.PojoCacheFactory.createCache(PojoCacheFactory.java:54)
       at sgcib.deai.ft.FTAppLauncherDemo.main(FTAppLauncherDemo.java:59)
      Caused by: org.jboss.cache.CacheException: Unable to fetch state on startup
       at org.jboss.cache.CacheImpl.start(CacheImpl.java:791)
       at org.jboss.cache.DefaultCacheFactory.createCache(DefaultCacheFactory.java:87)
       at org.jboss.cache.pojo.impl.PojoCacheImpl.init(PojoCacheImpl.java:96)
       ... 3 more
      Caused by: java.io.EOFException
       at java.io.DataInputStream.readShort(DataInputStream.java:298)
       at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2750)
       at java.io.ObjectInputStream.readShort(ObjectInputStream.java:928)
       at org.jboss.cache.marshall.VersionAwareMarshaller.objectFromObjectStream(VersionAwareMarshaller.java:223)
       at org.jboss.cache.statetransfer.DefaultStateTransferIntegrator.integrateAssociatedState(DefaultStateTransferIntegrator.java:116)
       at org.jboss.cache.statetransfer.DefaultStateTransferIntegrator.integrateState(DefaultStateTransferIntegrator.java:63)
       at org.jboss.cache.statetransfer.StateTransferManager.setState(StateTransferManager.java:201)
       at org.jboss.cache.statetransfer.StateTransferManager.setState(StateTransferManager.java:152)
       at org.jboss.cache.CacheImpl$MessageListenerAdaptor.setState(CacheImpl.java:3407)
       at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.handleUpEvent(MessageDispatcher.java:667)
       at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.up(MessageDispatcher.java:722)
       at org.jgroups.JChannel.up(JChannel.java:1015)
       at org.jgroups.stack.ProtocolStack.up(ProtocolStack.java:326)
       at org.jgroups.protocols.pbcast.FLUSH.up(FLUSH.java:509)
       at org.jgroups.protocols.pbcast.STREAMING_STATE_TRANSFER$2.run(STREAMING_STATE_TRANSFER.java:674)
       at java.lang.Thread.run(Thread.java:619)
      


        • 1. Re: Failed to start pojo cache with JDK 1.6
          Christophe Lallement Newbie

          To complete by post, i tried to compile JBossCache whith JDK 1.6.0 and already have the same pb.

          Christophe

          • 2. Re: Failed to start pojo cache with JDK 1.6
            Christophe Lallement Newbie

            Hi

            Any idea ?
            Nobody is using JBoss with jdk 1.6 ?

            • 3. Re: Failed to start pojo cache with JDK 1.6
              Manik Surtani Master

              Not as far as we know, so far.

              This is something we will investigate though.

              • 4. Re: Failed to start pojo cache with JDK 1.6
                Dean Steptoe Newbie

                I too have run into this problem using JDK 1.6 and it presents a major problem for me. I'm currently evaluating various caching tools for our product, and we require JDK 1.6 and going to back to JDK 1.5 is not an possible for us.

                It works fine when multiple nodes are brought up before anything is put into the cache.

                Is there any JIRA issue that tracks this compatibility problem?

                Anyway, I think the root cause in my case is the ClassNotFoundException below:

                3687 [STREAMING_STATE_TRANSFER.reader] INFO org.jboss.cache.statetransfer.StateTransferManager - starting state integration at node UnversionedNode[ / data=[] RL]
                3749 [STREAMING_STATE_TRANSFER.reader] DEBUG org.jboss.cache.statetransfer.DefaultStateTransferIntegrator - Caught unexpected exception
                java.lang.ClassNotFoundException: [Ljava.util.Map$Entry;
                 at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
                 at java.security.AccessController.doPrivileged(Native Method)
                 at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
                 at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
                 at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
                 at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
                 at org.jboss.util.stream.MarshalledValueInputStream.resolveClass(MarshalledValueInputStream.java:58)
                 at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1575)
                 at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1496)
                 at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1624)
                 at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1323)
                 at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1945)
                 at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:480)
                 at org.jboss.cache.util.MapCopy.readObject(MapCopy.java:103)
                 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                 at java.lang.reflect.Method.invoke(Method.java:597)
                 at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)
                 at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1846)
                 at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
                 at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
                 at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
                 at org.jboss.cache.marshall.NodeData.readExternal(NodeData.java:84)
                 at org.jboss.cache.marshall.CacheMarshaller200.unmarshallObject(CacheMarshaller200.java:582)
                 at org.jboss.cache.marshall.CacheMarshaller200.unmarshallLinkedList(CacheMarshaller200.java:690)
                 at org.jboss.cache.marshall.CacheMarshaller200.unmarshallObject(CacheMarshaller200.java:550)
                 at org.jboss.cache.marshall.CacheMarshaller200.objectFromObjectStreamRegionBased(CacheMarshaller200.java:190)
                 at org.jboss.cache.marshall.CacheMarshaller200.objectFromObjectStream(CacheMarshaller200.java:141)
                 at org.jboss.cache.marshall.VersionAwareMarshaller.objectFromObjectStream(VersionAwareMarshaller.java:234)
                 at org.jboss.cache.statetransfer.DefaultStateTransferIntegrator.readNodesAsList(DefaultStateTransferIntegrator.java:275)
                 at org.jboss.cache.statetransfer.DefaultStateTransferIntegrator.integrateTransientState(DefaultStateTransferIntegrator.java:237)
                 at org.jboss.cache.statetransfer.DefaultStateTransferIntegrator.integrateTransientState(DefaultStateTransferIntegrator.java:78)
                 at org.jboss.cache.statetransfer.DefaultStateTransferIntegrator.integrateState(DefaultStateTransferIntegrator.java:62)
                 at org.jboss.cache.statetransfer.StateTransferManager.setState(StateTransferManager.java:201)
                 at org.jboss.cache.statetransfer.StateTransferManager.setState(StateTransferManager.java:152)
                 at org.jboss.cache.CacheImpl$MessageListenerAdaptor.setState(CacheImpl.java:3407)
                 at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.handleUpEvent(MessageDispatcher.java:667)
                 at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.up(MessageDispatcher.java:722)
                 at org.jgroups.JChannel.up(JChannel.java:1015)
                 at org.jgroups.stack.ProtocolStack.up(ProtocolStack.java:326)
                 at org.jgroups.protocols.pbcast.STREAMING_STATE_TRANSFER$2.run(STREAMING_STATE_TRANSFER.java:674)
                 at java.lang.Thread.run(Thread.java:619)
                3749 [STREAMING_STATE_TRANSFER.reader] WARN org.jboss.cache.statetransfer.DefaultStateTransferIntegrator - transient state integration failed, removing all children of UnversionedNode[ / data=[] RL]
                3781 [STREAMING_STATE_TRANSFER.reader] ERROR org.jboss.cache.marshall.VersionAwareMarshaller - Unable to read version id from first two bytes of stream, barfing.
                3781 [STREAMING_STATE_TRANSFER.reader] ERROR org.jboss.cache.CacheImpl.parlay - failed setting state
                java.io.EOFException
                 at java.io.DataInputStream.readShort(DataInputStream.java:298)
                 at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2750)
                


                • 5. Re: Failed to start pojo cache with JDK 1.6
                  Timur Shipilov Newbie

                  I have the same problem as ctof with JDK 1.6. Is any solution found?

                  org.jboss.cache.CacheException: Unable to fetch state on startup
                   at org.jboss.cache.CacheImpl.start(CacheImpl.java:791)
                   at org.jboss.cache.DefaultCacheFactory.createCache(DefaultCacheFactory.java:87)
                   at org.jboss.cache.DefaultCacheFactory.createCache(DefaultCacheFactory.java:58)
                   at com.rentabiliweb.cachetest.OneMoreTest.main(OneMoreTest.java:84)
                  Caused by: java.io.EOFException
                   at java.io.DataInputStream.readShort(Unknown Source)
                   at java.io.ObjectInputStream$BlockDataInputStream.readShort(Unknown Source)
                   at java.io.ObjectInputStream.readShort(Unknown Source)
                   at org.jboss.cache.marshall.VersionAwareMarshaller.objectFromObjectStream(VersionAwareMarshaller.java:223)
                   at org.jboss.cache.statetransfer.DefaultStateTransferIntegrator.integrateAssociatedState(DefaultStateTransferIntegrator.java:116)
                   at org.jboss.cache.statetransfer.DefaultStateTransferIntegrator.integrateState(DefaultStateTransferIntegrator.java:63)
                   at org.jboss.cache.statetransfer.StateTransferManager.setState(StateTransferManager.java:201)
                   at org.jboss.cache.statetransfer.StateTransferManager.setState(StateTransferManager.java:152)
                   at org.jboss.cache.CacheImpl$MessageListenerAdaptor.setState(CacheImpl.java:3407)
                   at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.handleUpEvent(MessageDispatcher.java:667)
                   at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.up(MessageDispatcher.java:722)
                   at org.jgroups.JChannel.up(JChannel.java:1015)
                   at org.jgroups.stack.ProtocolStack.up(ProtocolStack.java:326)
                   at org.jgroups.protocols.pbcast.FLUSH.up(FLUSH.java:509)
                   at org.jgroups.protocols.pbcast.STREAMING_STATE_TRANSFER$2.run(STREAMING_STATE_TRANSFER.java:674)
                   at java.lang.Thread.run(Unknown Source)
                  


                  • 7. Re: Failed to start pojo cache with JDK 1.6
                    Manik Surtani Master

                    FYI, we do have cruise control running the JBoss Cache TestSuite with JDK 1.6 as well, just that we haven't spent much time looking at why things fail under 1.6.

                    http://cruisecontrol.jboss.com/cc/buildresults/jboss-cache-testsuite-jdk16

                    Anyway, stuff that will be cleaned up by CR3.

                    • 8. Re: Failed to start pojo cache with JDK 1.6
                      Christophe Lallement Newbie

                      Hello


                      I'm not sur (my latest test are 2 month ago) but this pb occurs only when you start 2 different JVM (and try to synchronize them). I remember me that when you run test with 2 caches in the same JVM, all works fine. Maybe there is a JGroups optimisation for exchange in memory ?

                      it's to be check, i'm actually busy on another job, but when i'll have more free time, i'll see this case.

                      Christophe

                      • 9. Re: Failed to start pojo cache with JDK 1.6
                        Manik Surtani Master

                        The root cause is JBCOMMON-25 which is now fixed.