tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Thomas <ma...@apache.org>
Subject Re: Tomcat servlet instantiation error
Date Wed, 01 Oct 2008 12:52:03 GMT
sthirumalai wrote:
> We build an exe which will have tomcat, jdk and our code in it. When we
> install that in some system it installs perfectly but while accessing the
> service it throws servlet instantiation error. This also happens for the
> first time. If we restart that system everything works well. What may be the
> issue?

The answer appears to be in your stack strace.
> 
> 2008-09-24 14:42:53 StandardWrapperValve[CMLogin]: Allocate exception for
> servlet CMLogin
> javax.servlet.ServletException: Error instantiating servlet class
> cmservelt.CMLoginServlet
<snip/>
> ----- Root Cause -----
> java.lang.ExceptionInInitializerError
> 	at cmservelt.CMLoginServlet.<clinit>(CMLoginServlet.java:42)
<snip/>
> Caused by: java.lang.NullPointerException
> 	at java.io.FileInputStream.<init>(FileInputStream.java:103)
> 	at java.io.FileInputStream.<init>(FileInputStream.java:66)
> 	at java.io.FileReader.<init>(FileReader.java:41)
> 	at data.UserFile.ReadFile(UserFile.java:76)
> 	at model.UserCollection.<clinit>(UserCollection.java:17)
> 	... 31 more

The root cause is a NPE on line 17 of model.UserCollection. You'll have to
look at your source code to figure out exactly which object is null and why.

Mark



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message