Eclise Tomcat启动:A fatal error has been detected by the Java Runtime Environment?
iwantyou 提问于:2017-02-20
0 0

Tomcat启动时,总是会出现jvm fatal error错误导致tomcat无法正常启动,以下是错误信息:

#  
# A fatal error has been detected by the Java Runtime Environment:  
#  
#  Internal Error (c1_Optimizer.cpp:271), pid=6048, tid=5404  
#  guarantee(x_compare_res != Constant::not_comparable) failed: incomparable constants in IfOp  
#  
# JRE version: 6.0_29-b11  
# Java VM: Java HotSpot(TM) Client VM (20.4-b02 mixed mode windows-x86 )  
2013-01-10 13:47:34,671 INFO  hibernate.cfg.AnnotationBinder:419  -> Binding entity from annotated class: com.estone.www.spis.model.po.zd.sys.DPossession  
2013-01-10 13:47:34,671 INFO  cfg.annotations.EntityBinder:422  -> Bind entity com.estone.www.spis.model.po.zd.sys.DPossession on table d_possession  
2013-01-10 13:47:34,671 INFO  hibernate.cfg.AnnotationBinder:419  -> Binding entity from annotated class: com.estone.www.spis.model.po.zd.writ.DWritTemplate  
2013-01-10 13:47:34,671 INFO  cfg.annotations.EntityBinder:422  -> Bind entity com.estone.www.spis.model.po.zd.writ.DWritTemplate on table d_writ_template  
2013-01-10 13:47:34,671 INFO  hibernate.cfg.AnnotationBinder:419  -> Binding entity from annotated class: com.estone.www.spis.model.po.zd.writ.DWritType  
2013-01-10 13:47:34,671 INFO  cfg.annotations.EntityBinder:422  -> Bind entity com.estone.www.spis.model.po.zd.writ.DWritType on table d_writ_type  
# An error report file with more information is saved as:  
# D:\Program Files\apache-tomcat-6.0.20\bin\hs_err_pid6048.log  
#  
# If you would like to submit a bug report, please visit:  
#   http://java.sun.com/webapps/bugreport/crash.jsp  
#
  • 所有回答
bluesky 回答于:2017-06-04
0 0

查看下console应该有类似下面的log

# An error report file with more information is saved as:
# E:\install\eclipse-jee\eclipse\hs_err_pid4700.log

查看hs_err_pid4700.log文件
如果有下面的这个

Current CompileTask:
C1:   5854 1853      org.hibernate.cfg.annotations.SimpleValueBinder.setType(Lorg/hibernate/annotations/common/reflection/XProperty;Lorg/hibernate/annotations/common/reflection/XClass;)V (921 bytes)

Java做编译优化的时候处理 某个方法时出错。 错误是这个方法org.hibernate.cfg.annotations.SimpleValueBinder.setType

解决办法:让jvm跳过该方法的编译优化

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

eclipse下配置

如果是直接通过startup 启动tomcat,则需要修改tomcat,catalina文件,
找到
set JAVA_OPTS=%JAVA_OPTS% %LOGGING_CONFIG%
修改为
set JAVA_OPTS=%JAVA_OPTS% -XX:CompileCommand=exclude,org/hibernate/cfg/annotations/SimpleValueBinder,setType %LOGGING_CONFIG%

我来回答    Eclise Tomcat启动:A fatal error has been detected by the Java Runtime Environment?