a fatal error has been detected by the java_部署启动程序出现“A fatal error has been detected by the Java Run...

大致出现的问题如下

# A fatal error has been detected by the Java Runtime Environment:

#

# Internal Error (c1_Optimizer.cpp:271), pid=1196, tid=4412

# guarantee(x_compare_res != Constant::not_comparable) failed: incomparable constants in IfOp

#

# JRE version: 6.0_45-b06

# Java VM: Java HotSpot(TM) Client VM (20.45-b01 mixed mode windows-x86 )

# An error report file with more information is saved as:

# D:\Program Files\eclipse-jee-oxygen-R-win32\eclipse\hs_err_pid9188.log

#

# If you would like to submit a bug report, please visit:

# http://java.sun.com/webapps/bugreport/crash.jsp

#

原因是:JIT在做编译优化的时候处理 某个方法时出错。

如何知道自己哪个方法编译出错?

错误输出中会告诉你错误日志文件地址,如上:D:\Program Files\eclipse-jee-oxygen-R-win32\eclipse\hs_err_pid9188.log

打开日志文件,THREAD输出下会有具体错误的Java类和方法,本例中内容为:

Current CompileTask:

C1: 20924 1686 org.hibernate.cfg.annotations.SimpleValueBinder.setType

(Lorg/hibernate/annotations/common/reflection/XProperty;Lorg/hibernate/annotations/common/reflection/XClass;)V (921 bytes)

问题就出在org.hibernate.cfg.annotations.SimpleValueBinder.setType 编译出问题

解决办法

让jvm跳过该方法的编译

jvm启动添加如下参数

-XX:CompileCommand=exclude,org/hibernate/cfg/annotations/SimpleValueBinder,setType

如果是tomcat直接启动,在可以在/bin/catalina.bat添加如下参数

set JAVA_OPTS=%JAVA_OPTS% -XX:CompileCommand=exclude,org/hibernate/cfg/annotations/SimpleValueBinder,setType %LOGGING_CONFIG%

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值