You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Andrej Rosenheinrich <to...@die-titanen.de> on 2001/08/31 17:37:22 UTC
NullPointerException in AdaptiveClassLoader
Hello,
I posted this question once in the user-list, but got no reply. After
getting no help and starting to look at the sourcecode this thing gets
even more weird to me, so I hope you excuse that I now post it to the
dev-list.
I broke down my question to a simple example. I have a html-page,
calling a servlet and submitting one parameter. Calling this servlet I
am getting:
Error: 500
Location: /aba2/test
Internal Servlet Error:
java.lang.NullPointerException at
org.apache.tomcat.loader.AdaptiveClassLoader.loadClass
(AdaptiveClassLoader.java:471) (pc 145) at
org.apache.tomcat.loader.AdaptiveServletLoader.loadClass
(AdaptiveServletLoader.java:174) (pc 18) at
org.apache.tomcat.core.ServletWrapper.loadServlet
(ServletWrapper.java:265) (pc 38) at
org.apache.tomcat.core.ServletWrapper.init (ServletWrapper.java:289) (pc
33) at org.apache.tomcat.core.Handler.service (Handler.java:254) (pc 19)
at org.apache.tomcat.core.ServletWrapper.service
(ServletWrapper.java:372) (pc 140) at
org.apache.tomcat.core.ContextManager.internalService
(ContextManager.java:797) (pc 250) at
org.apache.tomcat.core.ContextManager.service (ContextManager.java:743)
(pc 3) at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection
(HttpConnectionHandler.java:210) (pc 388) at
org.apache.tomcat.service.TcpWorkerThread.runIt
(PoolTcpEndpoint.java:416) (pc 73) at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run
(ThreadPool.java:498) (pc 132) at java.lang.Thread.run (Thread.java:484)
(pc 11)
My servlet, the html-file, the web.xml file and server.xml-file are
attached.
After having no idea at all what's going on I took a look at the
sourcecode. First, I am using tomcat 3.2.1 under OpenVMS. Unfortunatly I
couldnt get the code for version 3.2.1, only for 3.2.3. So I have to
assume that the code for this class didnt change (did it?). Looking at
the method loadClass in AdaptiveClassLoader I actually dont see a
possible source for a NullPointerException. There can be a result value
null, but nowhere a NullPointerException is thrown, as far as I looked
at the statements in this method.
My questions: what can cause such an exception? did the class
AdaptiveClassLoader change from 3.2.1 to 3.2.3? where is the point this
exception is thrown?
Another question, under OpenVMS I have my doubts that an errormessage
OutOfError is necessarily related to memory. What else can cause such an
error? Bufferlimits? Processlimits? Is it possible/planned to give more
specific errormessages? Is it possible to get involved in this project
somehow?
Hope to not disturb anyone
Greetings, TIA
Andrej Rosenheinrich