This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Does anyone get the following error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Does anyone get the following error" Watch "Does anyone get the following error" New topic
Author

Does anyone get the following error

kenneth See
Greenhorn

Joined: Aug 21, 2008
Posts: 7
Hi all,

I have studied the HFSJ and worked on the example of BeerSelect servlet. I have followed the example and deploy my servlet accordingly. However, I always get

---------------------------------------
description The server encountered an internal error () that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: Wrapper cannot find servlet class com.example.web.BeerSelect or a class it depends on
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
java.lang.Thread.run(Thread.java:619)

root cause
java.lang.ClassNotFoundException: com.example.web.BeerSelect
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
java.lang.Thread.run(Thread.java:619)

note The full stack trace of the root cause is available in the Apache Tomcat/6.0.18 logs.
-------------------------------------------------------------

I have already checked that
I have my servlet inside directory C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\Beer-v1\WEB-INF\com\example\web

Does anyone know why it cannot run? Many thanks for your help.

Kenneth
Vijitha Kumara
Bartender

Joined: Mar 24, 2008
Posts: 3827

I have my servlet inside directory C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\Beer-v1\WEB-INF\com\example\web


Don't you have classes folder in
Beer-v1\WEB-INF\classes\com\example\web

like this in your path? May be that's the problem.


SCJP 5 | SCWCD 5
[How to ask questions] [Twitter]
Chandra Bhatt
Ranch Hand

Joined: Feb 28, 2007
Posts: 1707
As stated JVM is not able to find the class com.example.web.BeerSelect,
see where does the compiled class file go to?

Generally class files are placed under "classes" directory under WEB-INF,
where container looks for them.


cmbhatt
kenneth See
Greenhorn

Joined: Aug 21, 2008
Posts: 7
Thank you, my friend.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Does anyone get the following error