美文网首页
部署启动程序出现“A fatal error has been

部署启动程序出现“A fatal error has been

作者: Devid | 来源:发表于2017-07-30 11:47 被阅读425次

    大致出现的问题如下

    # A fatal error has been detected by the Java Runtime Environment:  
    #  
    #  Internal Error (c1_Optimizer.cpp:271), pid=1196, tid=4412  
    #  guarantee(x_compare_res != Constant::not_comparable) failed: incomparable constants in IfOp  
    #  
    # JRE version: 6.0_45-b06  
    # Java VM: Java HotSpot(TM) Client VM (20.45-b01 mixed mode windows-x86 )
    # An error report file with more information is saved as: 
    # D:\Program Files\eclipse-jee-oxygen-R-win32\eclipse\hs_err_pid9188.log
    #  
    # If you would like to submit a bug report, please visit:  
    #   http://java.sun.com/webapps/bugreport/crash.jsp  
    #  
    

    参考解决方案:http://sind.iteye.com/blog/1132459

    原因是:JIT在做编译优化的时候处理 某个方法时出错。
    如何知道自己哪个方法编译出错?
    错误输出中会告诉你错误日志文件地址,如上:D:\Program Files\eclipse-jee-oxygen-R-win32\eclipse\hs_err_pid9188.log

    打开日志文件,THREAD输出下会有具体错误的Java类和方法,本例中内容为:

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

    问题就出在org.hibernate.cfg.annotations.SimpleValueBinder.setType 编译出问题

    解决办法

    让jvm跳过该方法的编译
    jvm启动添加如下参数

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

    如果是tomcat直接启动,在可以在/bin/catalina.bat添加如下参数

    set JAVA_OPTS=%JAVA_OPTS% -XX:CompileCommand=exclude,org/hibernate/cfg/annotations/SimpleValueBinder,setType %LOGGING_CONFIG% 
    

    相关文章

      网友评论

          本文标题:部署启动程序出现“A fatal error has been

          本文链接:https://www.haomeiwen.com/subject/rvbhlxtx.html