Unable to Compile Class for JSP

Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.

Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles for non-Data Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Symptoms

Catalina.log file shows the following error:

Jun 21, 2010 8:14:18 AM org.apache.catalina.core.ApplicationDispatcher invoke
SEVERE: Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: Unable to compile class for JSP: 
An error occurred at line: 156 in the jsp file: /500page.jsp
Type mismatch: cannot convert from StackTraceElement to String

If you are having this issue with Crowd, you may find the following error on atlassian-crowd.log:

2012-08-01 21:16:03,891 http-8095-2 ERROR [500ErrorPage] Exception caught in 500 page Unable to compile class for JSP
org.apache.jasper.JasperException: Unable to compile class for JSP

Cause

The Tomcat container caches .java and .class files generated by the JSP parser, which are used by the web application. Sometimes these get corrupted or cannot be found. This may occur after a patch or upgrade that contains modifications to JSPs.

Resolution for Confluence

  1. STOP confluence
  2. Delete the <CONFLUENCE_INSTALL>/work folder (or <CATALINA_BASE/work if not using a Standalone install).
  3. Verify the user running the CONFLUENCE application process has Read/Write permission to the <CONFLUENCE_INSTALL>/work directory.
  4. Restart Confluence to rebuild the files.

Resolution for Crowd

  1. STOP Crowd
  2. Delete the <CROWD_INSTALL>/apache-tomcat/work/ folder (or <CATALINA_BASE/work if not using a Standalone install).
  3. Verify the user running the CROWD application process has Read/Write permission to the <CROWD_INSTALL>/apache-tomcat/work directory.
  4. Restart Crowd to rebuild the files.

Last modified on Dec 18, 2024

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.