Knowledgebase:
HTTP Status 500 - Unable to compile class for JSP error in FileCatalyst Workflow.
Posted by , Last modified by Aly Essa on 22 March 2017 09:57 AM

Overview:  

When trying to create a new job in FileCatalyst Workflow after an upgrade or a fresh install an error is generated:

HTTP Status 500 - Unable to compile class for JSP:
type Exception report
message Unable to compile class for JSP:
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:

An error occurred at line: [244] in the generated java file: [/fftdata/apache-tomcat-8.0.41/work/Catalina/localhost/ROOT/org/apache/jsp/jsp/editPrintJob_jsp.java]

The code of method _jspService(HttpServletRequest, HttpServletResponse) is exceeding the 65535 bytes limit.

Stacktrace found in the Workflow System logs:

org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:102)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:198)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:457)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:361)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:336)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:323)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:585)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:363)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:396)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:340)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
org.apache.struts.action.ActionServlet.processActionForward(Unknown Source)
unlimited.core.g.h.process(Unknown Source)
unlimited.core.g.h.doGet(Unknown Source)
javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
unlimited.core.b.ai.doFilter(Unknown Source)
note The full stack trace of the root cause is available in the Apache Tomcat/8.0.41 logs.

Environment: 

FileCatalyst Workflow v4.9.6 and later.

Apache Tomcat v7.0 and v8.0 only.

Resolution: 

Locate the file /<Tomcat_Home>/conf/web.xml and search the file for JspServlet. This should return an xml node of <servlet> containing some <init-param> values. You will need to add an additional <init-param> the same as the below:

<init-param>
<param-name>mappedfile
<param-value>false
</init-param>


The resulting block of the web.xml file, once you have inserted the above, should look like the code below:

<servlet>

<servlet-name>jsp
<servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
<init-param>
<param-name>fork</param-name>
<param-value>false</param-value>
</init-param>
<init-param>
<param-name>xpoweredBy</param-name>
<param-value>false</param-value>
</init-param>
<init-param>
<param-name>mappedfile</param-name>
<param-value>false</param-value>
</init-param>
<load-on-startup>3</load-on-startup>
</servlet> 

Once the changes are made, save the file and restart the Tomcat service.

For the full article on this solution please go to https://www.assetbank.co.uk/support/documentation/knowledge-base/byte-limit-exceeded-error/