This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin for Android App Development and have Peter Sommerhoff on-line!
See this thread for details.
Win a copy of Kotlin for Android App Development this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Devaka Cooray
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • salvin francis
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

500 Internal Server Error java.lang.NoClassDefFoundError  RSS feed

 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
author and cow tipper
Posts: 5000
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You 500 error is just what is being reported back to the browser. It basically tells the browser the app server messed up.

Check the logs on the app server for some better messages. You should see some type of exception in the logs.

Which server are you using for deployment?

-Cameron McKenzie
 
Kinnaree Patel
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Cameron Wallace McKenzie wrote:

Check the logs on the app server for some better messages. You should see some type of exception in the logs.

Which server are you using for deployment?

-Cameron McKenzie



The worst thing is I get nothing in the logs... So I am even more confused....

We use OC4J for deployment...



 
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?

 
Kinnaree Patel
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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...
 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
All of the world's problems can be solved in a garden - Geoff Lawton. Tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!