I am testing against a JBoss 3.0.0, JBoss 3.0.1 and a JBoss head-branch version that I checked out of CVS last Thursday August 8. All on Windows 2000. JBoss 3.0.0 works fine, the other versions have the problem described below.
The problem I have is related to classloading. I have placed a jar in jboss/server/default/lib. Another jar placed in the same directory instantiates classes from this jar with Class.forName(...) (and this jar is used from an EJB). Most of the classes are loaded just fine, but some of the classes give classnotfound exceptions. It gives the same error for the same classes every time, in the same situation (so the problem is consistent).
I have narrowed the problem down to the fact that the classes in the jar do not have a package name (it is an obfuscated jar). When I create another obfuscated jar, where each class is prefixed with a dummy packagename, it works fine. I created different obfuscated jars with and without a packagename (the classes are otherwise named randomly), and the behavior is consistent.
I am not sure the problem is related to JBoss, but I have never seen this before, and the jars work fine when performing the same tasks in a more basic setting.
My question is this: Does anybody know whether JBoss classloaders treat classes without any package name differently then those with a package-name, since 3.0.1? And if so, what is different?
It is very strange behavior, since most of the classes load like a charm I would say there is no difference, but the problem goes away when I introduce package names so it really seems to be related to that.
For what it's worth, here is part of the stacktrace of the classnotfound exception (from the CVS version), but I looked in the sources and all I can see there is that all attempts to load the class have failed, so it does not immediately present the answer.
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
TIA for any pointers,