I've had some problems with inner classes and after various experiments it
seems to me that WAS behaves as follows:
-Class X has a public static inner class Y. Class Y inherits from class Z.
-Class X is installed within a war-file in installedApps as usual
-Class Z is installed within a jar-file into lib/app
-When instantiating an object of class Y within a method of X the following
exception occurs:
Servlet Error: X$Y: java.lang.ClassNotFoundException: X$Y
at java.net.URLClassLoader.findClass(URLClassLoader.java(Compiled Code))
at java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled Code))
at java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled Code))
at java.lang.Class.forName1(Native Method)
at java.lang.Class.forName(Class.java:134)
However, if class Z is also installed within the same war-file as X and Y,
everything works just fine.
In other words, does this mean that a public static inner class loaded by an
application classloader (as defined in Infocenter 'Application Server AE,
6.4.1') cannot inherit from a class that is loaded by AEX-loader or any
other loader above it?
Class Z is a class that fits the purpose for AEX-classes exactly - in other
words it is shared among all applications and I'd hate to quit using inner
classes.
Any comments?
Kai Lindfors
It is possible that you have uncovered a very interesting bug. The only
way to get this addressed is to raise a formal problem report with
IBM support.