| Author |
servlet jsp threw ClassNotFoundException
|
Caly LeeAnn
Ranch Hand
Joined: Nov 22, 2005
Posts: 55
|
|
I am upgrade JBoss application server from 3.0.3 to 4.0.4. Before the upgrade this services.jsp was loaded properly after I login. But I have the following exception after the upgrade. The jsp is not precompiled kind. In ${JBOSS_HOME}/server/myApp/deploy/jbossweb-tomcat55.sar/META-INF/jboss-service.xml, I have set 'Java2ClassLoadingCompliance' and 'UseJBossWebLoader' to true. 15:18:10,156 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception java.lang.ClassNotFoundException: org.apache.jsp.service_jsp at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:133) at org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:65) at org.apache.jasper.JspCompilationContext.load(JspCompilationContext.java:596) at org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:147) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:315) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264) at javax.servlet.http.HttpServlet.service(HttpServlet.java:810) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at com.liq.login.DisabledUserFilter.doFilter(Unknown Source) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) 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.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524) at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74) 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(Http11BaseProtocol.java:664) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112) at java.lang.Thread.run(Thread.java:595) Any advice is appreciated. Thank you.
|
 |
Max Habibi
town drunk ( and author)
Sheriff
Joined: Jun 27, 2002
Posts: 4118
|
|
Hi Caly, Of te top of my head, I'd think that you had a class in the old default class path that isn't present in your new default classpath. Make sense?
|
Java Regular Expressions
|
 |
Caly LeeAnn
Ranch Hand
Joined: Nov 22, 2005
Posts: 55
|
|
Thank you for your reply. When you refer to class path, do you mean the classpath set as an environment variable? If so, the classpath is not set, which is same as before the upgrade. Any other places should I look into?
|
 |
Caly LeeAnn
Ranch Hand
Joined: Nov 22, 2005
Posts: 55
|
|
The jsp file is not compiled into the class file when it's first invoked. I can't find the service_jsp.java and the service_jsp.class under the working directory. I can't tell why the jsp file is not compiled into class file from the exception stack trace. Are there any other places that I should check?
|
 |
Max Habibi
town drunk ( and author)
Sheriff
Joined: Jun 27, 2002
Posts: 4118
|
|
Caly, Somewhere, JBoss is being told where to look for it's bootstrap files: that's the place you need to look. As for why your jsp's not compiling: I can't say for sure without a direct look, but it's probably because it's trrying to use a class from the jar that's no longer being imported. Try this for a test: write a simplel 'hello world' jsp that imports all of the same classes as the jsp that's failing to compile. Then, slowly comment them[the import stataments] out, one-by-one. Pretty soon, the jsp will compile: that will point you to the class that's not being imported, which, in turn, will lead you to the jar that's not being imported. Good luck! Max
|
 |
 |
|
|
subject: servlet jsp threw ClassNotFoundException
|
|
|