aspose file tools*
The moose likes JSP and the fly likes 'code too large for try statement'-error message Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark " Watch " New topic
Author

'code too large for try statement'-error message

Peter Karbusicky
Greenhorn

Joined: Feb 16, 2005
Posts: 1
I am involved in supervising a JavaServer-Pages-Application.
Everything worked out perfectly since about 2 years, but now we suddenly
get the following error message when our jsp-files are being compiled :

'code too large for try statement'

I've read somewhere, that actually there is a limit of 64K for such a try-code-segment, but however - is there an opportunity of increasing this limit up to a higher boundary ?
Maybe some configuration-parameter within the compiler or something like that ?
Senthil B Kumar
Ranch Hand

Joined: Feb 09, 2004
Posts: 140
What Web/App Server you are running with.

If its Weblogic 8.1 please look at the below URL.

http://www.theserverside.com/discussions/thread.tss?thread_id=28758

Few suggested Solutions over there are:

1. Refactor the JSP page into smaller page and use include directive

2.Use the -noTryBlocks switch for JSPC, see
http://e-docs.bea.com/wls/docs61/jsp/reference.html

3. Try the solution suggested at
http://support.bea.com/application?namespace=askbea&origin=ask_bea_answer.jsp&event=link.view_answer_page_solution&answerpage=solution&page=wls/S-26541.htm


Work like you don't need the money. Love like you've never been hated. Dance like nobody's watching. Sing like nobody's listening. Live like it's Heaven on Earth.
Currently I Reside Here WEBlog
Sumit Deshpande
Ranch Hand

Joined: Jan 10, 2005
Posts: 38
Hi,

Pls let me know if this is specifically related to WebLogic 8.1 ... I have a file with around 1500 lines inside a try block and its working fine on 7.1

Regards,
Sumit.
Steven Bell
Ranch Hand

Joined: Dec 29, 2004
Posts: 1071
1500 lines in a try block???

maybe you should submit some of that here
Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
Refactoring is my best bet.
Sumit Deshpande
Ranch Hand

Joined: Jan 10, 2005
Posts: 38
I do agree that this jsp file with 1500 lines inside a try block is totally against the norms ...
Just to complete the discussion, this problem arises on WL 8.1 SP3.
It seems to be working fine with SP1 and SP2.

Regards,
Swapnil.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: 'code too large for try statement'-error message