Tomcat boot: A fatal error has been detected by the Java Runtime environment (JVM Crash Analysis and related information)Category: Server 2013-01-10 14:19 1255 people read comments (2) Favorites Report binding crash JVM JVM server
I life' s blog http://blog.csdn.net/fei1502816
January 10, 2013 note:
After updating the code today, a problem suddenly occurs: when Tomcat starts, there is always a JVM fatal error error that causes Tomcat to not start correctly, and the following is an error message:
[Plain] View Plain copy print? # # A Fatal error has been detected by the Java Runtime environment: # # error (Internal zer.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-b 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-file with the more information is saved as: # D:\Program Files\apache-tomcat-6.0.20\bi n\hs_err_pid6048.log # # If You are would like to submit a bug and please visit: # http://ja va.sun.com/webapps/bugreport/crash.jsp #
# 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 Hibernat
e.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 # A error file with more information is saved As: # D:\Program Files\apache-tomcat-6.0.20\bin\hs_err_pid6048.log # If You are would like to submit a bug, please VI Sit: # http://java.sun.com/webapps/bugreport/crash.jsp #
Searching the internet for a long time, and finally found a similar error, the net explanation is due to: JIT in doing compile optimization when processing error, may be triggered the JVM compiler bug caused. Fortunately, Sun (Oracle) provided the relevant documentation to enable us to solve the problem.
Document Address: Http://www.oracle.com/technetwork/java/javase/crashes-137240.html#gbyzu
Here, this is the method that leads to this error:
[Java] view plain copy print? Org.hibernate.cfg.annotations.SimpleValueBinder.setType
Org.hibernate.cfg.annotations.SimpleValueBinder.setType
Workaround: Let the JVM skip compilation optimizations for this method
1. If the service is started under Eclipse, then set it in the Myeclipse-preference-java-installed JREs, and fill in the Defalt VM arguments with the code below. As shown in figure:
Code:
[plain] view plain copy print? -xx:compilecommand=exclude,org/hibernate/cfg/annotations/simplevaluebinder,settype
-xx:compilecommand=exclude,org/hibernate/cfg/annotations/simplevaluebinder,settype
Select the JRE to use, and click Edit
Paste the top code here, OK
2. If you are starting Tomcat directly through startup, you need to modify the following files under Windows, under File/bin/catalina.bat,unix, in file/bin/catalina.sh find
[plain] view plain copy print? Set java_opts=%java_opts%%logging_config%
Set java_opts=%java_opts% %logging_config%
Modify to the following content:
[plain] view plain copy print? Set java_opts=%java_opts%-xx:compilecommand=exclude,org/hibernate/cfg/annotations/simplevaluebinder,settype% logging_config%
Set java_opts=%java_opts%-xx:compilecommand=exclude,org/hibernate/cfg/annotations/simplevaluebinder,settype% logging_config%
As shown in figure: