You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Michael McGrady <mi...@michaelmcgrady.com> on 2004/08/19 21:28:32 UTC
Code Too Large for Try Statement in Catalina
I have the following error:
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: -1 in the jsp file: null
Generated servlet error:
[javac] Compiling 1 source file
C:\crackwillow\work\Catalina\localhost\_\pallet_jsp.java:12934: code too large for try statement
} catch (Throwable t) {
^
C:\crackwillow\work\Catalina\localhost\_\pallet_jsp.java:30: code too large for try statement
try {
^
C:\crackwillow\work\Catalina\localhost\_\pallet_jsp.java:17: code too large
public void _jspService(HttpServletRequest request, HttpServletResponse response)
^
3 errors
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:130)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:293)
org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:340)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:352)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:474)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:184)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
com.crackwillow.filter.GZIPFilter.doFilter(GZIPFilter.java:20)
Is there anything to do? I need this file to be a JSP file in Struts.
Michael
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
Re: Code Too Large for Try Statement in Catalina
Posted by Michael McGrady <mi...@michaelmcgrady.com>.
Thanks, Peter,
I am using Tomcat 5.0. What do you mean by "reorganize" my JSP? Can I
write the JSP with an include that pulls in the code? What I have is a
color pallet which needs to be in one piece and is 338 kb in size.
Thanks, again,
Michael
Peter Lin wrote:
>the only way is to reorganize your jsp. this is an old issue dating
>back quite a bit. are you using tomcat4 or 5?
>
>if you're using tc4, I would recommend upgrading to tc4.1.x or 5.x.
>the original jasper generated code which would easily exceed the
>limit. the newer jasper2 which is used with tc4.1.x and 5.x does a
>much better job.
>
>peter
>
>On Thu, 19 Aug 2004 12:28:32 -0700, Michael McGrady
><mi...@michaelmcgrady.com> wrote:
>
>
>>I have the following error:
>>
>>org.apache.jasper.JasperException: Unable to compile class for JSP
>>
>>An error occurred at line: -1 in the jsp file: null
>>
>>Generated servlet error:
>> [javac] Compiling 1 source file
>>
>>C:\crackwillow\work\Catalina\localhost\_\pallet_jsp.java:12934: code too large for try statement
>> } catch (Throwable t) {
>> ^
>>C:\crackwillow\work\Catalina\localhost\_\pallet_jsp.java:30: code too large for try statement
>> try {
>> ^
>>C:\crackwillow\work\Catalina\localhost\_\pallet_jsp.java:17: code too large
>> public void _jspService(HttpServletRequest request, HttpServletResponse response)
>> ^
>>3 errors
>>
>> org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:130)
>> org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:293)
>> org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:340)
>> org.apache.jasper.compiler.Compiler.compile(Compiler.java:352)
>> org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:474)
>> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:184)
>> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
>> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
>> javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
>> com.crackwillow.filter.GZIPFilter.doFilter(GZIPFilter.java:20)
>>
>>Is there anything to do? I need this file to be a JSP file in Struts.
>>
>>Michael
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
>>
>>
>>
>>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
>
>
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
Re: Code Too Large for Try Statement in Catalina
Posted by Peter Lin <wo...@gmail.com>.
the only way is to reorganize your jsp. this is an old issue dating
back quite a bit. are you using tomcat4 or 5?
if you're using tc4, I would recommend upgrading to tc4.1.x or 5.x.
the original jasper generated code which would easily exceed the
limit. the newer jasper2 which is used with tc4.1.x and 5.x does a
much better job.
peter
On Thu, 19 Aug 2004 12:28:32 -0700, Michael McGrady
<mi...@michaelmcgrady.com> wrote:
> I have the following error:
>
> org.apache.jasper.JasperException: Unable to compile class for JSP
>
> An error occurred at line: -1 in the jsp file: null
>
> Generated servlet error:
> [javac] Compiling 1 source file
>
> C:\crackwillow\work\Catalina\localhost\_\pallet_jsp.java:12934: code too large for try statement
> } catch (Throwable t) {
> ^
> C:\crackwillow\work\Catalina\localhost\_\pallet_jsp.java:30: code too large for try statement
> try {
> ^
> C:\crackwillow\work\Catalina\localhost\_\pallet_jsp.java:17: code too large
> public void _jspService(HttpServletRequest request, HttpServletResponse response)
> ^
> 3 errors
>
> org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:130)
> org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:293)
> org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:340)
> org.apache.jasper.compiler.Compiler.compile(Compiler.java:352)
> org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:474)
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:184)
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
> com.crackwillow.filter.GZIPFilter.doFilter(GZIPFilter.java:20)
>
> Is there anything to do? I need this file to be a JSP file in Struts.
>
> Michael
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
Re: Code Too Large for Try Statement in Catalina
Posted by Peter Lin <wo...@gmail.com>.
what I meant was what Tim said.
peter
On Thu, 19 Aug 2004 12:59:59 -0700, Michael McGrady
<mi...@michaelmcgrady.com> wrote:
> Thanks, Tim,
>
> The file actually is quite simple. It is a simple form with HTML radio
> buttons for choosing colors. There are a LOT of colors, but the code is
> pretty straightforward. I need to get the code into a JSP file so that
> I can utilize Struts.
>
> Michael
>
>
>
> Tim Funk wrote:
>
> > 1) don't use compile time includes
> > 2) split your page into multiple files which can use jsp_includes. Any
> > file which needs to be this big is probably extrememly painful to debug.
> > 3) followup to tomcat-user, not tomcat-dev
> >
> > -Tim
> >
> > Michael McGrady wrote:
> >
> >> I have the following error:
> >>
> >> org.apache.jasper.JasperException: Unable to compile class for JSP
> >>
> >> An error occurred at line: -1 in the jsp file: null
> >>
> >> Generated servlet error:
> >> [javac] Compiling 1 source file
> >>
> >> C:\crackwillow\work\Catalina\localhost\_\pallet_jsp.java:12934: code
> >> too large for try statement
> >> } catch (Throwable t) {
> >> ^
> >> C:\crackwillow\work\Catalina\localhost\_\pallet_jsp.java:30: code too
> >> large for try statement
> >> try {
> >> ^
> >> C:\crackwillow\work\Catalina\localhost\_\pallet_jsp.java:17: code too
> >> large
> >> public void _jspService(HttpServletRequest request,
> >> HttpServletResponse response)
> >> ^
> >> 3 errors
> >>
> >>
> >>
> >> org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:130)
> >>
> >>
> >> org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:293)
> >>
> >> org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:340)
> >> org.apache.jasper.compiler.Compiler.compile(Compiler.java:352)
> >>
> >> org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:474)
> >>
> >>
> >> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:184)
> >>
> >>
> >> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
> >> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
> >> javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
> >> com.crackwillow.filter.GZIPFilter.doFilter(GZIPFilter.java:20)
> >>
> >> Is there anything to do? I need this file to be a JSP file in Struts.
> >>
> >> Michael
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> >> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
> >>
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
> >
> >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
Re: Code Too Large for Try Statement in Catalina
Posted by Michael McGrady <mi...@michaelmcgrady.com>.
Thanks, Tim,
The file actually is quite simple. It is a simple form with HTML radio
buttons for choosing colors. There are a LOT of colors, but the code is
pretty straightforward. I need to get the code into a JSP file so that
I can utilize Struts.
Michael
Tim Funk wrote:
> 1) don't use compile time includes
> 2) split your page into multiple files which can use jsp_includes. Any
> file which needs to be this big is probably extrememly painful to debug.
> 3) followup to tomcat-user, not tomcat-dev
>
> -Tim
>
> Michael McGrady wrote:
>
>> I have the following error:
>>
>> org.apache.jasper.JasperException: Unable to compile class for JSP
>>
>> An error occurred at line: -1 in the jsp file: null
>>
>> Generated servlet error:
>> [javac] Compiling 1 source file
>>
>> C:\crackwillow\work\Catalina\localhost\_\pallet_jsp.java:12934: code
>> too large for try statement
>> } catch (Throwable t) {
>> ^
>> C:\crackwillow\work\Catalina\localhost\_\pallet_jsp.java:30: code too
>> large for try statement
>> try {
>> ^
>> C:\crackwillow\work\Catalina\localhost\_\pallet_jsp.java:17: code too
>> large
>> public void _jspService(HttpServletRequest request,
>> HttpServletResponse response)
>> ^
>> 3 errors
>>
>>
>>
>> org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:130)
>>
>>
>> org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:293)
>>
>> org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:340)
>> org.apache.jasper.compiler.Compiler.compile(Compiler.java:352)
>>
>> org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:474)
>>
>>
>> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:184)
>>
>>
>> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
>> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
>> javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
>> com.crackwillow.filter.GZIPFilter.doFilter(GZIPFilter.java:20)
>>
>> Is there anything to do? I need this file to be a JSP file in Struts.
>>
>> Michael
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
Re: Code Too Large for Try Statement in Catalina
Posted by Tim Funk <fu...@joedog.org>.
1) don't use compile time includes
2) split your page into multiple files which can use jsp_includes. Any file
which needs to be this big is probably extrememly painful to debug.
3) followup to tomcat-user, not tomcat-dev
-Tim
Michael McGrady wrote:
> I have the following error:
>
> org.apache.jasper.JasperException: Unable to compile class for JSP
>
> An error occurred at line: -1 in the jsp file: null
>
> Generated servlet error:
> [javac] Compiling 1 source file
>
> C:\crackwillow\work\Catalina\localhost\_\pallet_jsp.java:12934: code too
> large for try statement
> } catch (Throwable t) {
> ^
> C:\crackwillow\work\Catalina\localhost\_\pallet_jsp.java:30: code too
> large for try statement
> try {
> ^
> C:\crackwillow\work\Catalina\localhost\_\pallet_jsp.java:17: code too large
> public void _jspService(HttpServletRequest request, HttpServletResponse
> response)
> ^
> 3 errors
>
>
> org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:130)
>
> org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:293)
>
> org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:340)
> org.apache.jasper.compiler.Compiler.compile(Compiler.java:352)
> org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:474)
>
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:184)
>
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
>
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
> com.crackwillow.filter.GZIPFilter.doFilter(GZIPFilter.java:20)
>
> Is there anything to do? I need this file to be a JSP file in Struts.
>
> Michael
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org