How do I fix a 65535 bytes limit Stacktrace?

It is possible that after an upgrade you may encounter this error on some of the more complex pages of Asset Bank, such as the Asset Detail page. If you see a stack trace on the screen the same as the one below then you can add a configuration setting to Tomcat to stop it.

org.apache.jasper.JasperException: Unable to compile class for JSP:  An error occurred at line: 307 in the generated java file The code of method _jspService (HttpServletRequest, HttpServletResponse) is exceeding the 65535 bytes limit Stacktrace:  at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92)  at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)  at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:439)  at org.apache.jasper.compiler.Compiler.compile(Compiler.java:334)  at org.apache.jasper.compiler.Compiler.compile(Compiler.java:312)  at org.apache.jasper.compiler.Compiler.compile(Compiler.java:299)  at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:589)  at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)  at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)  at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)  at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)  at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)  at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)  at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)  at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)  at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1085)  at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:398)  at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:241)  at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)  at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)

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-name>
<param-value>false</param-value>
</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-name>
<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> 

Save the file and restart the Tomcat service.


Was this article helpful?

Yes No

Thanks for your feedback!