5 Replies Latest reply on Nov 21, 2006 7:44 PM by Sidney Zurch

    NoClassDefFoundError with Proxy classes on AIX

    Jason Burton Newbie

      I'm running into a problem on AIX when looking up EJB's. I get a NoClassDefFoundError on a $Proxy class when I look up EJB's either in the same JBoss instance or in a remote instance. Below are links to a few posts up to 4 years old where people have had the same problem but no resolution, workaround, or acknowledgement has ever been given. Could someone shed some light on this issue? Is it an AIX classloading issue? Is it a JBoss issue? Is there something I can configure to workaround this? I can post detail on my problem if needed, but these posts seem to be the same issue.

      http://www.jboss.com/index.html?module=bb&op=viewtopic&t=59769
      http://www.jboss.com/index.html?module=bb&op=viewtopic&t=50996
      http://www.jboss.com/index.html?module=bb&op=viewtopic&t=22377

        • 1. Re: NoClassDefFoundError with Proxy classes on AIX
          Scott Stark Master

          I would say its a problem with the jdk on this platform. Its the only platform that has such a problem reported, and I don't see this issue using the ibm jdks on linux for example.

          • 2. Re: NoClassDefFoundError with Proxy classes on AIX
            Jason Burton Newbie

            Do you know of what kind of JDK issue might cause this? I'd like to report it as a bug for IBM's AIX JDK, but I don't really know what it's not doing correctly. Seems like a classloading thing - maybe it's not using the context classloader when it needs to or something like that?

            • 3. Re: NoClassDefFoundError with Proxy classes on AIX
              Scott Stark Master

              A java.lang.reflect.Proxy instance is being serialzed using the java.io.* object io streams and this is not being handled correctly. Since such proxy classes are dynamic constructs that don't exist on a classpath the jdk has to handle it.

              • 4. Re: NoClassDefFoundError with Proxy classes on AIX
                Sidney Zurch Novice

                 

                "scott.stark@jboss.org" wrote:
                I don't see this issue using the ibm jdks on linux for example.

                Au contraire:

                2006-11-21 16:17:46,519 INFO [STDOUT] (http-0.0.0.0-8080-Processor25:) javax.ejb.EJBException: Unexpected Error
                java.lang.NoClassDefFoundError: $Proxy105
                

                It's not the fact that it's an IBM Linux JDK: it's the fact that it's an IBM Linux PPC JDK.

                java version "1.5.0"
                Java(TM) 2 Runtime Environment, Standard Edition (build pxp32dev-20061002a (SR3) )
                IBM J9 VM (build 2.3, J2RE 1.5.0 IBM J9 2.3 Linux ppc-32 j9vmxp3223-20061001 (JIT enabled)
                J9VM - 20060915_08260_bHdSMR
                JIT - 20060908_1811_r8
                GC - 20060906_AA)
                JCL - 20061002

                Personally, I'm fed up with IBM's "quirky" JDKs.

                JDKs from from Sun are pretty much bullet proof. If it's an Apple JDK, you can pretty much work with it.

                But if the JDK is from IBM, how it works - if it works - is a mystery.







                • 5. Re: NoClassDefFoundError with Proxy classes on AIX
                  Sidney Zurch Novice

                  It's going to be hard to blame the IBM JDK for this one.

                  http://jira.jboss.com/jira/browse/JBAS-3691?page=all

                  I'm running basically the same JNDI code from within an EJB under JBoss 3.2.8.SP1 and from a JSP page.

                   Properties properties = new Properties();
                   properties.setProperty(Context.INITIAL_CONTEXT_FACTORY,
                   "org.jnp.interfaces.NamingContextFactory");
                   properties.setProperty(Context.URL_PKG_PREFIXES,
                   "org.jnp.interfaces");
                   properties.setProperty(Context.PROVIDER_URL,
                   "jnp://" + host + ":1099/");
                   Context context = new InitialContext(properties);
                  

                  The EJB context lookup croaks with the dreaded:

                  java.lang.NoClassDefFoundError: $Proxy xxxxx

                  but the JSP lookup succeeds!

                  Both pieces of code use the same IBM JDK, so it's hard to fault IBM for this.

                  The EJB is packaged in an .ear; the JSP is packaged in a .war within the .ear.

                  Could this be as simple as maybe disabling the IBM JIT?