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

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/fei1502816/article/details/8489613

 iLife's 博客http://blog.csdn.net/fei1502816 


2013年1月10号注:

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

#
# 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  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 report file with more information is saved as:
# D:\Program Files\apache-tomcat-6.0.20\bin\hs_err_pid6048.log
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
#

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

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

org.hibernate.cfg.annotations.SimpleValueBinder.setType

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

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

代码:

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

 

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

上边代码粘贴到此处,OK


2.如果是直接通过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%
如图:



参考资料:感谢以下链接的朋友

http://seanhe.iteye.com/blog/905997

http://eric-flower.iteye.com/blog/1447080

http://sind.iteye.com/blog/1132459



 iLife's 博客http://blog.csdn.net/fei1502816 

An unexpected error has been detected by Java Runtime Environment:

06-20

netbeans下调用matlab所产生的jar文件时出现这样的错误。找不到解决的方法啊 哪位高手救一下我啊rn(在dos下运行正确了一次后 我又在netbeans下运行还是同样错误 然后我再在dos下运行 就不成功了 呜呜—)rn晕啊 所帖子过长不让发 我删除了中间部分 rnrn#rn# An unexpected error has been detected by Java Runtime Environment:rn#rn# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7c1115, pid=3316, tid=180rn#rn# Java VM: Java HotSpot(TM) Client VM (1.6.0-b105 mixed mode)rn# Problematic frame:rn# C [jvm.dll+0x1115]rn#rn# If you would like to submit a bug report, please visit:rn# http://java.sun.com/webapps/bugreport/crash.jsprn#rnrn--------------- T H R E A D ---------------rnrnCurrent thread (0x02b50c00): JavaThread "Unknown thread" [_thread_in_native, id=180]rnrnsiginfo: ExceptionCode=0xc0000005, writing address 0x00000124rnrnRegisters:rnEAX=0x00000000, EBX=0x02b50ce8, ECX=0x02b50bf4, EDX=0x00000004rnESP=0x06ede994, EBP=0x06ede9c8, ESI=0x00000000, EDI=0x00000000rnEIP=0x6d7c1115, EFLAGS=0x00010246rnrnTop of Stack: (sp=0x06ede994)rn0x06ede994: 02b50ce8 6d8b3f11 00000000 00000006rn0x06ede9a4: 03086508 02b50ce8 00000000 786a1463rn0x06ede9b4: 02b50ce8 03086508 02b50c00 180442f8rn0x06ede9c4: 180442f8 06edea04 06f5a460 02b50ce8rn0x06ede9d4: 06edea0c 06edea14 00000007 78e6a575rn0x06ede9e4: 06ede9e4 180442f8 06edea14 180b0630rn0x06ede9f4: 00000000 180442f8 00000000 06edea14rn0x06edea04: 06edea38 06f52dd7 180473b8 06f58436 rnrnInstructions: (pc=0x6d7c1115)rn0x6d7c1105: 96 24 01 00 00 5e c3 cc cc cc cc 56 8b 74 24 08rn0x6d7c1115: c7 86 24 01 00 00 05 00 00 00 83 3d 30 19 9e 6d rnrnrnStack: [0x066e0000,0x06ee0000), sp=0x06ede994, free space=8186krnNative frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)rnC [jvm.dll+0x1115]rnj java.lang.Class.getPrimitiveClass(Ljava/lang/String;)Ljava/lang/Class;+0rnj java.lang.Float.()V+2rnv ~StubRoutines::call_stubrnrnrn0x7b120000 - 0x7b20d000 D:\matlab\bin\win32\libmwgui.dllrn0x786e0000 - 0x78860000 D:\matlab\bin\win32\hg.dllrn0x790b0000 - 0x790ea000 D:\matlab\bin\win32\jmi.dllrn0x78dd0000 - 0x78dfa000 D:\matlab\bin\win32\libmwhardcopy.dllrn0x79130000 - 0x79169000 D:\matlab\bin\win32\libuij.dllrnrnVM Arguments:rnjvm_args: -Xss512k -XX:PermSize=32M -Xms64m -XX:NewRatio=3 -XX:MaxPermSize=64M -Xmx128m -XX:MaxDirectMemorySize=1200000000 -Dsun.java2d.noddraw=true -Dsun.awt.nopixfmt=true -Xshare:off -Xrs -Djava.library.path=D:\matlab\bin\win32 vfprintf abortrnjava_command: rnLauncher Type: genericrnrnEnvironment Variables:rnJAVA_HOME=C:\Program Files\Java\jdk1.6.0_06rnCLASSPATH=.;D:\matlab\toolbox\javabuilder\jar\javabuilder.jar;C:\Program Files\Java\jdk1.6.0_06\lib\tools.jar;C:\Program Files\Java\jdk1.6.0_06\lib\dt.jarrnPATH=C:\j2sdk1.4.2_16\bin;C:\WINDOWS\system32;D:\matlab\bin;D:\matlab\bin\win32;C:\Program Files\Java\jdk1.6.0_06\bin;C:\Program Files\Java\jdk1.6.0_06\lib;D:\Program Files\影音风暴\Codec;D:\Program Files\影音风暴rnUSERNAME=AdministratorrnOS=Windows_NTrnPROCESSOR_IDENTIFIER=x86 Family 6 Model 15 Stepping 6, GenuineIntelrnrnrnrn--------------- S Y S T E M ---------------rnrnOS: Windows XP Build 2600 Service Pack 2rnrnCPU:total 2 family 6, cmov, cx8, fxsr, mmx, sse, sse2rnrnMemory: 4k page, physical 2062568k(1303068k free), swap 4000636k(3271216k free)rnrnvm_info: Java HotSpot(TM) Client VM (1.6.0-b105) for windows-x86, built on Nov 29 2006 00:48:48 by "java_re" with unknown MS VC++:1310rnrn

java插件开发 结合Jni 异常报错A fatal error has been detected by the Java Runtime Environme

10-30

这几天在进行java插件的开发,使用JNI调用C++的动态链接库,可是最后总是报错,我一步步调试之后,运行过了这个函数,并没有出现异常,可是最后就是会出现这个问题,请各位大神帮忙看看!rnrnerror report如下:rnrn#rn# A fatal error has been detected by the Java Runtime Environment:rn#rn# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x7757205b, pid=1788, tid=6748rn#rn# JRE version: 6.0_35-b10rn# Java VM: Java HotSpot(TM) Client VM (20.10-b01 mixed mode, sharing windows-x86 )rn# Problematic frame:rn# C [ntdll.dll+0x5205b]rn#rn# If you would like to submit a bug report, please visit:rn# http://java.sun.com/webapps/bugreport/crash.jsprn# The crash happened outside the Java Virtual Machine in native code.rn# See problematic frame for where to report the bug.rn#rnrn--------------- T H R E A D ---------------rnrnCurrent thread (0x01b79c00): JavaThread "main" [_thread_in_native, id=6748, stack(0x00330000,0x00380000)]rnrnsiginfo: ExceptionCode=0xc0000005, writing address 0x00000000rnrnRegisters:rnEAX=0x00000000, EBX=0xdbea0001, ECX=0x00000003, EDX=0x00000000rnESP=0x0037ec40, EBP=0x0037ec74, ESI=0x003fa5b3, EDI=0xdbea0000rnEIP=0x7757205b, EFLAGS=0x00010206rnrnTop of Stack: (sp=0x0037ec40)rn0x0037ec40: 00000000 00130000 001edf58 0022e7d0rn0x0037ec50: 00000100 00000000 00000000 01b7a61crn0x0037ec60: 000004b0 0037ec94 00000000 00000001rn0x0037ec70: 001edf50 0037ec8c 77571faf 001edf58rn0x0037ec80: 00000000 00040df2 001edf50 0037eca0rn0x0037ec90: 7668f1ac 00130000 00000000 001edf58rn0x0037eca0: 0037ecb4 743a5038 00130000 00000000rn0x0037ecb0: 001edf58 0037ed2c 744198cb 001edf58 rnrnInstructions: (pc=0x7757205b)rn0x7757203b: 08 2b 7d f4 33 c0 c1 ef 03 0f a4 f8 10 c1 e7 10rn0x7757204b: c1 ea 10 0b df 0b c8 8b 06 c7 45 f8 01 00 00 00rn0x7757205b: 89 30 8b 45 e0 8b 55 e4 8d 7e 08 f0 0f c7 0f 3brn0x7757206b: 45 e0 0f 85 fc 0f fd ff 3b 55 e4 0f 85 f3 0f fd rnrnrnRegister to memory mapping:rnrnEAX=0x00000000 is an unknown valuernEBX=0xdbea0001 is an unknown valuernECX=0x00000003 is an unknown valuernEDX=0x00000000 is an unknown valuernESP=0x0037ec40 is pointing into the stack for thread: 0x01b79c00rnEBP=0x0037ec74 is pointing into the stack for thread: 0x01b79c00rnESI=0x003fa5b3 is an unknown valuernEDI=0xdbea0000 is an unknown valuernrnrnStack: [0x00330000,0x00380000], sp=0x0037ec40, free space=315krnNative frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)rnC [ntdll.dll+0x5205b] RtlFreeHeap+0x12arnC [ntdll.dll+0x51faf] RtlFreeHeap+0x7ernC [kernel32.dll+0x4f1ac] HeapFree+0x14rnC [COMCTL32.dll+0x35038] DrawScrollBar+0x1f8rnC [COMCTL32.dll+0xa98cb] DPA_Merge+0x3f2frnC [COMCTL32.dll+0x1780c] ImageList_GetFlags+0x97rnC [USER32.dll+0x186ef] IsThreadDesktopComposited+0x11frnC [USER32.dll+0x179cc] MapWindowPoints+0xb7rnC [USER32.dll+0x170f4] InflateRect+0x74rnC [USER32.dll+0xd629] DestroyWindow+0x3arnC [ntdll.dll+0x4642e] KiUserCallbackDispatcher+0x2ernj org.eclipse.swt.widgets.Control.destroyWidget()V+14rnj org.eclipse.swt.widgets.Shell.destroyWidget()V+5rnj org.eclipse.swt.widgets.Widget.release(Z)V+79rnj org.eclipse.swt.widgets.Widget.dispose()V+23rnj org.eclipse.swt.widgets.Decorations.dispose()V+52rnj org.eclipse.swt.widgets.Shell.dispose()V+1rnj org.eclipse.jface.window.Window.close()Z+65rnj org.eclipse.jface.dialogs.Dialog.close()Z+26rnj org.eclipse.jface.dialogs.MessageDialog.buttonPressed(I)V+6rnj org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Lorg/eclipse/swt/events/SelectionEvent;)V+17rnj org.eclipse.swt.widgets.TypedListener.handleEvent(Lorg/eclipse/swt/widgets/Event;)V+1133rnJ org.eclipse.swt.widgets.EventTable.sendEvent(Lorg/eclipse/swt/widgets/Event;)Vrnj org.eclipse.jface.window.Window.open()I+49rnj org.eclipse.jface.dialogs.MessageDialog.open()I+1rnj org.eclipse.jface.dialogs.MessageDialog.open(ILorg/eclipse/swt/widgets/Shell;Ljava/lang/String;Ljava/lang/String;I)Z+41rnj org.eclipse.jface.dialogs.MessageDialog.openConfirm(Lorg/eclipse/swt/widgets/Shell;Ljava/lang/String;Ljava/lang/String;)Z+5rnj debugg.TraceAction.run(Lorg/eclipse/jface/action/IAction;)V+270rnj org.eclipse.ui.internal.PluginAction.runWithEvent(Lorg/eclipse/swt/widgets/Event;)V+110rnj org.eclipse.ui.internal.WWinPluginAction.runWithEvent(Lorg/eclipse/swt/widgets/Event;)V+9rnj org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(Lorg/eclipse/swt/widgets/Event;Z)V+354rnj org.eclipse.jface.action.ActionContributionItem.access$2(Lorg/eclipse/jface/action/ActionContributionItem;Lorg/eclipse/swt/widgets/Event;Z)V+3rnj org.eclipse.jface.action.ActionContributionItem$5.handleEvent(Lorg/eclipse/swt/widgets/Event;)V+60rnJ org.eclipse.swt.widgets.EventTable.sendEvent(Lorg/eclipse/swt/widgets/Event;)Vrnj org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run()V+638rnj org.eclipse.core.databinding.observable.Realm.runWithDefault(Lorg/eclipse/core/databinding/observable/Realm;Ljava/lang/Runnable;)V+12rnj org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(Lorg/eclipse/e4/ui/model/application/MApplicationElement;Lorg/eclipse/e4/core/contexts/IEclipseContext;)Ljava/lang/Object;+57rnj org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(Lorg/eclipse/e4/ui/model/application/MApplicationElement;)V+20rnj org.eclipse.ui.internal.Workbench$5.run()V+236rnj org.eclipse.core.databinding.observable.Realm.runWithDefault(Lorg/eclipse/core/databinding/observable/Realm;Ljava/lang/Runnable;)V+12rnj org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Lorg/eclipse/swt/widgets/Display;Lorg/eclipse/ui/application/WorkbenchAdvisor;)I+18rnj org.eclipse.ui.PlatformUI.createAndRunWorkbench(Lorg/eclipse/swt/widgets/Display;Lorg/eclipse/ui/application/WorkbenchAdvisor;)I+2rnj org.eclipse.ui.internal.ide.application.IDEApplication.start(Lorg/eclipse/equinox/app/IApplicationContext;)Ljava/lang/Object;+108rnj org.eclipse.equinox.internal.app.EclipseAppHandle.run(Ljava/lang/Object;)Ljava/lang/Object;+135rnj org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(Ljava/lang/Object;)Ljava/lang/Object;+103rnj org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(Ljava/lang/Object;)Ljava/lang/Object;+29rnj org.eclipse.core.runtime.adaptor.EclipseStarter.run(Ljava/lang/Object;)Ljava/lang/Object;+119rnj org.eclipse.core.runtime.adaptor.EclipseStarter.run([Ljava/lang/String;Ljava/lang/Runnable;)Ljava/lang/Object;+183rnv ~StubRoutines::call_stubrnV [jvm.dll+0xfb05b]rnV [jvm.dll+0x18c901]rnV [jvm.dll+0xfb0dd]rnV [jvm.dll+0x1052d3]rnV [jvm.dll+0x105c16]rnV [jvm.dll+0xb70de]rnC [java.dll+0x721d] Java_sun_reflect_NativeMethodAccessorImpl_invoke0+0x15rnj sun.reflect.NativeMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+87rnj sun.reflect.DelegatingMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+6rnj java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+161rnj org.eclipse.equinox.launcher.Main.invokeFramework([Ljava/lang/String;[Ljava/net/URL;)V+211rnj org.eclipse.equinox.launcher.Main.basicRun([Ljava/lang/String;)V+126rnj org.eclipse.equinox.launcher.Main.run([Ljava/lang/String;)I+4rnj org.eclipse.equinox.launcher.Main.main([Ljava/lang/String;)V+10rnv ~StubRoutines::call_stubrnV [jvm.dll+0xfb05b]rnV [jvm.dll+0x18c901]rnV [jvm.dll+0xfb0dd]rnV [jvm.dll+0x95886]rnV [jvm.dll+0x9d6c3]rnC [javaw.exe+0x2155]rnC [javaw.exe+0x8614]rnC [kernel32.dll+0x51174] BaseThreadInitThunk+0x12rnC [ntdll.dll+0x5b3f5] RtlInitializeExceptionChain+0x63rnC [ntdll.dll+0x5b3c8] RtlInitializeExceptionChain+0x36rnrnJava frames: (J=compiled Java code, j=interpreted, Vv=VM code)rnj org.eclipse.swt.internal.win32.OS.DestroyWindow(I)Z+0rnj org.eclipse.swt.widgets.Control.destroyWidget()V+14rnj org.eclipse.swt.widgets.Shell.destroyWidget()V+5rnj org.eclipse.swt.widgets.Widget.release(Z)V+79rnj org.eclipse.swt.widgets.Widget.dispose()V+23rnj org.eclipse.swt.widgets.Decorations.dispose()V+52rnj org.eclipse.swt.widgets.Shell.dispose()V+1rnj org.eclipse.jface.window.Window.close()Z+65rnj org.eclipse.jface.dialogs.Dialog.close()Z+26rnj org.eclipse.jface.dialogs.MessageDialog.buttonPressed(I)V+6rnj org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Lorg/eclipse/swt/events/SelectionEvent;)V+17rnj org.eclipse.swt.widgets.TypedListener.handleEvent(Lorg/eclipse/swt/widgets/Event;)V+1133rnJ org.eclipse.swt.widgets.EventTable.sendEvent(Lorg/eclipse/swt/widgets/Event;)VrnJ org.eclipse.swt.widgets.Display.runDeferredEvents()ZrnJ org.eclipse.swt.widgets.Display.readAndDispatch()Zrnj org.eclipse.jface.window.Window.runEventLoop(Lorg/eclipse/swt/widgets/Shell;)V+23rnj org.eclipse.jface.window.Window.open()I+49rnj org.eclipse.jface.dialogs.MessageDialog.open()I+1rnj org.eclipse.jface.dialogs.MessageDialog.open(ILorg/eclipse/swt/widgets/Shell;Ljava/lang/String;Ljava/lang/String;I)Z+41rnj org.eclipse.jface.dialogs.MessageDialog.openConfirm(Lorg/eclipse/swt/widgets/Shell;Ljava/lang/String;Ljava/lang/String;)Z+5rnj debugg.TraceAction.run(Lorg/eclipse/jface/action/IAction;)V+270rnj org.eclipse.ui.internal.PluginAction.runWithEvent(Lorg/eclipse/swt/widgets/Event;)V+110rnj org.eclipse.ui.internal.WWinPluginAction.runWithEvent(Lorg/eclipse/swt/widgets/Event;)V+9rnj

java多线程实验的时候出现的异常A fatal error has been detected by the Java Runtime Environm

08-07

class ThreadI rn public static void main(String[] arg) rn for (int i = 0; i < 100; i++) rn new TestI("Thread " + i).start();rn rn rnrn下面是线程类:rnclass TestI extends Thread rn String s;rnrn TestI(String sTemp) rn this.s = sTemp;rn rnrn public void run() rnrn for (int i = 0; i < 50; i++) rn System.out.println(this.s + " " + i);rn Provider p = new Provider();rn p.setName("abc");rn ProviderService.isExist(p);rn try rn Thread.sleep(1000 * 5);rn catch (Exception ex) rn ex.printStackTrace();rn rn rn rnrn下面是ProviderService类rnpublic class ProviderService rn public static boolean isExist(Provider provider) //每次查询都把connection打开,然后马上关闭connection,没有用连接池,用的是mysql数据库rn Connection conn = null;rn PreparedStatement ps = null;rn ResultSet rs = null;rn boolean result = false;rn String sql = "select * from provider where name=?";rn try rn conn = JdbcUtils2.getConnection();rn ps = conn.prepareStatement(sql);rn ps.setString(1, provider.getName());rn rs = ps.executeQuery();rn if (rs.next())rn result = true;rn catch (Exception e) rn e.printStackTrace();rn finally rn JdbcUtils2.free(rs, ps, conn);rn rn return result;rn rnrn下面是JdbcUtils2类:rnpublic class JdbcUtils2 rnrn private static String url = "jdbc:mysql://localhost:3306/togogo";rn private static String name = "root";rn private static String password = "admin";rnrn private JdbcUtils2() rn rnrn static rn try rn Class.forName("com.mysql.jdbc.Driver");rn catch (ClassNotFoundException e) rn e.printStackTrace();rn rn rnrn public static Connection getConnection() throws SQLException rn return DriverManager.getConnection(url, name, password);rn rnrn public static void free(ResultSet rs, Statement st, Connection conn) rn try rn if (rs != null) rn rs.close();rn rn catch (SQLException e) rn e.printStackTrace();rn finally rn rs=null;rn try rn if (st != null) rn st.close();rn rn catch (SQLException e) rn e.printStackTrace();rn finally rn st=null;rn try rn if (conn != null) rn conn.close();rn rn catch (SQLException e) rn e.printStackTrace();rn finallyrn conn=null;rn rn rn rn rnrn当线程执行到第二十五次左右就会抛出下面的异常:rnThread 45 21//这些是程序打印出来的结果rnThread 40 21rnThread 89 21rnThread 99 21rnThread 75 21rnThread 22 21rnThread 5 21rn#rn# A fatal error has been detected by the Java Runtime Environment:rn#rn# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x100089e3, pid=4908, tid=6200rn#rn# JRE version: 6.0_16-b01rn# Java VM: Java HotSpot(TM) Client VM (14.2-b01 mixed mode, sharing windows-x86 )rn# Problematic frame:rn# C [TcpIpDog0.dll+0x89e3]rn#rn# An error report file with more information is saved as:rn# D:\Workspaces\MyEclipse for Spring 9\togogo\hs_err_pid4908.logrn#rn# If you would like to submit a bug report, please visit:rn# http://java.sun.com/webapps/bugreport/crash.jsprn# The crash happened outside the Java Virtual Machine in native code.rn# See problematic frame for where to report the bug.rn#rnrn[error occurred during error reporting , id 0xc0000005]rnrnrn这个异常出现的原因是内存泄露吗?我观察了任务管理器,这个程序占用的内存在45000K左右,还是因为别的原因?求解!

java解压rar|An unexpected error has been detected by Java Runtime Environment:

08-13

java解压rar文件出错rn[code=Java]rnpublic void unRarFile(String rarFileName,String extPlace) rn rn Archive archive = null;rn File out = null;rn File file = null;rn File dir = null;rn FileOutputStream os = null;rn FileHeader fh = null;rn String path, dirPath = "";rn try rn rn file = new File(rarFileName);rn System.out.println("file.getName = "+file.getName());rn archive = new Archive(file);rn rn catch (RarException e1) rn rn e1.printStackTrace();rn rn catch (IOException e1) rn rn e1.printStackTrace();rn rn finally rn rn if (file != null) rn rn file = null;rn rn rn if (archive != null) rn rn try rn rn fh = archive.nextFileHeader();rn while (fh != null) rn rn path = (extPlace + fh.getFileNameString().trim()).replaceAll("\\\\", "/");rn int end = path.lastIndexOf("/");rn if (end != -1) rn rn dirPath = path.substring(0, end);rn rn try rn rn dir = new File(dirPath);rn if (!dir.exists()) rn rn dir.mkdirs();rn rn rn catch (RuntimeException e1) rn rn e1.printStackTrace();rn rn finally rn rn if (dir != null) rn rn dir = null;rn rn rn if (fh.isDirectory()) rn rn fh = archive.nextFileHeader();rn continue;rn rn rn out = new File(extPlace + fh.getFileNameString().trim());rn try rn rn os = new FileOutputStream(out);rn archive.extractFile(fh, os);rn rn catch (FileNotFoundException e) rn rn e.printStackTrace();rn rn catch (RarException e) rn rn e.printStackTrace();rn rn finally rn rn if (os != null) rn rn try rn rn os.close();rn rn catch (IOException e) rn rn e.printStackTrace();rn rn rn if (out != null) rn rn out = null;rn rn rn fh = archive.nextFileHeader();rn rn rn catch (RuntimeException e) rn rn e.printStackTrace();rn rn finally rn rn fh = null;rn if (archive != null) rn rn try rn rn archive.close();rn catch (IOException e) rn rn e.printStackTrace();rn rn rn rn rn rn[/code]rn错误如下rn[code=Java]rn2010-6-16 15:13:56 de.innosystec.unrar.Archive setFilern警告: exception in archive constructor maybe file is encrypted or curruptrnjava.lang.NullPointerExceptionrn at de.innosystec.unrar.Archive.readHeaders(Archive.java:233)rn at de.innosystec.unrar.Archive.setFile(Archive.java:122)rn at de.innosystec.unrar.Archive.(Archive.java:106)rn at de.innosystec.unrar.Archive.(Archive.java:96)rn at ZipManager.unRarFile(ZipManager.java:371)rn at ZipManager.main(ZipManager.java:490)rn[/code]rnrn调试的时候出现下面这个是什么rn[code=Java][rn#rn# An unexpected error has been detected by Java Runtime Environment:rn#rn# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6da669a2, pid=1752, tid=3944rn#rn# Java VM: Java HotSpot(TM) Client VM (11.3-b02 mixed mode windows-x86)rn# Problematic frame:rn# V [jvm.dll+0x1b69a2]rn#rn# An error report file with more information is saved as:rn# E:\exercise\zip\hs_err_pid1752.logrn#rn# If you would like to submit a bug report, please visit:rn# http://java.sun.com/webapps/bugreport/crash.jsprn#rn/code]rn先前在别的地方用都好的 不知道什么原因 大侠请帮忙啊

没有更多推荐了,返回首页

私密
私密原因:
请选择设置私密原因
  • 广告
  • 抄袭
  • 版权
  • 政治
  • 色情
  • 无意义
  • 其他
其他原因:
120
出错啦
系统繁忙,请稍后再试