This week's book giveaway is in the Agile forum.
We're giving away four copies of Head First Agile and have Andrew Stellman & Jennifer Greene on-line!
See this thread for details.
Win a copy of Head First Agile this week in the Agile forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

ExceptionInInitializeError in sevlets  RSS feed

 
Raji Balakrishnan
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I have a problem I don't understand:
Let's say I have a Servlet-Class with HttpServlet as it's supertype for
example package.MyServlet.
If I try to run a Servlet containing the code: package.MyServlet.class I
have no problem.
If I try to run my test application containing: package.MyServlet.class
I get an ExceptionInInitializeError the first time and NoClassDefFound's
when I try a second time.

Has this something to do with security or something ?
Thanks for your help
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66208
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It usually means that an exception is being thrown during the static initialization of the class. Check your logs carefully and inspect any static code you have defined.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!