一个JSP编译错误的解决:JAVAC MESSAGE FILE IS BROKEN: key=javac.err.branch.too.big

原创 2006年05月17日 13:33:00
日志中提示如下错误:
[06-5-17 9:09:40:391 CST] 1a9f74ca WebGroup      E SRVE0026E: [Servlet 错误]-[无法编译 JSP 类
D:/IBM/WebSphere/AppServer/temp/zxsjk7/server1/ai_war/ai.war/home/_main.java:14: JAVAC MESSAGE FILE IS BROKEN: key=javac.err.branch.too.big, arguments=null, null, null
public class _main extends com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase {
             ^
1 个错误
]:org.apache.jasper.JasperException: 无法编译 JSP 类
D:/IBM/WebSphere/AppServer/temp/zxsjk7/server1/ai_war/ai.war/home/_main.java:14: JAVAC MESSAGE FILE IS BROKEN: key=javac.err.branch.too.big, arguments=null, null, null
public class _main extends com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase {
             ^
1 个错误

    at org.apache.jasper.compiler.Compiler.compile(Compiler.java:369)
    at org.apache.jasper.compiler.Compiler.compile(Compiler.java:129)
    at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.compile(JspServlet.java:1003)
    at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.loadJSP(JspServlet.java:925)
    at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:287)
    at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:317)
    at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet.java:700)
    at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java:798)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
    at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java(Compiled Code))
    at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java(Compiled Code))
    at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java(Compiled Code))
    at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java(Inlined Compiled Code))
    at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java(Compiled Code))
    at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java(Compiled Code))
    at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java(Inlined Compiled Code))
    at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java(Compiled Code))
    at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java(Compiled Code))
    at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java(Compiled Code))
    at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java(Compiled Code))
    at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java(Compiled Code))
    at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java(Compiled Code))
    at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java(Compiled Code))
    at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java(Compiled Code))
    at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java(Compiled Code))
    at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java(Compiled Code))
    at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java(Compiled Code))
    at com.ibm.ws.http.HttpConnection.run(HttpConnection.java(Compiled Code))
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code))
解决方法及相关信息如下:(原文URL:http://www-1.ibm.com/support/docview.wss?rs=180&context=SSEQTP&q1=1170472&uid=swg21170472&loc=en_US&cs=utf-8&lang=en+en)

Technote (FAQ)
 
Problem
A JavaServer Pages™ (JSP™) page compilation may fail with the error message "JAVAC MESSAGE FILE IS BROKEN: key=javac.err.branch.too.big" or "code too large for try statement". 
 
Cause 
There is a limitation of 65536 bytes (64K) on the amount of code per non-native, non-abstract method in Java® SDK classes. If a JSP page is translated into a Java class in which this limit is exceeded, the Java compiler will issue a "JAVAC MESSAGE FILE IS BROKEN: key=javac.err.branch.too.big" or "code too large for try statement" message, and the JSP compilation will fail. The JVM method size limit of 64K cannot be increased.

Refer to the "4.10 Limitations of Java Virtual Machines" section in http://java.sun.com/docs/books/vmspec/2nd-edition/html/ClassFile.doc.html

 
 
Solution
Browser-based compilation on WebSphere Application Server V4.0 and V5.0 releases

Set the JVM™ system property com.sun.tools.javac.main.largebranch to true. After setting this property to true, restart the server and request the JSP. If this compilation error persists after correctly setting this property, restarting the server and requesting the JSP, see Best practices for reducing the size of the service method in generated JSP class files

To change the system property in WebSphere Application Server V4.0 releases:
Go to the administrative console.
Select WebSphere Administrative Domain > Nodes > your_node_name > Application Servers > your_application_server
On the right, click JVM Settings.
Under System Properties, click Add.
Under name specify com.sun.tools.javac.main.largebranch without quotes and under value specify true without quotes.
Click Apply.
Restart the Application Server to pickup the changes.

To change the system property in WebSphere Application Server V5.0 releases:
In the administrative console, expand Servers, then click Application Servers.
Select the Application Server.
In the Additional Properties section, click Process Definition.
Click Java Virtual Machine.
Click Custom Properties.
Click New.
Under name specify com.sun.tools.javac.main.largebranch without quotes and under value specify true without quotes.
Click Apply.
At the top of the administrative console, click Save to save your changes.
Stop and restart the Application Server.


Browser-based compilation on WebSphere Application Server V5.1 releases

There is no further optimization that can be done in the Application Server. See Best practices for reducing the size of the service method in generated JSP class files

Batch compilation in WebSphere Application Server V4.0, V5.0 and V5.1 releases

By default, the WebSphere Application Server JSP Batch Compiler is fully optimized. If this compilation error is encountered when using the JSP Batch Compiler, see Best practices for reducing the size of the service method in generated JSP class files 
 

bean:message的用法 以及标签的使用

标签用于输出Resource Bundle中的一条消息.标签的bundle属性指定Resource Bundle,它和Struts配置文件的元素的可以属性相匹配.如果没有设置bundle属性,就采用默...
  • lhf2009913
  • lhf2009913
  • 2014年02月21日 09:53
  • 2758

Missing message for key "XXX"

“Missing message for key "XXX"”缺少所需的资源,检查ApplicationResources.properties文件里是否有jsp文件里需要的资源,例如: bean:m...
  • fakir08
  • fakir08
  • 2007年06月10日 19:00
  • 4516

File is a broken symbolic link:

今天升级xcode8  然后做的sok的demo  跑不起来了。 看都错误是这个,当时比较蒙蔽,这个file  是自己sdk中的一个 .bundle文件。我在xcode编译顺序上调整了一下,还是不行...
  • qq_16844001
  • qq_16844001
  • 2016年09月21日 19:01
  • 747

Broken pipe."解决

一、现象描述 在利用librdkafka同kafka broker通信过程中,当kafka broker意外退出时(如kill -9),librdkafka接口的sendmsg接口报出了“Pro...
  • senvil
  • senvil
  • 2015年10月04日 08:47
  • 2851

Linux编程问题—broken pipe 问题解决方法

1)broken pipe的字面意思是“管道破裂”。broken pip的原因是该管道的读端被关闭。 2)broken pipe经常发生socket关闭之后(或者其他的描述符关闭之后)的write操...
  • u010419967
  • u010419967
  • 2014年04月21日 10:53
  • 5976

Tomcat_Broken pipe

这个异常是由于以下几个原因造成。 1、客户端再发起请求后没有等服务器端相应完,点击了stop按钮,导致服务器端接收到取消请求。    通常情况下是不会有这么无聊的用户,出现这种情况可能是由于用户提交了...
  • yx511500623
  • yx511500623
  • 2015年07月29日 18:35
  • 2501

【经验教训】Broken pipe等

最近产品线中又碰到Broken pipe的问题,之前也碰到过,但分析了下,原因是不同的。 情景一: 在一个网络传输的模块中,由于Broken pipe导致服务程序退出。 分析:经常写网络服务的的...
  • sunxinhere
  • sunxinhere
  • 2012年09月01日 00:01
  • 29736

java服务器出现broken pipe ,connection reset解决方法

近期用java写的email服务器经常出现 broken pipe 错误。 经查验有可能是linux的线程机制会产生JVM出错的问题,特别是在连接高峰期间经常出现这样的问题,tomcat在linux下...
  • love_tu
  • love_tu
  • 2009年12月02日 10:03
  • 9010

Broken pipe异常分析及解决

Broken pipe异常分析报告 错误描述 ClientAbortException: java.io.IOException: Broken pipe 可能出现原因: TCP服务端write数据时...
  • ooppookid
  • ooppookid
  • 2017年02月06日 13:26
  • 22904

利用ant执行javac任务编译java程序,报 错误: 编码GBK的不可映射字符

报错原因参考:http://blog.csdn.net/hainan89/article/details/6198498 解决办法:在javac标签中增加一个属性encoding=”UTF-8” ...
  • testdeveloper
  • testdeveloper
  • 2016年05月19日 22:18
  • 1287
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:一个JSP编译错误的解决:JAVAC MESSAGE FILE IS BROKEN: key=javac.err.branch.too.big
举报原因:
原因补充:

(最多只允许输入30个字)