This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Servlets and the fly likes Error Message Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Error Message" Watch "Error Message" New topic
Author

Error Message

Ahsan Jamil
Ranch Hand

Joined: Aug 24, 2001
Posts: 58
hi 2 all,
I have made a simple LoginServlet, which just call a method validate() of a class Customer. Although that class Customer is placed in the lib folder of my web application as a jar file .
But when i try to use this class in that servlet LoginServlet, it shows an error that message.
" The server encountered an internal error () that prevented it from fulfilling this request. "
exception
javax.servlet.ServletException: Invoker service() exception
at org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java:524)
at org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java:180)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)

root cause :
java.lang.NoClassDefFoundError: com/retail/controller/Customer
----------
Although jar file of complete package which contains class Customer is placed in the lib of web-inf of my web application.
I think that servlet container is not able to load that jar file. But how this problem could be solved?
Plz reply me ASAP.


Regards,<br /> <br />Ahsan Jamil<br />SCJP, SCWCD, IBM OOAD
Sonny Gill
Ranch Hand

Joined: Feb 02, 2002
Posts: 1211

A possible mistake, quite common actually..
make sure that your directory is WEB-INF, and not web-inf. it is case-sensitive.


The future is here. It's just not evenly distributed yet. - William Gibson
Consultant @ Xebia. Sonny Gill Tweets
Ahsan Jamil
Ranch Hand

Joined: Aug 24, 2001
Posts: 58
Thanx 4 ur reply, it is Web-inf, & i have checked its accessing the servlet i.e its accessing the web-inf\classes but cannt acces jar file, i dunno, y? plz someone give me the answer
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Error Message
 
Similar Threads
Getting exception in small JDBC Servlet Program.
Uploading files using servlet
Error message
Help needed urgently in running a servlet in J2sdkee1.2.1
Cannot find Servlet in WAS3.5