编写了一个测试用例,多线程向数据库插入数据。在单线程模式下测试是没问题的。但是多线程就报了这个错误
# An unexpected error has been detected by HotSpot Virtual Machine:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x7c92100b, pid=2284, tid=3308
#
# Java VM: Java HotSpot(TM) Client VM (1.5.0_11-b03 mixed mode)
# Problematic frame:
# C [ntdll.dll+0x100b]
#
# An error report file with more information is saved as hs_err_pid2284.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp请高手帮忙看看大概是由于什么原因造成的?
# An unexpected error has been detected by HotSpot Virtual Machine:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x7c92100b, pid=2284, tid=3308
#
# Java VM: Java HotSpot(TM) Client VM (1.5.0_11-b03 mixed mode)
# Problematic frame:
# C [ntdll.dll+0x100b]
#
# An error report file with more information is saved as hs_err_pid2284.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp请高手帮忙看看大概是由于什么原因造成的?
解决方案 »
- 最近有个想法。
- appfuse自动生成crud代码问题
- java 一个JFrame中进行多个JPanel的切换
- JPA用标注怎么定义某一列为索引啊?
- java CacheRowSet 获取ORACLE10G的数据的时候 报异常Invalid scale size Cannot be less than zero
- 关于STRUTS的一个应用问题
- 高分!不够再加!求一个接口程序!
- The value of the local variable age is not used提示这个是什么意思
- 数据源以及线程的问题
- 三个div之间使用<C:foreach>遍历传值问题
- 各位大哥~讨论下电影院座位表的设计问题
- 我想在jsp页面上显示 进度图
--------------- T H R E A D ---------------Current thread (0x008f2bb0): JavaThread "Thread-34" daemon [_thread_in_native, id=3308]siginfo: ExceptionCode=0xc0000005, reading address 0x00000018Registers:
EAX=0x00000004, EBX=0x73570000, ECX=0x7ff7f000, EDX=0x00000004
ESP=0x0be0f78c, EBP=0x0be0f7a4, ESI=0x00000000, EDI=0x0bed1d2c
EIP=0x7c92100b, EFLAGS=0x00010202Top of Stack: (sp=0x0be0f78c)
0x0be0f78c: 735759fa 00000004 0bed1d24 7354139f
0x0be0f79c: 0bed1d24 0bed1d00 0be0f7b8 73546ca6
0x0be0f7ac: 0bed1d24 0bed13f0 0bed1d00 0be0f7d0
0x0be0f7bc: 7354a4bd 0bed1d00 00915770 008f2c70
0x0be0f7cc: 074f0150 0be0f7e8 6d385ffe 0bed1d00
0x0be0f7dc: 0be0f7f0 008f2bb0 074f0150 0be0f820
0x0be0f7ec: 00c1a025 00000000 0be0f83c 0bed1d00
0x0be0f7fc: 00000000 0be0f830 0be0f804 00000000 Instructions: (pc=0x7c92100b)
0x7c920ffb: 00 00 00 00 00 64 8b 0d 18 00 00 00 8b 54 24 04
0x7c92100b: 83 7a 14 00 75 4f f0 ff 42 04 75 19 8b 41 24 89
Stack: [0x0bdd0000,0x0be10000), sp=0x0be0f78c, free space=253k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C [ntdll.dll+0x100b]
C [ODBC32.dll+0x6ca6]
C [ODBC32.dll+0xa4bd]
C [JdbcOdbc.dll+0x5ffe]
j sun.jdbc.odbc.JdbcOdbc.rowCount(J[B)I+0
j sun.jdbc.odbc.JdbcOdbc.SQLRowCount(J)I+47
J sun.jdbc.odbc.JdbcOdbcStatement.getRowCount()I
J sun.jdbc.odbc.JdbcOdbcStatement.getUpdateCount()I
v ~RuntimeStub::alignment_frame_return Runtime1 stub
j sun.jdbc.odbc.JdbcOdbcStatement.executeUpdate(Ljava/lang/String;)I+58
J dao.SqlServerJDBC.update(Ljava/lang/String;)V
j autoc.Print2.insert()V+37
j autoc.Print2.run()V+1
v ~StubRoutines::call_stub
V [jvm.dll+0x871a8]
V [jvm.dll+0xdf462]
V [jvm.dll+0x87079]
V [jvm.dll+0x86dd6]
V [jvm.dll+0xa1a14]
V [jvm.dll+0x110aa6]
V [jvm.dll+0x110a74]
C [MSVCRT.dll+0x2a3b0]
C [kernel32.dll+0xb713]Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j sun.jdbc.odbc.JdbcOdbc.rowCount(J[B)I+0
j sun.jdbc.odbc.JdbcOdbc.SQLRowCount(J)I+47
J sun.jdbc.odbc.JdbcOdbcStatement.getRowCount()I
J sun.jdbc.odbc.JdbcOdbcStatement.getUpdateCount()I
v ~RuntimeStub::alignment_frame_return Runtime1 stub
j sun.jdbc.odbc.JdbcOdbcStatement.executeUpdate(Ljava/lang/String;)I+58
J dao.SqlServerJDBC.update(Ljava/lang/String;)V
j autoc.Print2.insert()V+37
j autoc.Print2.run()V+1
v ~StubRoutines::call_stub--------------- P R O C E S S ---------------Java Threads: ( => current thread )
=>0x008f2bb0 JavaThread "Thread-34" daemon [_thread_in_native, id=3308]
0x008f2400 JavaThread "Thread-33" daemon [_thread_in_native, id=1212]
0x008eaa70 JavaThread "TP-Monitor" daemon [_thread_blocked, id=1856]
0x008e84b0 JavaThread "TP-Processor4" daemon [_thread_in_native, id=3704]
0x008e8310 JavaThread "TP-Processor3" daemon [_thread_blocked, id=996]
0x00884a30 JavaThread "TP-Processor2" daemon [_thread_blocked, id=3368]
0x00883d80 JavaThread "TP-Processor1" daemon [_thread_blocked, id=3916]
0x008de620 JavaThread "http-1234-Monitor" [_thread_blocked, id=200]
0x008dd960 JavaThread "http-1234-Processor25" daemon [_thread_blocked, id=3060]
0x008dbe70 JavaThread "http-1234-Processor24" daemon [_thread_blocked, id=3260]
0x008dadd0 JavaThread "http-1234-Processor23" daemon [_thread_blocked, id=2944]
0x008d9a70 JavaThread "http-1234-Processor22" daemon [_thread_blocked, id=3652]
0x008d87e0 JavaThread "http-1234-Processor21" daemon [_thread_blocked, id=1276]
0x0086b1a0 JavaThread "http-1234-Processor20" daemon [_thread_in_native, id=416]
0x008d7990 JavaThread "http-1234-Processor19" daemon [_thread_blocked, id=3620]
0x008d5030 JavaThread "http-1234-Processor18" daemon [_thread_blocked, id=3804]
0x008d5e70 JavaThread "http-1234-Processor17" daemon [_thread_blocked, id=3008]
0x008d3d50 JavaThread "http-1234-Processor16" daemon [_thread_blocked, id=2768]
0x008d1500 JavaThread "http-1234-Processor15" daemon [_thread_blocked, id=3672]
0x008d0870 JavaThread "http-1234-Processor14" daemon [_thread_blocked, id=3984]
0x008cd6f0 JavaThread "http-1234-Processor13" daemon [_thread_blocked, id=1812]
0x008cea70 JavaThread "http-1234-Processor12" daemon [_thread_blocked, id=312]
0x008ce8d0 JavaThread "http-1234-Processor11" daemon [_thread_blocked, id=1020]
0x008cc920 JavaThread "http-1234-Processor10" daemon [_thread_blocked, id=2192]
0x008cb580 JavaThread "http-1234-Processor9" daemon [_thread_blocked, id=3056]
0x008cab20 JavaThread "http-1234-Processor8" daemon [_thread_blocked, id=2200]
0x008c9870 JavaThread "http-1234-Processor7" daemon [_thread_blocked, id=2456]
0x008c8870 JavaThread "http-1234-Processor6" daemon [_thread_blocked, id=4012]
0x008c7730 JavaThread "http-1234-Processor5" daemon [_thread_blocked, id=3516]
0x008c6780 JavaThread "http-1234-Processor4" daemon [_thread_blocked, id=640]
0x008c58b0 JavaThread "http-1234-Processor3" daemon [_thread_blocked, id=3544]
0x008c4530 JavaThread "http-1234-Processor2" daemon [_thread_blocked, id=3944]
0x008c4c70 JavaThread "http-1234-Processor1" daemon [_thread_blocked, id=720]
0x008c0190 JavaThread "ContainerBackgroundProcessor[StandardEngine[Catalina]]" daemon [_thread_blocked, id=356]
0x0083b640 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=4080]
0x0083ade0 JavaThread "CompilerThread0" daemon [_thread_blocked, id=3220]
0x008399e0 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=276]
0x00837dc0 JavaThread "JDWP Command Reader" daemon [_thread_in_native, id=2808]
0x00836cf0 JavaThread "JDWP Event Helper Thread" daemon [_thread_blocked, id=744]
0x008346c0 JavaThread "JDWP Transport Listener: dt_socket" daemon [_thread_blocked, id=3768]
0x0082db10 JavaThread "Finalizer" daemon [_thread_blocked, id=3216]
0x0082c8a0 JavaThread "Reference Handler" daemon [_thread_blocked, id=2736]
0x00823750 JavaThread "main" [_thread_in_native, id=3840]Other Threads:
0x0082bb90 VMThread [id=2100]
0x0083c040 WatcherThread [id=2936]VM state:not at safepoint (normal execution)VM Mutex/Monitor currently owned by a thread: None
Heap
def new generation total 576K, used 56K [0x02c10000, 0x02cb0000, 0x030f0000)
eden space 512K, 3% used [0x02c10000, 0x02c14e30, 0x02c90000)
from space 64K, 57% used [0x02ca0000, 0x02ca92b8, 0x02cb0000)
to space 64K, 0% used [0x02c90000, 0x02c90000, 0x02ca0000)
tenured generation total 5832K, used 4630K [0x030f0000, 0x036a2000, 0x06c10000)
the space 5832K, 79% used [0x030f0000, 0x03575a58, 0x03575c00, 0x036a2000)
compacting perm gen total 9472K, used 9390K [0x06c10000, 0x07550000, 0x0ac10000)
the space 9472K, 99% used [0x06c10000, 0x0753b860, 0x0753ba00, 0x07550000)
No shared spaces configured.Dynamic libraries:
0x00400000 - 0x0040d000 D:\Program Files\MyEclipse 5.5 M2\jre\bin\javaw.exe
0x7c920000 - 0x7c9b3000 C:\WINDOWS\system32\ntdll.dll
0x7c800000 - 0x7c91e000 C:\WINDOWS\system32\kernel32.dll
0x77da0000 - 0x77e49000 C:\WINDOWS\system32\ADVAPI32.dll
0x77e50000 - 0x77ee2000 C:\WINDOWS\system32\RPCRT4.dll
0x77fc0000 - 0x77fd1000 C:\WINDOWS\system32\Secur32.dll
0x77d10000 - 0x77da0000 C:\WINDOWS\system32\USER32.dll
0x77ef0000 - 0x77f39000 C:\WINDOWS\system32\GDI32.dll
0x77be0000 - 0x77c38000 C:\WINDOWS\system32\MSVCRT.dll
0x76300000 - 0x7631d000 C:\WINDOWS\system32\IMM32.DLL
0x62c20000 - 0x62c29000 C:\WINDOWS\system32\LPK.DLL
0x73fa0000 - 0x7400b000 C:\WINDOWS\system32\USP10.dll
0x30000000 - 0x30015000 D:\PROGRA~1\KASPER~1\KASPER~1.0\adialhk.dll
0x77f40000 - 0x77fb6000 C:\WINDOWS\system32\SHLWAPI.dll
0x10000000 - 0x1000d000 C:\WINDOWS\system32\OCMAPIHK.DLL
0x6d640000 - 0x6d7dd000 D:\Program Files\MyEclipse 5.5 M2\jre\bin\client\jvm.dll
0x76b10000 - 0x76b3a000 C:\WINDOWS\system32\WINMM.dll
0x6d290000 - 0x6d298000 D:\Program Files\MyEclipse 5.5 M2\jre\bin\hpi.dll
0x76bc0000 - 0x76bcb000 C:\WINDOWS\system32\PSAPI.DLL
0x6d390000 - 0x6d3c5000 D:\Program Files\MyEclipse 5.5 M2\jre\bin\jdwp.dll
0x6d610000 - 0x6d61c000 D:\Program Files\MyEclipse 5.5 M2\jre\bin\verify.dll
0x6d310000 - 0x6d32d000 D:\Program Files\MyEclipse 5.5 M2\jre\bin\java.dll
0x6d630000 - 0x6d63f000 D:\Program Files\MyEclipse 5.5 M2\jre\bin\zip.dll
0x6d220000 - 0x6d227000 D:\Program Files\MyEclipse 5.5 M2\jre\bin\dt_socket.dll
0x71a20000 - 0x71a37000 C:\WINDOWS\system32\WS2_32.dll
0x71a10000 - 0x71a18000 C:\WINDOWS\system32\WS2HELP.dll
0x719c0000 - 0x719fe000 C:\WINDOWS\System32\mswsock.dll
0x76ef0000 - 0x76f17000 C:\WINDOWS\system32\DNSAPI.dll
0x30460000 - 0x3047b000 D:\Program Files\Kaspersky Lab\Kaspersky Internet Security 7.0\dnsq.dll
0x76f80000 - 0x76f88000 C:\WINDOWS\System32\winrnr.dll
0x76f30000 - 0x76f5c000 C:\WINDOWS\system32\WLDAP32.dll
0x76f90000 - 0x76f96000 C:\WINDOWS\system32\rasadhlp.dll
0x0ad70000 - 0x0ad80000 C:\WINDOWS\system32\PGPlsp.dll
0x60fd0000 - 0x61025000 C:\WINDOWS\system32\hnetcfg.dll
0x71a00000 - 0x71a08000 C:\WINDOWS\System32\wshtcpip.dll
0x6d4d0000 - 0x6d4e3000 D:\Program Files\MyEclipse 5.5 M2\jre\bin\net.dll
0x6d380000 - 0x6d38d000 D:\Program Files\MyEclipse 5.5 M2\jre\bin\JdbcOdbc.dll
0x73540000 - 0x7357d000 C:\WINDOWS\system32\ODBC32.dll
0x5d170000 - 0x5d20a000 C:\WINDOWS\system32\COMCTL32.dll
0x76320000 - 0x76367000 C:\WINDOWS\system32\comdlg32.dll
0x7d590000 - 0x7dd84000 C:\WINDOWS\system32\SHELL32.dll
0x77180000 - 0x77283000 C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.5512_x-ww_35d4ce83\comctl32.dll
0x1f840000 - 0x1f857000 C:\WINDOWS\system32\odbcint.dll
0x4b470000 - 0x4b4dc000 C:\WINDOWS\system32\SQLSRV32.dll
0x5fdd0000 - 0x5fe25000 C:\WINDOWS\system32\NETAPI32.dll
0x770f0000 - 0x7717b000 C:\WINDOWS\system32\OLEAUT32.dll
0x76990000 - 0x76acd000 C:\WINDOWS\system32\ole32.dll
0x5c270000 - 0x5c29d000 C:\WINDOWS\system32\SQLUNIRL.dll
0x72f70000 - 0x72f96000 C:\WINDOWS\system32\WINSPOOL.DRV
0x77bd0000 - 0x77bd8000 C:\WINDOWS\system32\VERSION.dll
0x758a0000 - 0x758a8000 C:\WINDOWS\system32\NDDEAPI.DLL
0x305e0000 - 0x305f6000 D:\Program Files\Kaspersky Lab\Kaspersky Internet Security 7.0\miscr3.dll
0x1fa30000 - 0x1fa46000 C:\WINDOWS\system32\sqlsrv32.rll
0x30480000 - 0x3048e000 D:\Program Files\Kaspersky Lab\Kaspersky Internet Security 7.0\fssync.dll
0x78130000 - 0x781cb000 C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.762_x-ww_6b128700\MSVCR80.dll
0x4d3d0000 - 0x4d3eb000 C:\WINDOWS\system32\odbccp32.dll
0x6d880000 - 0x6d89b000 C:\WINDOWS\system32\DBNETLIB.DLL
0x71a40000 - 0x71a4b000 C:\WINDOWS\system32\WSOCK32.dll
0x71f00000 - 0x71f04000 C:\WINDOWS\system32\security.dll
0x77c40000 - 0x77c64000 C:\WINDOWS\system32\msv1_0.dll
0x76d30000 - 0x76d48000 C:\WINDOWS\system32\iphlpapi.dll
0x76770000 - 0x76783000 C:\WINDOWS\system32\ntdsapi.dll
0x765e0000 - 0x76673000 C:\WINDOWS\system32\crypt32.dll
0x76db0000 - 0x76dc2000 C:\WINDOWS\system32\MSASN1.dllVM Arguments:
jvm_args: -Dcatalina.home=D:\tomcat -Dcatalina.base=D:\tomcat -Djava.endorsed.dirs=D:\tomcat/common/endorsed -Djava.io.tmpdir=D:\tomcat\temp -Djava.library.path=D:\Program Files\MyEclipse 5.5 M2\bin;D:\tomcat\bin -Dsun.io.useCanonCaches=false -agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:31774
java_command: org.apache.catalina.startup.Bootstrap start
Launcher Type: SUN_STANDARDEnvironment Variables:
JAVA_HOME=C:\Program Files\Java\jdk1.6.0_02\bin
PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;D:\Program Files\SecureCRT\;C:\Program Files\Microsoft SQL Server\80\Tools\BINN
USERNAME=Administrator
OS=Windows_NT
PROCESSOR_IDENTIFIER=x86 Family 6 Model 15 Stepping 13, GenuineIntel
也许你换一台及其就好了(只是可能性),
不顾哦我看到你用到了jdbc-odbc桥,
不知道你用什么库,为什么不直接用jdbc驱动呢?