500 Internal Server Error java.lang.NoClassDefFoundError
Kinnaree Patel
Ranch Hand
Joined: Oct 30, 2007
Posts: 33
posted
0
Hi friends,
The problem I am facing is a little wierd.... When I try running my application on Live, I get 500 Internal Sever Error, but when I try running the same thing on Local or UAT machines, it works fine.
Also, sometimes the application works fine, but if the browser window remains open for a while, say about 2 3 mins, it gives me 500 Internal Server Error. Can it be something to do with hibernate session?
Also , the error comes when code reaches at i.e when getSession is encountered...
Does anyone over here have any idea about this?
This message was edited 1 time. Last update was at by Kinnaree Patel
95% people read history, 5% create it... On The Way To 5%...
SCJP 5.0 -> 88%, SCWCD -> 86%, Next -> SCBCD and SCDJWS
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper
It is difficult to help without any logging. Check you logging configuration and your code. Are you throwing away the exceptiojn? Or redirecting the lofgging?
Paul Sturrock wrote:Are you throwing away the exceptiojn? Or redirecting the lofgging?
Yes... I am handling it using log4j... and it logs every exception except for this one...
Doug MacKenzie
Greenhorn
Joined: Feb 18, 2009
Posts: 13
posted
0
I have a feeling that what you're seeing is actually a classloader issue caused by incompatible library jars, or a classpath issue on your live server. I experienced the same NoClassDefFoundError despite including the required jar in the EAR and determining that it was present in the web-inf/lib folder.
There are two solutions:
1) Update your live server's classpath with whatever jar is missing. This wasn't an option for me as our server's classpath was locked down.
2) Remove all libraries, and one by one add the required jars back to the project (at the same time you can upgrade the jars to the latest version). This is what I did. It took 4 days but it solved the problem.
Goodluck,
D
This message was edited 1 time. Last update was at by Doug MacKenzie
subject: 500 Internal Server Error java.lang.NoClassDefFoundError