8 Replies Latest reply on Nov 10, 2005 11:34 AM by mark_riley

    ClassNotFoundException when upgrading to 1.2.3

    henriknyberg

      Hello,
      we have been successfully using JBossCache 1.2 in a oracle 9ias clustered environment (6 instances, around 120.000 objects in the replicated cache). When upgrading to JBossCache 1.2.3 by simply replacing the jars in the distribution we run into a class not found exception.

      When I run one instance in the cluster everything works fine. When I start a second instance creating UDP multicast traffic on the network I get the error message below. The JBossCache jars (including jgroups.jar) are included in the WEB-INF/lib directory of the application archive which is deployed in the cluster. This works fine with JBossCache 1.2 but somehow something seems to have changed with the 1.2.3 release. Do you have any idea what the problem is with the upgrade?

      Best regards,

      Henrik


      2005-09-30 15:15:41,707 : ERROR [UDP mcast receiver] [] 4125 org.jgroups.conf.ClassConfigurator - java.lang.ClassNotFoundException: org.jgroups.blocks.RequestCorrelator$Header
      at com.evermind.naming.ContextClassLoader.findClass(ContextClassLoader.java:459)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
      at com.evermind.naming.ContextClassLoader.loadClass(ContextClassLoader.java:138)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
      at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Class.java:219)
      at com.evermind.server.ApplicationContextClassLoader.findClass(ApplicationContextClassLoader.java:19)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
      at org.jgroups.conf.ClassConfigurator.get(ClassConfigurator.java:140)
      at org.jgroups.Message.readHeader(Message.java:724)
      at org.jgroups.Message.readFrom(Message.java:645)
      at org.jgroups.protocols.UDP.bufferToList(UDP.java:1011)
      at org.jgroups.protocols.UDP.handleIncomingUdpPacket(UDP.java:708)
      at org.jgroups.protocols.UDP.run(UDP.java:277)
      at java.lang.Thread.run(Thread.java:534)


      PS. The jars that we are including from JBossCache 1.2.3 are:
      jboss-cache.jar
      jboss-system.jar
      jboss-jmx.jar
      jgroups.jar
      jboss-common.jar
      jboss-j2ee.jar
      log4j.jar
      commons-logging.jar
      concurrent.jar

        • 1. Re: ClassNotFoundException when upgrading to 1.2.3
          manik

          Hi,

          Can you confirm the version of JBossCache and JGroups used on all nodes, by typing:

          java -cp jboss-cache.jar org.jboss.cache.Version
          java -cp jgroups.jar org.jgroups.Version

          Thanks,
          Manik

          • 2. Re: ClassNotFoundException when upgrading to 1.2.3
            henriknyberg

            Hello,
            I print the versions in the system log during startup and on all nodes the following is printed:

            JBossCache 1.2.3[ $Id: Version.java,v 1.3 2005/05/31 15:21:50 bela Exp $]
            JGroups 2.2.8[ $Id: Version.java,v 1.18.2.1 2005/05/30 09:47:56 belaban Exp $]


            • 3. Re: ClassNotFoundException when upgrading to 1.2.3
              manik

              This may be a stupid question, but does your jgroups.jar file contain org/jgroups/conf/ClassConfigurator.class ? Just testing in case you have a corrupted jar or something...

              • 4. Re: ClassNotFoundException when upgrading to 1.2.3
                manik

                Sorry, I meant org.jgroups.blocks.RequestCorrelator$Header

                • 5. Re: ClassNotFoundException when upgrading to 1.2.3
                  manik

                  And also, are there any other versions of jgroups.jar in your app server classpath? Perhaps 9iAS uses another version of jgroups, and given that you are looking for an inner class, this may be hidden by an older version of RequestCorrelator?

                  • 6. Re: ClassNotFoundException when upgrading to 1.2.3
                    henriknyberg

                    Hello,
                    yes org.jgroups.blocks.RequestCorrelator$Header is in the jar, and it is the only jar in the server classpath. I've also tried adding jgroups.jar to the app servers home/lib but that doesn't help either.

                    • 7. Re: ClassNotFoundException when upgrading to 1.2.3

                      I really don't recall any significant changes in 1.2.3.

                      Can you try not to upgrade the jgroups.jar in 1.2.3 and see if that solves the problem?

                      I am just trying to isolate the problem area now.

                      Thanks,

                      -Ben

                      • 8. Re: ClassNotFoundException when upgrading to 1.2.3
                        mark_riley

                        Hi,

                        Was this problem ever solved? I have experienced a very similar error using JGroups and the Oracle application server. I get the following stack trace:

                        java.lang.ClassNotFoundException: org.jgroups.blocks.PullPushAdapter$PullHeader
                        at com.evermind.naming.ContextClassLoader.findClass(ContextClassLoader.java:486)
                        at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
                        at com.evermind.naming.ContextClassLoader.loadClass(ContextClassLoader.java:138)
                        at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
                        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
                        at java.lang.Class.forName0(Native Method)
                        at java.lang.Class.forName(Class.java:219)
                        at com.evermind.server.ApplicationContextClassLoader.findClass(ApplicationContextClassLoader.java:19)
                        at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
                        at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
                        at org.jgroups.conf.ClassConfigurator.get(ClassConfigurator.java:144)
                        at org.jgroups.Message.readHeader(Message.java:724)
                        at org.jgroups.Message.readFrom(Message.java:645)
                        at org.jgroups.protocols.FRAG.unfragment(FRAG.java:244)
                        at org.jgroups.protocols.FRAG.up(FRAG.java:138)
                        at org.jgroups.stack.Protocol.receiveUpEvent(Protocol.java:436)
                        at org.jgroups.stack.Protocol.passUp(Protocol.java:488)
                        at org.jgroups.protocols.pbcast.STABLE.up(STABLE.java:226)
                        at org.jgroups.stack.UpHandler.run(Protocol.java:59)