ProgrammingThis 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.
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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:
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].
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).
<= 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
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.
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.
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)
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.