본문 바로가기
IBM - old/WAS 문제&해결

JSP compile 시에 해당 method 가 65535 bytes 한계를 넘으면서 JSPG0049E 발생

by freeman98 2016. 5. 9.

1. WAS 버전 : WebSphere ND v6.1 이상

2. OS : All

3. Error 발생 시점 :  JSP 처음으로 실행할 때 compile 중에 Exception 발생

4. Error message :
JSPG0049E: /xxxxx/AAA.jsp이(가) 완료 실패 : W:IBM_AAA.java : 891 : The code of method _jspService(HttpServletRequest, HttpServletResponse) is exceeding the 65535 bytes limit

5. 예상 이유 :
 Java 에서 하나의 Method 의 최대 사이즈는 64K 넘지 말아야 하는 제한이 걸려있습니다.
 해당 Exception 은 JSP 가 compile 되면서 해당 제한 조건을 위반해서 발생합니다.

6. 조치 방안 :
 JSP 를 나누어 주시거나 com.ibm.wsspi.jsp.disableResourceInjection 을 적용하여 compile 되는 java method 사이즈를
 64K 이내로 줄여야 합니다. 좀 더 자세한 사항은 하단의 링크를 참조하시기 바라겠습니다.

http://publib.boulder.ibm.com/infocenter/wasinfo/v7r0/index.jsp?topic=/com.ibm.websphere.nd.iseries.doc/info/iseriesnd/ae/rweb_custom_props.html

com.ibm.wsspi.jsp.disableResourceInjection
[Fix Pack 11 or later]

The resource injection feature accesses resources in applications differently then it did in earlier versions of the product, and causes the compiled method output to be larger than it was previously. If you have large JSPs that in earlier releases pushed the 65535 byte limit in the translated service method, they might now exceed this limit, causing the compile to fail

If you encounter this situation, you can either break a large JSP into smaller JSPs, and use <jsp:include> statements to combine them after they are compiled, or you can add the com.ibm.wsspi.jsp.disableResourceInjection custom property to your Web container settings to disable the resource injection function during the JSP translation process. When the com.ibm.wsspi.jsp.disableResourceInjection custom property is set to true, the resource injection function is disabled for all applications.

If you only want to disable the resource injection function for specific applications, you can add the disableResourceInjection JSP attribute to the ibm-web-ext.xmi files for those specific applications.

The default value for the com.ibm.wsspi.jsp.disableResourceInjection custom property is false.
Name     Value
com.ibm.wsspi.jsp.disableResourceInjection     true

댓글