Tomcat启动:A fatal error has been detected by the Java Runtime Environment(JVM Crash分析及相关资料)

技术标签: jdk

今天更新代码之后,突然出现一个问题:Tomcat启动时,总是会出现jvm fatal error错误导致tomcat无法正常启动,以下是错误信息:

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

在网上搜寻好久,终于找到了类似错误,网上解释归结于:JIT在做编译优化的时候处理时出错,可能是触发了JVM的编译器的BUG导致的。幸好SUN(Oracle)提供了相关的文档说明,得以让我们解决了这个问题。 
文档地址:http://www.oracle.com/technetwork/java/javase/crashes-137240.html#gbyzu 

在这里,导致本次错误的是这个方法:

[java] view plain copy
  1. org.hibernate.cfg.annotations.SimpleValueBinder.setType  

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

1.如果是eclipse下启动服务,则在myeclipse-preference-java-installed jres 里面设置, 在 defalt vm arguments 填入下边的代码就可以了!如图:

代码:

[plain] view plain copy
  1. -XX:CompileCommand=exclude,org/hibernate/cfg/annotations/SimpleValueBinder,setType  

 

选择使用的JRE,,点击编辑edit

上边代码粘贴到此处,OK


2.如果是直接通过startup 启动tomcat,则需要修改以下文件 Windows下,在文件/bin/catalina.bat,Unix下,在文件/bin/catalina.sh找到

[plain] view plain copy
  1. set JAVA_OPTS=%JAVA_OPTS%  %LOGGING_CONFIG%    
修改为以下内容即可:

[plain] view plain copy
  1. set JAVA_OPTS=%JAVA_OPTS% -XX:CompileCommand=exclude,org/hibernate/cfg/annotations/SimpleValueBinder,setType %LOGGING_CONFIG%  
如图:


来源:网络


智能推荐

linux tomcat启动报错Error: Could not create the Java Virtual Machine. Error: A fatal exception has occur

报错信息: Java HotSpot 64-Bit Server VM warning: ignoring option PermSize=128M; support was removed in 8.0 Java HotSpot 64-Bit Server VM warning: ignoring option MaxPermSize=256M; support was removed in 8...

Error:Could not create the Java Virtual Machine. Error:A Fatal exception has occurred

报错如图: 与此同时控制台还有如下报错: unrecognized option: --add-modules=all-system   尝试了其他博客的三种常规方法都⑧。 1、判断机子是否安装了java环境。具体方法网上搜吧 注意设置自己的环境变量:如JAVA_HOME,CLASSPATH,PATH  2、有些程序会有内存设置,有些程序内存设置过大时,超过虚拟机的范围会报错。...

电脑开不了机ERROR:NO BOOT DISK HAS BEEN DETECTED OR THE DISK HAS FAILED

先看一下,硬盘线是否连接,两个连接线,一大一小 2.通过pe软件进入后,查看一下是否有盘符 3、按 del 进入主板2113后找 Authentication → Secure Boot→把 Enabled(如图52611) 调成 Disabled(如图2)→ F10&...

redis中的hash扩容渐进式rehash过程

背景: redis字典(hash表)当数据越来越多的时候,就会发生扩容,也就是rehash 对比:java中的hashmap,当数据数量达到阈值的时候(0.75),就会发生rehash,hash表长度变为原来的二倍,将原hash表数据全部重新计算hash地址,重新分配位置,达到rehash目的 redis中的hash表采用的是渐进式hash的方式: 1、redis字典(hash表)底层有...

不同系统下的回车\r和换行\n,及其历史

2019独角兽企业重金招聘Python工程师标准>>>      我们平时按下键盘上的‘回车键’,就能实现回车换行【我们在屏幕上所看到的就是光标移到了下一行的开头位置!!ps:不讨论软件实现的特殊功能,如word里的回车智能缩进】。因此对这个按键更准确说应该叫做‘回车换行键’ 就且将这种将光标移到下行开...

猜你喜欢

windows操作系统,python环境下django的自动安装

首先,在Windows操作系统下安装python,完成python环境的搭建。(我看有的博客需要配置环境变量,其实不必要,因为我们在安装的时候只要勾选如下图所示即可避免不必要的麻烦) 第二步,使用快捷键windows+R或者点击如下图所示,之后点击运行 在其中输入cmd即可进入dos命令。 第三步,输入以下命令 就会自动安装,等待安装完成即可。 第四步,检测django是否安装成功,如果出现如下图...

Qt之日志输出文件

    做过项目的童鞋可能都使用过日志功能,以便有异常错误能够快速跟踪、定位,Qt也提供的类似的机制。之前用Qt4做项目时使用的是Qt::qInstallMsgHandler(),到了Qt5,使用了新的Qt::qInstallMessageHandler()来替代,详情请查看Qt助手(C++ API changes)。 描述     助手中在C++ API ...

基于雇员流失率数据进行多分类模型训练及阈值调整实践-大数据ML样本集案例实战

版权声明:本套技术专栏是作者(秦凯新)平时工作的总结和升华,通过从真实商业环境抽取案例进行总结和分享,并给出商业应用的调优建议和集群环境容量规划等内容,请持续关注本套博客。QQ邮箱地址:[email protected],如有任何学术交流,可随时联系。 1 数据的预处理分析 2 数据标准化处理 3 sklearn多模型封装(已废弃,学思想) 4 阈值概率调整 5 总结 方便复习,整成笔记,内容粗略...

Exception: java.lang.OutOfMemoryError

  最近在跑公司的项目的过程中我发现,当一个tomcat中运行多个项目的时候,就会报这个错误。我以前由于使用Maven-tomcat插件方式运行项目,所有没有遇到过这种情况。   自己查了一下资料,但是后来我发现有些帖子中描述的解决方法:window–preferences—tomcat—JVM Setting ——append to J...

【C#】关于WinForm窗体程序的退出方法总结

很多人对于关闭窗口都有不同的需求,以下是关闭窗体的几种方法: 一、关闭窗体 1. this.Close();仅仅是关闭当前窗口,若不是主窗体的话程序无法退出。 2. Application.Exit();强制所有消息终止,退出所有的窗体。 3. Application.ExitThread();强制终止调用线程上的所有消息。 4. System.Environment.Exit(0);最彻底的退出...

问答精选

How to get the sum of rows using a vector and the make the result in a column

I have a dataframe and i want to calculate the sum of variables present in a vector in every row and make the sum in other variable after i want the name of new variable created to be from the name of...

Call a custom class in zend framework

I have a very rough project that done partially in zend framework (not ZF2). The 'application', 'library' and 'public' folders are on the same root. Now i need to create a library 'Anil' in the 'libra...

Hide Some Of The Categories In Magento?

I want to hide some of the categories from magento home page. I have created some categories like New Arrivals, Special Offer Which I would like to show in some different way may be in left panel or r...

Reading an internal file in Android Studio

I am writing to an internal file in Android Studio The code lets me write lines of data split with commas. I am able to then go to another activity and read it all out at once. However I want to be ab...

Rails Acts_as_votable Gem Like/Unlike Buttons with Ajax

I'm new to Ruby On Rails, I used the acts_as_votable gem to create Like and Unlike Buttons to make Users like and unlike Posts but I can't make them change from Like to Unlike (and viceversa) and upda...

相关问题

相关文章

热门文章

推荐文章

相关标签

推荐问答