掲示板

code too large__PWC6199 in DXP with Weblogic 12c

thumbnail
6年前 に krishna mohan mathakala によって更新されました。

code too large__PWC6199 in DXP with Weblogic 12c

Junior Member 投稿: 68 参加年月日: 12/09/08 最新の投稿
Hi I am using the Liferay DXP with Weblogic 12c . I deployed a portlet module which has several jsp pages. I have included many jsp pages in a single jsp using the
<% @include file=""%>
. It deploys fine in the container. but when I access the portlet on a portal page I am getting the following error.


org.apache.jasper.JasperException: PWC6033: Error in Javac compilation for JSP__PWC6199: Generated servlet error:_code too large for try statement__PWC6199: Generated servlet error:_code too large for try statement__PWC6199: Generated servlet error:_code too large__PWC6199: Generated servlet error:_view_jsp.java uses or overrides a deprecated API.__PWC6199: Generated servlet error:_Recompile with -Xlint:deprecation for details.__PWC6199: Generated servlet error:_view_jsp.java uses unchecked or unsafe operations.__PWC6199: Generated servlet error:_Recompile with -Xlint:unchecked for details.__ [Sanitized]
at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:129)



The same project structure is working fine in Liferay 6.2 with weblogic server 10.3.6
thumbnail
6年前 に David H Nebinger によって更新されました。

RE: code too large__PWC6199 in DXP with Weblogic 12c

Liferay Legend 投稿: 14916 参加年月日: 06/09/02 最新の投稿
Have you opened a LESA ticket on this yet?









Come meet me at 2017 LSNA!
thumbnail
6年前 に Jorge Díaz によって更新されました。

RE: code too large__PWC6199 in DXP with Weblogic 12c

Liferay Master 投稿: 753 参加年月日: 14/01/09 最新の投稿
That it is a java limitation of JSP files, see: http://www-01.ibm.com/support/docview.wss?uid=swg21177375
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 refactor the code into smaller methods or try/catch blocks.

For more information, please refer to the Java Virtual Machine Specification


About why the same code works in Liferay 6.2 but not in Liferay 7, there are some differences that can change the behavior:
  • Weblogic version is different (10.3.6 vs 12)
  • In Liferay 6.2 JSP files are compiled by application server, but in Liferay 7 JSP files are compiled by Liferay itself using Jasper.

A final help: I have also found following post with a similar error, but it is very old, perhaps you can apply same solution.
https://web.liferay.com/community/forums/-/message_boards/message/5223532