This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes JSP and the fly likes javax.servlet.ServletException Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » JSP
Reply Bookmark "javax.servlet.ServletException" Watch "javax.servlet.ServletException" New topic
Author

javax.servlet.ServletException

nam pet
Greenhorn

Joined: Aug 18, 2011
Posts: 5
I got the error message when moving the files from old mechine to a new mechine
this code for displaying captcha (cap.jsp)

error code is
type Exception report

message

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

exception

javax.servlet.ServletException
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:867)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:800)
org.apache.jsp.cap_jsp._jspService(cap_jsp.java:218)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
root cause

java.lang.NoClassDefFoundError
org.apache.jsp.cap_jsp._jspService(cap_jsp.java:86)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
note The full stack trace of the root cause is available in the Tomcat logs.

the env varibales of the new mechine is
PATH=/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/opt/j2sdk_nb/j2sdk1.4.2/bin:/opt/j2sdk_nb/j2sdk1.4.2/jre/bin::/root/bin
INPUTRC=/etc/inputrc
PWD=/root
JAVA_HOME=/opt/j2sdk_nb/j2sdk1.4.2/

please help me
bhanu chowdary
Ranch Hand

Joined: Mar 09, 2010
Posts: 256
nam pet wrote:
java.lang.NoClassDefFoundError
org.apache.jsp.cap_jsp._jspService(cap_jsp.java:86)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)


Classpath problem. Your JVM is not able to locate the .class files your are using. Make sure whatever you are using is on the classpath.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56200
    
  13

bhanu chowdary wrote:
Classpath problem. Your JVM is not able to locate the .class files your are using. Make sure whatever you are using is on the classpath.

Not correct. At run time, containers ignore the classpath. Jars that the web app needs should be placed in WEB-INF/lib.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12269
    
    1
Tomcat installs typically have a class-loader-howto.html file under webapps/doc which explains in detail where Tomcat looks for library files.

Bill

Java Resources at www.wbrogden.com
bhanu chowdary
Ranch Hand

Joined: Mar 09, 2010
Posts: 256
Bear Bibeault wrote:
bhanu chowdary wrote:
Classpath problem. Your JVM is not able to locate the .class files your are using. Make sure whatever you are using is on the classpath.

Not correct. At run time, containers ignore the classpath. Jars that the web app needs should be placed in WEB-INF/lib.

I should have been more careful while reading the post. The moment I saw the error I jumped on to this conclusion. Thanks Bear
nam pet
Greenhorn

Joined: Aug 18, 2011
Posts: 5
thanks 4 the reply .

i m verify all the jar files in WEB-INF dir. all are same(new pc and Old one)
but still get the error message.
i m test with another code for recaptcha.
that time getting the same error message.
i think java graphics not displaying . is there any other settings needed (java graphics files/jar) ??
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 16483
    
    2

Have you determined which class is missing yet?
nam pet
Greenhorn

Joined: Aug 18, 2011
Posts: 5
not determined yet.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56200
    
  13

When you determine the missing class you'll know what you need to put into WEB-INF/lib.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: javax.servlet.ServletException
 
Similar Threads
Check for Duplicates
HTTP status 500 - Unknown source
How to resolve the exception? Help!
javax.servlet.ServletException
Exception in struts Application