前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >部署启动程序出现“A fatal error has been detected by the Java Runtime Environment”的解决办法

部署启动程序出现“A fatal error has been detected by the Java Runtime Environment”的解决办法

作者头像
飞奔去旅行
发布2019-06-13 16:42:35
8.1K0
发布2019-06-13 16:42:35
举报
文章被收录于专栏:智慧协同

大致出现的问题如下

代码语言:javascript
复制
# 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  
#  

参考解决方案:http://sind.iteye.com/blog/1132459

原因是:JIT在做编译优化的时候处理 某个方法时出错。 如何知道自己哪个方法编译出错? 错误输出中会告诉你错误日志文件地址,如上:D:\Program Files\eclipse-jee-oxygen-R-win32\eclipse\hs_err_pid9188.log

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

代码语言:javascript
复制
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启动添加如下参数

代码语言:javascript
复制
-XX:CompileCommand=exclude,org/hibernate/cfg/annotations/SimpleValueBinder,setType  

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

代码语言:javascript
复制
set JAVA_OPTS=%JAVA_OPTS% -XX:CompileCommand=exclude,org/hibernate/cfg/annotations/SimpleValueBinder,setType %LOGGING_CONFIG% 
本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2017.07.30 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 解决办法
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档