recompiling JSPs

I'm using build 670 to try and debug a web application using tomcat 3.3 (using the org.apache.tomcat.startup.Tomcat class).

It runs fine for the most part. However, If I make a change to a jsp while the server is running and then try to refresh that page, it fails when trying to recompile the jsp - giving an error message (copied below).

The target jdk for the site is 1.3.1, which is in the classpath. Is there something else that needs to configured to make this work?

-


Error: 500
Location: /odyssey/jsp/re/ReCreditMain.jsp
Internal Servlet Error:

javax.servlet.ServletException: sun/tools/javac/Main
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:399)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:194)
at com.icentris.servlet.OdysseySrv.doGet(OdysseySrv.java:548)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:210)
at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
at java.lang.Thread.run(Thread.java:484)

Root cause:
java.lang.NoClassDefFoundError: sun/tools/javac/Main
at org.apache.jasper.compiler.SunJavaCompiler.compile(SunJavaCompiler.java:128)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:245)
at org.apache.jasper.servlet.JspServlet.doLoadJSP(JspServlet.java:462)
at org.apache.jasper.servlet.JasperLoader12.loadJSP(JasperLoader12.java:146)
at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:433)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:152)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:164)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:194)
at com.icentris.servlet.OdysseySrv.doGet(OdysseySrv.java:548)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:210)
at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
at java.lang.Thread.run(Thread.java:484)

1 comment
Comment actions Permalink

Please make sure that the tools.jar is in Tomcat's classpath.
(just edit your target JDK and add the tools.jar to the classpath )


--

Best regards,
Eugene Zhuravlev
JetBrains, Inc, http://www.intellij.com
"Develop with pleasure!"


"Darren Davis" <itnadmin@jetbrains.com> wrote in message
news:6276614.1037274548461.JavaMail.jrun@is.intellij.net...

I'm using build 670 to try and debug a web application using tomcat 3.3

(using the org.apache.tomcat.startup.Tomcat class).
>

It runs fine for the most part. However, If I make a change to a jsp

while the server is running and then try to refresh that page, it fails when
trying to recompile the jsp - giving an error message (copied below).
>

The target jdk for the site is 1.3.1, which is in the classpath. Is there

something else that needs to configured to make this work?
>

--------------------------------
Error: 500
Location: /odyssey/jsp/re/ReCreditMain.jsp
Internal Servlet Error:

>

javax.servlet.ServletException: sun/tools/javac/Main
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:399)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at

org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)

at org.apache.tomcat.core.Handler.service(Handler.java:286)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at

org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatcherImpl
.java:194)

at com.icentris.servlet.OdysseySrv.doGet(OdysseySrv.java:548)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at

org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)

at org.apache.tomcat.core.Handler.service(Handler.java:286)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at

org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
7)

at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at

org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:210)

at

org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)

at

org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)

at java.lang.Thread.run(Thread.java:484)

>

Root cause:
java.lang.NoClassDefFoundError: sun/tools/javac/Main
at

org.apache.jasper.compiler.SunJavaCompiler.compile(SunJavaCompiler.java:128)

at org.apache.jasper.compiler.Compiler.compile(Compiler.java:245)
at org.apache.jasper.servlet.JspServlet.doLoadJSP(JspServlet.java:462)
at

org.apache.jasper.servlet.JasperLoader12.loadJSP(JasperLoader12.java:146)

at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:433)
at

org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspSe
rvlet.java:152)

at

org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
va:164)

at

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318)

at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at

org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)

at org.apache.tomcat.core.Handler.service(Handler.java:286)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at

org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatcherImpl
.java:194)

at com.icentris.servlet.OdysseySrv.doGet(OdysseySrv.java:548)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at

org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)

at org.apache.tomcat.core.Handler.service(Handler.java:286)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at

org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
7)

at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at

org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:210)

at

org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)

at

org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)

at java.lang.Thread.run(Thread.java:484)

>
>



0

Please sign in to leave a comment.