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

  1. 今天在配置了修改了一下,啓動tomcat的時候,出現瞭如下錯誤。

  2. #  
  3. # A fatal error has been detected by the Java Runtime Environment:  
  4. #  
  5. #  Internal Error (c1_Optimizer.cpp:271), pid=6048, tid=5404  
  6. #  guarantee(x_compare_res != Constant::not_comparable) failed: incomparable constants in IfOp  
  7. #  
  8. # JRE version: 6.0_29-b11  
  9. # Java VM: Java HotSpot(TM) Client VM (20.4-b02 mixed mode windows-x86 )  
  10. 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  
  11. 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  
  12. 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  
  13. 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  
  14. 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  
  15. 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  
  16. # An error report file with more information is saved as:  
  17. # D:\Program Files\apache-tomcat-6.0.20\bin\hs_err_pid6048.log  
  18. #  
  19. # If you would like to submit a bug report, please visit:  
  20. #  


解決方案如下:


網上解釋歸結於:JIT在做編譯優化的時候處理時出錯,可能是觸發了JVM的編譯器的BUG導致的。幸好SUN(Oracle)提供了相關的文檔說明,得以讓我們解決了這個問題。 
文檔地址:http://www.oracle.com/technetwork/java/javase/crashes-137240.html#gbyzu 
在這裏,導致本次錯誤的是這個方法:
	
  1. 解決辦法:讓jvm跳過該方法的編譯優化 
1.如果是eclipse下啓動服務,則在myeclipse-preference-java-installed jres 裏面設置, 在 defalt vm arguments 填入下邊的代碼就可以了!如圖: 代碼:


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


選擇使用的JRE,,點擊編輯edit,上邊代碼粘貼到 Default vm Argument就行了




發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章