4 Replies Latest reply on Oct 9, 2003 10:17 AM by David Hoots

Tomcat can't compile JSP

Hi,

I'm using Ecliple 2.1 with JBOSS 3.2.2 and Tomcat 4.1.24 on XP
I can separately run JBOSS+Tomcat from command prompt, but when i start them from Eclipse, Tomcat fails to compile the very first JSP. (Internal error). From examining error stack trace i see that tomcat tries to create process "javac.exe" with too lengthy classpath. It seems that the classpath is getting truncated.
Has anybody had similar problem?

I have attached log to this post. here are excerpts from it:

Exception compiling Error running javac.exe compiler
22:38:25,359 ERROR [Engine] Exception:
Error running javac.exe compiler

....

Caused by: java.io.IOException: CreateProcess: javac.exe -classpath C:\java_env\jboss\jboss-3.2.2RC1_tomcat-4.1.24\bin\run.jar;C:\java_env\jboss\jboss-3.2.2RC1_tomcat-4.1.24\server\default\deploy\http-invoker.sar;C:\java_env\jboss\jboss-3.2.2RC1_tomcat-4.1.24\server\default\lib\jnpserver.jar;C:\java_env\jboss\jboss-3.2.2RC1_tomcat-4.1.24\server\default\tmp\deploy\tmp61258jbossmq-destinations-service.xml;C:\java_env\jboss\jboss-3.2.2RC1_tomcat-4.1.24\server\default\lib\activation.jar;C:\java_env\jboss\jboss-3.2.2RC1_tomcat-4.1.24\server\default\tmp\deploy\tmp61245servlets-default.jar;C:\java_env\jboss\jboss-3.2.2RC1_tomcat-4.1.24\server\default\deploy\http-invoker.sar\invoker.war;C:\java_env\jboss\jboss-3.2.2RC1_tomcat-4.1.24\server\default\tmp\deploy\tmp61252jboss-xa-jdbc.rar-contents\jboss-xa-jdbc.jar;C:\java_env\jboss\jboss-3.2.2RC1_tomcat-4.1.24\server\default\tmp\deploy\tmp61234naming-resources.jar;C:\java_env\jboss\jboss-3.2.2RC1_tomcat-4.1.24\server\default\lib\jpl-pattern.jar;C:\java_env\jboss\jboss-3.2.2RC1_tomcat-4.1.24\server\defa?

....

Leonid.

• 1. Re: Tomcat can't compile JSP

I'm replying to myself in case it can be usefull to somebody else.
I found the problem. Looks like Tomcat could not find javac.exe. When i added %JAVA_HOME%\bin to the PATH it started to work.

• 2. Re: Tomcat can't compile JSP

In the web.xml in the SAR, you can configure Jasper. Here, you can try to set the "fork" parameter to "false".

Remy

• 3. Re: Tomcat can't compile JSP

Just tried it myself. This was preventing me from using JBoss+TomCat for the longest time. And I am glad to say that it works well. Thanks for the info.

• 4. Re: Tomcat can't compile JSP

Save problem using Jetty. Same solution. Thanks for the follow-up post.