14 Replies Latest reply on Jan 12, 2004 3:41 AM by sblezard

    Problems with 3.0.2 & IBM JDK 1.4.0 at Startup

    Todd Palino Newbie

      I just got my hands on the new IBM JDK (1.4.0) for RedHat and decided to give it a shot on JBoss, since previous IBM JDKs have had bugs. However, I'm getting an exception that I'm not sure how to fix, or if it's even a JBoss problem (vs. a JDK problem). Here's the text of the exception I'm getting (with a little context):

      14:39:53,297 DEBUG [URLDeploymentScanner] Adding URL from spec: ./deploy
      14:39:53,297 DEBUG [URLDeploymentScanner] URL: file:/app/jboss-3.0.2/server/default/deploy/
      14:39:53,297 DEBUG [URLDeploymentScanner] Added url: file:/app/jboss-3.0.2/server/default/deploy/
      14:39:53,297 DEBUG [URLDeploymentScanner] URL list: [file:/app/jboss-3.0.2/server/default/deploy/]
      14:39:53,298 INFO [SystemPropertiesService] Creating
      14:39:53,298 INFO [SystemPropertiesService] Created
      14:39:53,299 INFO [Log4jService] Creating
      14:39:53,299 INFO [Log4jService] Created
      14:39:53,300 INFO [WebService] Creating
      14:39:53,300 INFO [WebService] Created
      14:39:53,300 WARN [ServiceController] jboss.management.single:j2eeType=J2EEDomain,name=Manager does not implement any Service methods
      14:39:53,301 INFO [NamingService] Creating
      14:39:53,301 INFO [NamingService] Created
      14:39:53,305 DEBUG [NestedThrowable] org.jboss.util.NestedThrowable.parentTraceEnabled=true
      14:39:53,314 DEBUG [NestedThrowable] org.jboss.util.NestedThrowable.nestedTraceEnabled=false
      14:39:53,314 DEBUG [NestedThrowable] org.jboss.util.NestedThrowable.detectDuplicateNesting=true
      14:39:53,317 ERROR [Server] start failed
      org.jboss.deployment.DeploymentException: Could not create deployment: file:/app/jboss-3.0.2/server/default/conf/jboss-service.xml; - nested throwable: (java.lang.NoClassDefFoundError: $Proxy0)
      at org.jboss.deployment.MainDeployer.create(MainDeployer.java:772)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:615)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:580)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:564)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:61)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:40)
      at java.lang.reflect.Method.invoke(Method.java:335)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:324)
      at org.jboss.system.server.ServerImpl.start(ServerImpl.java:221)
      at org.jboss.Main.boot(Main.java:142)
      at org.jboss.Main$1.run(Main.java:375)
      at java.lang.Thread.run(Thread.java:566)
      Caused by: java.lang.NoClassDefFoundError: $Proxy0
      at sun.reflect.GeneratedConstructorAccessor6.newInstance(Unknown Source)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:42)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:299)
      at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:585)
      at org.jboss.system.ServiceController.getServiceProxy(ServiceController.java:740)
      at org.jboss.system.ServiceController.create(ServiceController.java:276)
      at org.jboss.system.ServiceController.create(ServiceController.java:242)
      at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:40)
      at java.lang.reflect.Method.invoke(Method.java:335)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
      at $Proxy3.create(Unknown Source)
      at org.jboss.deployment.SARDeployer.create(SARDeployer.java:217)
      at org.jboss.deployment.MainDeployer.create(MainDeployer.java:755)
      ... 14 more

      After that, the server starts undeploying all the packages. It looks like the core problem is the "NoClassDefFoundError: $Proxy0" exception. So, any ideas on how to attack this?

      -Todd

        • 1. Re: Problems with 3.0.2 & IBM JDK 1.4.0 at Startup
          Adrian Brock Master

          Somebody else reported the same problem

          http://www.jboss.org/modules/bb/index.html?module=bb&op=viewtopic&t=forums/ been using 1.4 (Sun) for a while now and
          have never seen this problem.

          $Proxy0 is a dynamic proxy implemented by
          java.lang.reflect.Proxy

          Could you try adding
          -verbose:class
          to the java command in bin/run.sh

          This should tell us if the class is being unloaded?

          Regards,
          Adrian

          • 2. Re: Problems with 3.0.2 & IBM JDK 1.4.0 at Startup
            Todd Palino Newbie

            OK, I've switched to 3.0.3, and I've recompiled using the IBM 1.4 JDK, just in case that was the issue. But I'm still seeing the same problem.

            I've attached the verbose log from the startup, as you requested. I don't understand all of it (I'm not, currently, a Java programmer), but it doesn't appear that $Proxy0 is unloaded before that exception is raised.

            -Todd

            • 3. Re: Problems with 3.0.2 & IBM JDK 1.4.0 at Startup
              Adrian Brock Master

              Your first error is:

              [Signaling in VM: java/lang/ClassNotFoundException, message: org/apache/log4j/PatternLayoutBeanInfo]
              at java.lang.Class.forName1(Native Method)
              at java.lang.Class.forName(Class.java:161)
              at java.beans.Introspector.instantiate(Introspector.java:1293)
              at java.beans.Introspector.findExplicitBeanInfo(Introspector.java:395)
              at java.beans.Introspector.(Introspector.java:344)
              at java.beans.Introspector.getBeanInfo(Introspector.java:145)
              at org.apache.log4j.config.PropertySetter.introspect(PropertySetter.java:67)
              at org.apache.log4j.config.PropertySetter.getPropertyDescriptor(PropertySetter.java:235)
              at org.apache.log4j.config.PropertySetter.setProperty(PropertySetter.java:147)
              at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:121)
              at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:88)
              at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:639)
              at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:602)
              at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:499)
              at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:405)
              at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:431)
              at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:456)
              at org.apache.log4j.LogManager.(LogManager.java:145)
              at org.apache.log4j.Category.getInstance(Category.java:517)
              at org.jboss.logging.Logger.(Logger.java:45)
              at org.jboss.logging.Logger.getLogger(Logger.java:285)
              at org.jboss.system.server.ServerImpl.doInit(ServerImpl.java:128)
              at org.jboss.system.server.ServerImpl.init(ServerImpl.java:112)
              at org.jboss.Main.boot(Main.java:143)
              at org.jboss.Main$1.run(Main.java:381)
              at java.lang.Thread.run(Thread.java:566)
              [User requests termination for Exception:(null)]

              So it looks like IBM have regressed back
              not using the thread context classloader to search for
              classes.

              There looks to be a similar problem with
              URL Protocol handlers.

              I know you are not a java programmer, but can you try
              this simple java program.

              In a file called Test.java

              public class Test
              {
              public static void main(String[] args)
              throws Exception
              {
              Class.forName("rubbish");
              }
              }

              To compile
              javac Test.java

              To run
              java Test

              Then post the output, do you see?
              at java.lang.Class.forName(Class.java:161)

              I'd run it myself, but it looks like IBM's JDK1.4
              is only availble for the zSeries at the moment :-(

              Regards,
              Adrian

              • 4. Re: Problems with 3.0.2 & IBM JDK 1.4.0 at Startup
                Todd Palino Newbie

                Here's the output from that test program:

                Exception in thread "main" java.lang.ClassNotFoundException: rubbish
                at java.net.URLClassLoader.findClass(URLClassLoader.java:240)
                at java.lang.ClassLoader.loadClass(ClassLoader.java:533)
                at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:427)
                at java.lang.ClassLoader.loadClass(ClassLoader.java:465)
                at java.lang.Class.forName1(Native Method)
                at java.lang.Class.forName(Class.java:161)
                at Test.main(Test.java:6)


                I know the website says that 1.4 is only available for the zSeries servers, but it is actually available for the xSeries (Intel) as well. It just hasn't made it to the website yet. However, I have a pretty good support relationship with IBM, and that's how I got the latest and greatest. If this is a matter of a problem with the JDK, I can take it back to them and try and get it fixed.

                -Todd

                • 5. Re: Problems with 3.0.2 & IBM JDK 1.4.0 at Startup
                  Adrian Brock Master

                  Apologies if this is a bit technical.

                  [Signaling in VM: java/lang/ClassNotFoundException, message: org/apache/log4j/PatternLayoutBeanInfo]
                  at java.lang.Class.forName1(Native Method)
                  at java.lang.Class.forName(Class.java:161)
                  at java.beans.Introspector.instantiate(Introspector.java:1293)

                  or

                  Class.forName("org.apache.log4j.PatternLayoutBeanInfo");

                  uses the caller's classloader, in this case
                  the classloader that loaded java.beans.Introspector.

                  This will be the system classloader used to boot
                  the JVM since it is a system class.

                  The problem is log4j is added to the JVM after
                  JVM boot using a URLClassLoader.

                  Class.forName() won't find it because a parent classloader
                  (the system classloader) never delegates to its child
                  classloader (the URLClassLoader).

                  I think in this case it should use the classloader that
                  loaded the original javabean class:
                  org.apache.log4j.PatternLayout
                  which will be the URLClassLoader.

                  There are similar problems with custom URL protocol
                  handlers and property editors looking at your original
                  log.

                  Regards,
                  Adrian

                  • 6. Re: Problems with 3.0.2 & IBM JDK 1.4.0 at Startup
                    Todd Palino Newbie

                    No problem at all. But to clarify, you're saying that this is something that JBoss should do differently, not neccessarily a problem with the IBM JDK?

                    I appreciate all the help. If I can get this working correctly, I'm hoping to be able to convince a number of people here to switch from Weblogic to JBoss.

                    -Todd

                    • 7. Re: Problems with 3.0.2 & IBM JDK 1.4.0 at Startup
                      Adrian Brock Master

                      Actually my bad,

                      I was looking at it some more, the classes I mentioned
                      don't really exist, so the ClassNotFoundExecptions
                      are normal.

                      I was following a red herring :-)
                      I'm continuing to investigate the problem.

                      It would be good if I could get hold of the JDK,
                      where did you get it from?

                      Regards,
                      Adrian

                      • 8. Re: Problems with 3.0.2 & IBM JDK 1.4.0 at Startup
                        Adrian Brock Master

                        Just an update I'm afraid, I've been comparing
                        Sun with IBM, I really need to try the IBM JDK.

                        Apologies again for technical stuff,
                        some of the info is from my machine with some
                        debug added.

                        $Proxy0 is created at the start for the main deployer
                        this works on both Sun and IBM (TRACE1)

                        On Sun $Proxy0 is reused (TRACE2)
                        On IBM $Proxy0 is not found (TRACE3)

                        Strangely, IBM does reuse $Proxy0 for the previous
                        four services?
                        12:09:42,825 INFO [PropertyEditorManagerService] Creating
                        12:09:42,827 INFO [SystemPropertiesService] Creating
                        12:09:42,827 INFO [Log4jService] Creating
                        12:09:42,827 INFO [WebService] Creating

                        One thing I did notice is that IBM does more
                        [Loaded sun.reflect.GeneratedConstructorAccessor*]
                        this is probably due to differences in the garbage
                        collector and unrelated?

                        TRACE1 - Main Deployer uses $Proxy0 Successfully
                        ------------------------------------------------
                        jboss.system:service=MainDeployer

                        org.jboss.mx.loading.UnifiedClassLoader2@8fb1f7{ url=file:/D:/cygwin/home/ejort/jboss/jboss-3.0/build/output/jboss-3.0.4RC1/server/default/conf/ }
                        [interface org.jboss.system.Service]

                        [Loaded $Proxy0]
                        [Loading superclass and interfaces of $Proxy0]
                        [Loaded java.lang.reflect.UndeclaredThrowableException from /opt/IBMJava2-14/bin/../jre/lib/core.jar]
                        [Loading superclass and interfaces of java/lang/reflect/UndeclaredThrowableException]
                        [Preparing $Proxy0]
                        [Initializing $Proxy0]
                        [Running static initializer for $Proxy0]
                        [Loaded org.jboss.util.Classes]
                        [Loading superclass and interfaces of org/jboss/util/Classes]
                        [Loaded org.jboss.util.EmptyStringException]
                        [Loading superclass and interfaces of org/jboss/util/EmptyStringException]
                        [Loaded org.jboss.util.UnreachableStatementException]
                        [Loading superclass and interfaces of org/jboss/util/UnreachableStatementException]
                        [Preparing org/jboss/util/Classes]
                        [Initializing org/jboss/util/Classes]
                        [Running static initializer for org/jboss/util/Classes]
                        12:09:39,416 INFO [MainDeployer] Creating

                        TRACE2 - What happens on Sun, reusing $Proxy0
                        ---------------------------------------------
                        21:33:21,475 WARN [ServiceController] jboss.management.single:j2eeType=J2EEDomain,name=Manager does not implement any Service methods

                        jboss.management.single:j2eeType=J2EEDomain,name=Manager

                        org.jboss.mx.loading.UnifiedClassLoader2@8fb1f7{ url=file:/D:/cygwin/home/ejort/jboss/jboss-3.0/build/output/jboss-3.0.4RC1/server/default/conf/ }
                        [interface org.jboss.system.Service]

                        onto the next service!

                        jboss:service=Naming

                        org.jboss.mx.loading.UnifiedClassLoader2@8fb1f7{ url=file:/D:/cygwin/home/ejort/jboss/jboss-3.0/build/output/jboss-3.0.4RC1/server/default/conf/ }
                        [interface org.jboss.system.Service]
                        21:33:21,475 INFO [NamingService] Creating

                        TRACE3, on IBM, fails to use $Proxy0
                        ------------------------------------
                        12:09:42,828 WARN [ServiceController] jboss.management.single:j2eeType=J2EEDomain,name=Manager does not implement any Service methods
                        [Loaded sun.reflect.GeneratedConstructorAccessor6]
                        [Loading superclass and interfaces of sun/reflect/GeneratedConstructorAccessor6]
                        [Preparing sun/reflect/GeneratedConstructorAccessor6]
                        [Signaling in VM: java/lang/NoClassDefFoundError, message: $Proxy0]
                        at sun.reflect.GeneratedConstructorAccessor6.newInstance(Unknown Source)
                        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:42)
                        at java.lang.reflect.Constructor.newInstance(Constructor.java:299)
                        at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:585)
                        at org.jboss.system.ServiceController.getServiceProxy(ServiceController.java:741)

                        Regards,
                        Adrian

                        • 9. Re: Problems with 3.0.2 & IBM JDK 1.4.0 at Startup
                          Todd Palino Newbie

                          I got the new JDK direct from IBM tech support (we have a support contract with them, so it makes things a little easier). They usually take a little while to get things from release to actually on the website.


                          If you email me at jbforums@bonkoif.com, I can send you the 1.4 RPM (it's about 70 MB)

                          -Todd

                          • 10. Re: Problems with 3.0.2 & IBM JDK 1.4.0 at Startup
                            Adrian Brock Master

                            Hi,

                            70MB is more than my mail box can handle :-(

                            Perhaps you could post it on a ftp site if you
                            are not breaking your support contract?

                            Regards,
                            Adrian

                            • 11. Re: Problems with 3.0.2 & IBM JDK 1.4.0 at Startup
                              Todd Palino Newbie

                              You can grab it via HTTP at http://bonkoif.com/IBMJava2-SDK-1.4-0.0.i386.rpm

                              Please tell me as soon as you've got it, so that I can remove it (don't want to piss off my web hosting with too much traffic).

                              -Todd

                              • 12. Re: Problems with 3.0.2 & IBM JDK 1.4.0 at Startup
                                Adrian Brock Master

                                Got it.

                                I won't be able to look at it straight-away.
                                Maybe later this evening?

                                Regards,
                                Adrian

                                • 13. Re: Problems with 3.0.2 & IBM JDK 1.4.0 at Startup
                                  Todd Palino Newbie

                                  That's fine. I've gone ahead and removed it from my site.

                                  Just as a note, from talking to IBM today, it sounds like they're not quite ready to release this to the public, which is why it's not on the website yet. I'm not quite sure why they're holding back on it (they're talking like it's going to be months). So it might not be productive for us to spend too much time on this right now. On the other hand, it would be nice to try and head off any possible problems in the 1.4 JDK before it does get released.

                                  There's supposed to be a new version of IBM's 1.3.1 JDK coming out around the end of this month, and I've tested that version and it solves the long filenames problem. The version I tested hadn't gone through regression testing, however, and it seemed to have some thread release issues when I was trying it out, so I didn't get very far. Hopefully they'll find and fix those in the regression tests.

                                  -Todd

                                  • 14. Problems with Jboss and IBM JDK1.4.0
                                    sblezard Newbie

                                    Hi,

                                    I have tried to use JBoss 3.2.3 on an IBM AIX machine running IBM's JDK 1.4.0. Although the server starts up and the part of the application functions, at one point it consistently falls over with NoClassDefFoundError : proxy$355. This looks to be the same sort of problem discussed on this thread. The same application on Jboss works fine on Windows and Linux. Is there a resolution for this problem yet?

                                    Sean.