Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

WAS 4.0.1: ClassNotFoundException when inner classes superclass loaded by AEX-loader?

159 views
Skip to first unread message

Kai Lindfors

unread,
Nov 8, 2001, 9:18:55 AM11/8/01
to
Hi all!

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


David Artus

unread,
Nov 9, 2001, 2:30:46 AM11/9/01
to

Never tried it myself. Intuitively it seems strange that there would be a
difference between the case you describe and other uses of lib/app.

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.

0 new messages