Hi everybody,
I am trying to run a servlet under WAS 4.0.1 (Samples worked fine)
Assembling (both manual (ant) and with the WAS Assambly tool) and deploying seemed to work without much of a problem.
When I start the servlet (named HttpServer) I get the following Exception:
HttpServer: java.lang.SecurityException: Prohibited package name: java.util at java.lang.ClassLoader.defineClass(ClassLoader.java(Compiled Code)) at com.ibm.ws.classloader.CompoundClassLoader.findClass(CompoundClassLoader.java(Compiled Code)) at com.ibm.ws.classloader.CompoundClassLoader.findClass(CompoundClassLoader.java(Compiled Code)) at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java:286) at java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled Code))
This happens when nothing more exciting than instantiating an object from java.util is done: "new java.util.StringTokenizer()". Restructuring the code a bit, it came when getting the class object for Hashtable: "java.util.Hashtable.class".
It seems to be simply the first occurrence of any class in a "java." package (obviously excluding java.lang). To my knowledge the "java." packages are restricted to be loaded by the bootstrap classloader. From the stack trace it looks like the prorietary classloader ingnores that rule.
If that would be the case for all webapps deployed in WebSphere, it would definitely make running almost any servlet in WebSphere impossible ;-) Since I cannot imagine this to be true, I am wondering whether I missed some kind of configuration in WebSphere or a parameter in the assembly of the war or the ear.
|