| Author |
JSP Compilation Error with Weblogic 9.2
|
srini Raman
Ranch Hand
Joined: Oct 16, 2006
Posts: 33
|
|
Hi,
We are using weblogic.jspc compiler for compiling our jsps . With 9.2 JRockIt compiler (in windows) and with Sun and JRockIT(in Linux) it reports “code to large to compile” on try blocks (of generated java code). The error is not consistent. It fails on one file and stops.If we do it again it breaks on another file. Our JSP files were compiled fine with 8.1 weblogic compiler.Can you help?
PS:Breaking up JSPs may not be feasible given we have large number of jsp files.
THanks,
Srini
|
 |
srini Raman
Ranch Hand
Joined: Oct 16, 2006
Posts: 33
|
|
Hi,
One more thing I want to add . From Forums I came to know there is 64K limitation in try catch block of generated JAVA files.Can you tell me what is the upper limit of JSP files?
Thanks,
Srini
|
 |
Deepak Bala
Bartender
Joined: Feb 24, 2006
Posts: 6588
|
|
srini Raman wrote:Hi,
One more thing I want to add . From Forums I came to know there is 64K limitation in try catch block of generated JAVA files.Can you tell me what is the upper limit of JSP files?
Thanks,
Srini
Refactor the code and split the code in try catch into multiple method calls.
The problem probably is that weblogic 8.2 did not insert as much code into your try catch as weblogic 9.2. Do you have a try catch in your application template ? Can you instead configure a 500 error document in web.xml and display that to the user ? What are you doing once the error is caught ?
|
SCJP 6 articles - SCJP 5/6 mock exams - SCJP Mocks - SCJP 5 Mock exam (Word document ) - SCJP 5 Mock exam in Java.Inquisition format
|
 |
srini Raman
Ranch Hand
Joined: Oct 16, 2006
Posts: 33
|
|
Hi,
We are doing pre-compilation of JSPs as part of our build.So our build breaks with these kind of error messages(One at a time.If we get all the 'problemetic jsps' at one shot it would be helpful). We don't have any try/catch in our JSP files.But weblogic puts our JSP file content inside try/catch block. The limitation is on try/catch block size(64KB). We even don't know what is the upper limit for JSP files. Refactoring may a be tedious task given we have many JSP files.
Thanks,
Srini
|
 |
Deepak Bala
Bartender
Joined: Feb 24, 2006
Posts: 6588
|
|
srini Raman wrote:Hi,
We are doing pre-compilation of JSPs as part of our build.So our build breaks with these kind of error messages(One at a time.If we get all the 'problemetic jsps' at one shot it would be helpful). We don't have any try/catch in our JSP files.But weblogic puts our JSP file content inside try/catch block. The limitation is on try/catch block size(64KB). We even don't know what is the upper limit for JSP files. Refactoring may a be tedious task given we have many JSP files.
Thanks,
Srini
I dont think you have a way around that. If your JSP has become too large to compile, there is nothing that the weblogic server can do since it is bound to the JLS specification.
Here is a link that might help
Code too large to compile
If I find another way to solve this I ll post it here
|
 |
bridgette sweneli
Greenhorn
Joined: Aug 21, 2009
Posts: 1
|
|
|
This is actually a limitation of the JVM, based on it's specification. It is not exactly advertised, but the maximum size of a compiled method(i.e. bytecode size) in Java cannot exceed 64k. Since you are using JSPs, the methods are generated automatically by the interpreter. Simply put, your JSP is too large for this particular environment. Since interpreters and compilers may vary across servers, your code may run successfully in one environment, but fail in another. If your JSPs that fail to compile/run contain <%@ include ...> directives, they should be replaced with <jsp:include> because what is included using <jsp:include> will be compiled into its own servlet class file, thereby shrinking the size of the main file(and therefore the size of the jsp_service method). If you are not using any includes in your JSPs and they continue to fail, they will need to be broken up into smaller JSPs and then included in the main page.
|
 |
 |
|
|
subject: JSP Compilation Error with Weblogic 9.2
|
|
|