You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Turoff, Steve" <St...@tenethealth.com> on 2003/05/23 19:29:33 UTC
code too large for try statement
Greetings,
I am running Tomcat 4.1.24 and Apache/1.3.19 (Unix) on Redhat 7.1. I recently made some modifications to a JSP page and am now getting the following error:
Generated servlet error:
[javac] Since fork is true, ignoring compiler setting.
[javac] Compiling 1 source file
[javac] Since fork is true, ignoring compiler setting.
[javac] /var/jakarta-tomcat-4.1.24/work/Standalone/localhost/_/index_jsp.java:7265: code too large for try statement
[javac] } catch (Throwable t) {
[javac] ^
[javac] /var/jakarta-tomcat-4.1.24/work/Standalone/localhost/_/index_jsp.java:131: code too large for try statement
[javac] try {
[javac] ^
[javac] 2 errors
The jsp in question contains many blocks such as:
<% if (someVariable.equals("someValue")) { %>
<%@ include file="/some/file.jsp" %>
<%@ include file="/some/otherfile.jsp" %>
<%@ include file="/some/otherotherfile.jsp" %>
<% } %>
If I remove a few of the included files, the page works fine. It doesn't matter which included files I remove. Is there a limit to the size of a jsp page?
In /var/jakarta-tomcat-4.1.24/work/Standalone/localhost/_/index_jsp.java:134, I see
pageContext = _jspxFactory.getPageContext(this, request, response,
null, true, 8192, true);
Am I getting this error because the buffer (8192) is too small? If so, how do I increase it?
Stacktrace is below.
Thanks,
Steve
at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:130)
at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java(Compiled Code))
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:370)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:473)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:190)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java(Compiled Code))
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java(Compiled Code))
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java(Compiled Code))
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java(Compiled Code))
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java(Compiled Code))
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java(Compiled Code))
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java(Compiled Code))
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java(Compiled Code))
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java(Compiled Code))
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java(Compiled Code))
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java(Compiled Code))
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java(Compiled Code))
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java(Compiled Code))
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java(Compiled Code))
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java(Compiled Code))
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java(Compiled Code))
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java(Compiled Code))
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java(Compiled Code))
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java(Compiled Code))
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java(Compiled Code))
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java(Compiled Code))
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java(Compiled Code))
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java(Compiled Code))
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java(Compiled Code))
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java(Compiled Code))
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java(Compiled Code))
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java(Compiled Code))
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java(Compiled Code))
at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java(Compiled Code))
at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:679)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
at java.lang.Thread.run(Thread.java:566)
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: code too large for try statement
Posted by Tim Funk <fu...@joedog.org>.
For the sake of sanity in debugging, can you refactor to do this:
<% if (someVariable.equals("someValue")) { %>
<jsp:include page="/some/file.jsp" />
<jsp:include page="/some/otherfile.jsp" />
<jsp:include page="/some/otherotherfile.jsp" />
<% } %>
I beleive, your code is creating one GIGANTIC java file which is over some
limits of the java language. It has nothing to do with bufferSize.
-Tim
Turoff, Steve wrote:
> Greetings,
>
> I am running Tomcat 4.1.24 and Apache/1.3.19 (Unix) on Redhat 7.1. I recently made some modifications to a JSP page and am now getting the following error:
>
> Generated servlet error:
> [javac] Since fork is true, ignoring compiler setting.
> [javac] Compiling 1 source file
> [javac] Since fork is true, ignoring compiler setting.
> [javac] /var/jakarta-tomcat-4.1.24/work/Standalone/localhost/_/index_jsp.java:7265: code too large for try statement
> [javac] } catch (Throwable t) {
> [javac] ^
> [javac] /var/jakarta-tomcat-4.1.24/work/Standalone/localhost/_/index_jsp.java:131: code too large for try statement
> [javac] try {
> [javac] ^
> [javac] 2 errors
>
> The jsp in question contains many blocks such as:
>
> <% if (someVariable.equals("someValue")) { %>
> <%@ include file="/some/file.jsp" %>
> <%@ include file="/some/otherfile.jsp" %>
> <%@ include file="/some/otherotherfile.jsp" %>
> <% } %>
>
> If I remove a few of the included files, the page works fine. It doesn't matter which included files I remove. Is there a limit to the size of a jsp page?
>
> In /var/jakarta-tomcat-4.1.24/work/Standalone/localhost/_/index_jsp.java:134, I see
>
> pageContext = _jspxFactory.getPageContext(this, request, response,
> null, true, 8192, true);
>
> Am I getting this error because the buffer (8192) is too small? If so, how do I increase it?
>
> Stacktrace is below.
>
> Thanks,
>
> Steve
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org