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. |
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].
|
The lib file already is at the WEB-INF directory in fact all the needed libs are at the application WEB-INF directory.
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:
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 |
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 |
Quote:
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. |
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) |
Fullgore - At the risk of repeating myself ;-)
Quote:
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. |
You could do something to make sure that the HibernateException class exists:
Code:
$ jar tvf hibernate3.jar | grep HibernateException |
fullgore -
Also look at this thread: http://forum.springframework.org/showthread.php?t=18067 <= Maybe the problem *is* Hibernate configuration after all... |
All times are GMT -5. The time now is 01:14 PM. |