Tomcat启动报A fatal error has been detected by the Java Runtime Environment
2013-10-29 14:51
597 查看
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00002ba9d88e02da, pid=17844, tid=1076017472
#
# JRE version: 6.0_29-b11
# Java VM: Java HotSpot(TM) 64-Bit Server VM (20.4-b02 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C [libc.so.6+0x732da] short+0x3a
#
# An error report file with more information is saved as:
# /home/iptv/bss/apache-tomcat-6.0.26/bin/hs_err_pid17844.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
#
问题的原因就在于 显示JIT在做编译优化的时候处理 某个方法时出错。
本利的错误是这个方法
Java代码
![](https://oscdn.geek-share.com/Uploads/Images/Content/201909/24/aa311ded23800afed7af9f06f6b075bd.png)
org.hibernate.cfg.annotations.SimpleValueBinder.setType
解决办法:让jvm跳过该方法的编译优化
在jvm启动参数中添加启动参数
Java代码
![](https://oscdn.geek-share.com/Uploads/Images/Content/201909/24/aa311ded23800afed7af9f06f6b075bd.png)
-XX:CompileCommand=exclude,org/hibernate/cfg/annotations/SimpleValueBinder,setType
如果是eclipse下启动服务,则在eclipse-preference-java-installed jres 里面设置,
在 defalt vm arguments 填入上面的代码就可以了。
如果是直接通过startup 启动tomcat,则需要修改以下文件
Windows下,在文件/bin/catalina.bat,Unix下,在文件/bin/catalina.sh
找到
set JAVA_OPTS=%JAVA_OPTS% %LOGGING_CONFIG%
修改为
set JAVA_OPTS=%JAVA_OPTS% -XX:CompileCommand=exclude,org/hibernate/cfg/annotations/SimpleValueBinder,setType %LOGGING_CONFIG%
![](https://oscdn.geek-share.com/Uploads/Images/Content/202010/26/17e3d71db06adfd7c2b258fd7d8a8600.jpg)
在Default VM Arguments中加入:
-XX:CompileCommand=exclude,org/hibernate/cfg/annotations/SimpleValueBinder,setType
这句就可以了,确实加入就可以了,但是怎么感觉有点莫名其妙呢,也没说出错的原因,哪位碰到过,这个问题到底是由什么原因造成的呢?
补充:
加上这句话后,启动tomcat的时候,控制台输出了这样的字样:
![](https://oscdn.geek-share.com/Uploads/Images/Content/202010/26/2be91636ceeb9c814dae0b677b0a1f9b.jpg)
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00002ba9d88e02da, pid=17844, tid=1076017472
#
# JRE version: 6.0_29-b11
# Java VM: Java HotSpot(TM) 64-Bit Server VM (20.4-b02 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C [libc.so.6+0x732da] short+0x3a
#
# An error report file with more information is saved as:
# /home/iptv/bss/apache-tomcat-6.0.26/bin/hs_err_pid17844.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
#
问题的原因就在于 显示JIT在做编译优化的时候处理 某个方法时出错。
本利的错误是这个方法
Java代码
![](https://oscdn.geek-share.com/Uploads/Images/Content/201909/24/aa311ded23800afed7af9f06f6b075bd.png)
org.hibernate.cfg.annotations.SimpleValueBinder.setType
解决办法:让jvm跳过该方法的编译优化
在jvm启动参数中添加启动参数
Java代码
![](https://oscdn.geek-share.com/Uploads/Images/Content/201909/24/aa311ded23800afed7af9f06f6b075bd.png)
-XX:CompileCommand=exclude,org/hibernate/cfg/annotations/SimpleValueBinder,setType
如果是eclipse下启动服务,则在eclipse-preference-java-installed jres 里面设置,
在 defalt vm arguments 填入上面的代码就可以了。
如果是直接通过startup 启动tomcat,则需要修改以下文件
Windows下,在文件/bin/catalina.bat,Unix下,在文件/bin/catalina.sh
找到
set JAVA_OPTS=%JAVA_OPTS% %LOGGING_CONFIG%
修改为
set JAVA_OPTS=%JAVA_OPTS% -XX:CompileCommand=exclude,org/hibernate/cfg/annotations/SimpleValueBinder,setType %LOGGING_CONFIG%
![](https://oscdn.geek-share.com/Uploads/Images/Content/202010/26/17e3d71db06adfd7c2b258fd7d8a8600.jpg)
在Default VM Arguments中加入:
-XX:CompileCommand=exclude,org/hibernate/cfg/annotations/SimpleValueBinder,setType
这句就可以了,确实加入就可以了,但是怎么感觉有点莫名其妙呢,也没说出错的原因,哪位碰到过,这个问题到底是由什么原因造成的呢?
补充:
加上这句话后,启动tomcat的时候,控制台输出了这样的字样:
![](https://oscdn.geek-share.com/Uploads/Images/Content/202010/26/2be91636ceeb9c814dae0b677b0a1f9b.jpg)
相关文章推荐
- Tomcat启动:A fatal error has been detected by the Java Runtime Environment
- 服务器启动报错(Jetty、Tomcat),A fatal error has been detected by the Java Runtime Environment(JVM Crash分析及相关
- tomcat启动报错,A fatal error has been detected by the Java Runtime Environment:
- Tomcat启动:A fatal error has been detected by the Java Runtime Environment(JVM Crash分析及相关资料)
- Tomcat启动:A fatal error has been detected by the Java Runtime Environment(JVM Crash分析及相关资料)
- Tomcat启动:A fatal error has been detected by the Java Runtime Environment(JVM)
- tomcat启动报错,A fatal error has been detected by the Java Runtime Environment:
- Tomcat启动:A fatal error has been detected by the Java Runtime Environment(JVM Crash分析及相关资料)
- Tomcat启动报A fatal error has been detected by the Java Runtime Environment
- tomcat启动报错,A fatal error has been detected by the Java Runtime Environment
- tomcat自动关闭:A fatal error has been detected by the Java Runtime Environment
- Debain启动MyEclipse2015报错:A fatal error has been detected by the Java Runtime Environment:
- eclipse启动 java虚拟机报错 A fatal error has been detected by the Java Runtime Environment:
- JAVA VM bug :A fatal error has been detected by the Java Runtime Environment
- A fatal error has been detected by the Java Runtime Environment:
- A fatal error has been detected by the Java Runtime Environment:
- A fatal error has been detected by the Java Runtime Environment程序错误处理方法
- A fatal error has been detected by the Java Runtime Environment(jdk 1.6的一个BUG)
- A fatal error has been detected by the Java Runtime Environment: