Tuesday, 18 October 2011

Jetty8 Snow Leopard org.apache.jasper.JasperException: PWC6033: Error in Javac compilation for JSP

Argh!
I have a dinky app with an index.jsp.
Create a war and deploy to Tomcat on Snow Leopord.
No problem.
Create a war and deploy to Tomcat on Ubuntu.
No problem.
Deploy to GF3 on Snow Leopard.
No problem.
Deploy to GF3 on Ubuntu.
No problem.
Deploy to Jetty7 or Jetty8 on Ubuntu.
No problem.
Deploy to Jetty7 or Jetty 8 on Snow Leopard and:

Oct 17, 2011 5:37:49 PM org.apache.jasper.compiler.Compiler generateClass
SEVERE: Error compiling file: /private/var/folders/dd/dd3VsetWHLuS+PT+sxCe+k+++TI/-Tmp-/jetty-0.0.0.0-8083-com.myapp.war-_com.myapp-any-/jsp/org/apache/jsp/index_jsp.java
424497 [qtp1681653767-16] WARN org.eclipse.jetty.servlet.ServletHandler - /com.myapp/
org.apache.jasper.JasperException: PWC6033: Error in Javac compilation for JSP

PWC6199: Generated servlet error:
string:///index_jsp.java:6: package com.myapp does not exist

PWC6199: Generated servlet error:
string:///index_jsp.java:7: package com.myapp does not exist

PWC6197: An error occurred at line: 10 in the jsp file: /index.jsp
PWC6199: Generated servlet error:
string:///index_jsp.java:52: cannot find symbol
symbol : class SomeProperties
location: class org.apache.jsp.index_jsp

PWC6197: An error occurred at line: 10 in the jsp file: /index.jsp
PWC6199: Generated servlet error:
string:///index_jsp.java:52: cannot find symbol
symbol : variable AResource
location: class org.apache.jsp.index_jsp


at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:126)
at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:296)
at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:372)
...etc...

The thing that should ring alarm bells is that /private/var/folders... stuff.
The trick is to:

cd [your jetty install]
mkdir work

That's it.
It's that retar... er... *unique* /tmp folder that seems to be causing the problem.
You could set the java.io.tmpdir to something meaningful as well.

See: http://wiki.eclipse.org/Jetty/Reference/Temporary_Directories for more information.

No comments:

Post a comment