"code too large for try statement" error while compiling a JSP
 Technote (FAQ)
 
Problem
How do you avoid a code too large for try statement error message while compiling JavaServer Pages (JSP)?
 
Solution
The Java™ specification states that there is a 64K limit on the size of methods in Java. The JVM does not execute methods that exceed this limit.

It is possible to compile methods larger than 64K, but the JVM will not run these methods. Consequently, the error occurs during runtime, while attempting to execute Java methods that are greater than 64K.

A code too large for try statement error can still be issued while compiling a JSP. The compiler limitation does not allow try/catch blocks to have a start or end location greater than 64K into the method code. Therefore, compiler limitations are usually caught when a try/catch block overlaps the 64K boundary.

The workaround is to refractor the code into smaller methods or try/catch blocks.

For more information, please refer to the Java Virtual Machine Specification
 
 
Cross Reference information
Segment Product Component Platform Version Edition
Application Servers WebSphere Application Server JSP
Application Servers Runtimes for Java Technology Java SDK
 
 


Document Information


Product categories: Software > Application Servers > Distributed Application & Web Servers > WebSphere Application Server > Java SDK
Operating system(s): Windows
Software version: 6.0
Software edition:
Reference #: 1177375
IBM Group: Software Group
Modified date: Jun 24, 2005