Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
12-30-2008, 08:58 AM
|
#1
|
|
Member
Registered: Aug 2006
Location: Brasilia, Brazil
Distribution: Slackware / Suse / FreeBSD
Posts: 55
Rep:
|
Java - HTTP Status 500
I have this error at a server, any clue of what could be? I donīt understand anything about JAVA
--------------
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: Servlet execution threw an exception
root cause
java.lang.NoClassDefFoundError: org/hibernate/HibernateException
sismopi.NivelAcesso.getListaNivelAcesso(NivelAcesso.java:173)
sismopi.Usuario.getListaAcesso(Usuario.java:316)
sismopi.Usuario.<init>(Usuario.java:106)
Controle.doPost(Controle.java:161)
javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
note The full stack trace of the root cause is available in the Apache Tomcat/5.5.20 logs.
|
|
|
|
12-30-2008, 09:19 AM
|
#2
|
|
Member
Registered: Jun 2005
Location: Indiana, USA
Distribution: OpenBSD, Ubuntu
Posts: 892
Rep:
|
Well, I don't know anything about Hibernate specifically, but you'll need to put the Hibernate JAR(s) somewhere in Tomcat's classpath, e.g. in the common/lib directory [of the Tomcat installation] or the WEB-INF/lib directory [of the servlet].
|
|
|
|
12-30-2008, 11:12 AM
|
#3
|
|
Member
Registered: Aug 2006
Location: Brasilia, Brazil
Distribution: Slackware / Suse / FreeBSD
Posts: 55
Original Poster
Rep:
|
The lib file already is at the WEB-INF directory in fact all the needed libs are at the application WEB-INF directory.
Quote:
Originally Posted by taylor_venable
Well, I don't know anything about Hibernate specifically, but you'll need to put the Hibernate JAR(s) somewhere in Tomcat's classpath, e.g. in the common/lib directory [of the Tomcat installation] or the WEB-INF/lib directory [of the servlet].
|
|
|
|
|
12-30-2008, 01:03 PM
|
#4
|
|
Guru
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,861
Rep: 
|
Hi -
1. "Error 500" is a generic error. It just means that something - almost *anything* - went wrong at the server side as it was trying to process a request. By itself, "Error 500" isn't terribly useful.
2. It looks like Hibernate is installed and working correctly (or you probaby wouldn't have gotten as far as you did).
3. The crux of the problem is here:
Quote:
java.lang.NoClassDefFoundError: org/hibernate/HibernateException
sismopi.NivelAcesso.getListaNivelAcesso(NivelAcesso.java:173)
sismopi.Usuario.getListaAcesso(Usuario.java:316
sismopi.Usuario.<init>(Usuario.java:106)
Controle.doPost(Controle.java:161)
javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
|
<= Look at NivelAcesso.java, line 173 and Usuario.java, 316.
Make sure you've installed all the .jar or .class files for "sismopi.NivelAcesso" and "sismopi.Usuario".
Make sure the physical subdirectory is "sismopi/Usuario" and "sismopi/NivelAcesso".
Make sure the file and path names are spelled exactly
'Hope that helps .. PSM
|
|
|
|
01-02-2009, 01:44 AM
|
#5
|
|
LQ Newbie
Registered: Jan 2009
Posts: 27
Rep:
|
HTTP 500 is a very generic servlet error.
From the exception stack trace, it looks like you might not have included all the requisite lib files needed for your application to run properly.
Have you put all the requisite jar files pertaining to hibernate under the webapps/web-inf/lib folder?
Also, if you have a proper exception handling and logging mechanism (log4j) implemented in your application - things will be a lot more easier to troubleshoot such errors.
Linux Archive
Last edited by dhanyaelizabeth; 01-10-2009 at 03:05 PM.
|
|
|
|
01-02-2009, 10:28 AM
|
#6
|
|
Member
Registered: Aug 2006
Location: Brasilia, Brazil
Distribution: Slackware / Suse / FreeBSD
Posts: 55
Original Poster
Rep:
|
Quote:
Originally Posted by dhanyaelizabeth
HTTP 500 is a very generic servlet error.
From the exception stack trace, it looks like you might not have included all the requisite lib files needed for your application to run properly.
Have you put all the requisite jar files pertaining to hibernate under the webapps/web-inf/lib folder?
Also, if you have a proper exception handling and logging mechanism (log4j) implemented in your application - things will be a lot more easier to troubleshoot such errors.
|
I verified the the webapps/web-inf/lib folder and I found the hibernate files, I also looked at others directories and I found the hibernate config file, the hbm, class and java files of the application. I installed and cofigured log4j according to this manual http://tomcat.apache.org/tomcat-5.5-doc/logging.html but Iīm not sure if itīs logging right or if Iīm undertanding the log.
|
|
|
|
01-02-2009, 12:01 PM
|
#7
|
|
Member
Registered: Aug 2006
Location: Brasilia, Brazil
Distribution: Slackware / Suse / FreeBSD
Posts: 55
Original Poster
Rep:
|
This is the log file of tomcat, Iīm sorry to put it here but I have no idea of what it means:
--------------------------------------------------------------------
02/01/2009 09:10:13 org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet Controle threw exception
java.lang.NoClassDefFoundError: org/hibernate/HibernateException
at sismopi.NivelAcesso.getListaNivelAcesso(NivelAcesso.java:173)
at sismopi.Usuario.getListaAcesso(Usuario.java:316)
at sismopi.Usuario.<init>(Usuario.java:106)
at Controle.doPost(Controle.java:161)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProt ocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
|
|
|
|
01-02-2009, 01:24 PM
|
#8
|
|
Guru
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,861
Rep: 
|
Fullgore - At the risk of repeating myself ;-)
Quote:
Hi -
1. "Error 500" is a generic error. It just means that something - almost *anything* - went wrong at the server side as it was trying to process a request. By itself, "Error 500" isn't terribly useful.
2. It looks like Hibernate is installed and working correctly (or you probaby wouldn't have gotten as far as you did).
3. The crux of the problem is here:
Quote:
java.lang.NoClassDefFoundError: org/hibernate/HibernateException
sismopi.NivelAcesso.getListaNivelAcesso(NivelAcesso.java:173)
sismopi.Usuario.getListaAcesso(Usuario.java:316
sismopi.Usuario.<init>(Usuario.java:106)
Controle.doPost(Controle.java:161)
javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
<= Look at NivelAcesso.java, line 173 and Usuario.java, 316.
|
Make sure you've installed all the .jar or .class files for "sismopi.NivelAcesso" and "sismopi.Usuario".
Make sure the physical subdirectory is "sismopi/Usuario" and "sismopi/NivelAcesso".
Make sure the file and path names are spelled exactly
'Hope that helps .. PSM
|
Please look at my previous post; please let us know what you find.
And remember, just because Hibernate happens to be *reporting* the error, it doesn't mean that anything about Hibernate necessarily *caused* the error. My feeling is that it's probably one of your *own* classes that isn't installed correctly.
Last edited by paulsm4; 01-02-2009 at 02:19 PM.
|
|
|
|
01-02-2009, 01:33 PM
|
#9
|
|
Member
Registered: Jun 2005
Location: Indiana, USA
Distribution: OpenBSD, Ubuntu
Posts: 892
Rep:
|
You could do something to make sure that the HibernateException class exists:
Code:
$ jar tvf hibernate3.jar | grep HibernateException
692 Wed Sep 10 12:21:34 EDT 2008 org/hibernate/HibernateException.class
Also, what's the code around NivelAcesso.java:173 look like?
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 10:52 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|