Daniel Gresh wrote:
APliszka-Public wrote:
Google for "compilerSourceVM", and you should find examples of enabling 1.5.

Andrew Pliszka


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Hi all, thanks for the fast replies.

I googled "compilerSourceVM" and came across this thread on the Java forums: http://forum.java.sun.com/thread.jspa?threadID=579806&messageID=2928513

I followed the instructions there. I removed jasper-compiler-jdt.jar from my $CATALINA_HOME/common/lib directory. Then, I noticed my Ant version was 1.5.4, so I downloaded Ant 1.7.0 instead, as 1.5.4 is not compatible with JDK1.5. Next, I added ant.jar to the $CATALINA_HOME/common/lib directory. Then, I edited my web.xml file in the $CATALINA_HOME/conf directory according to the thread on the Java forums and the Jasper how-to. Finally, I restarted Tomcat.

I am still getting a problem however, and I believe this deals with ant. When I try to compile code -- ANY code from ANY JDK -- even something like:

<%
String s;
%>

I get this error:


 HTTP Status 500 -

------------------------------------------------------------------------

*type* Exception report

*message*

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

*exception*

org.apache.jasper.JasperException: Unable to compile class for JSP
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:565) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

*root cause*

java.lang.NullPointerException
org.apache.jasper.compiler.AntCompiler.generateClass(AntCompiler.java:159)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


I haven't removed the older version of Ant (Ant 1.5.4). Could this be causing the problem? Or is there something else I am missing?

Also, I accidentally clicked refresh on my browser after getting this error, and the page loaded. I hit refresh a few more times and it loaded. Then, it gave me the error again, and repeated. I doubt it's pertinent, but who knows.

Thanks,
Dan

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Oh I should have mentioned that when I type ant -version I get the error:

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/tools/ant/Main

Dan

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to