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.
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?
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.
I don't see this issue using the ibm jdks on linux for example.
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.
It's going to be hard to blame the IBM JDK for this one.
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?