连接到Microsoft SQL Server时,Java Runtime Environment检测到致命错误

时间:2017-03-10 23:25:55

标签: java sql-server

我想使用java连接到sql server 2014但是我收到此错误

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0000000057e1ca43,pid=10584, tid=11060
#
# JRE version: Java(TM) SE Runtime Environment (8.0_45-b14) (build 1.8.0_45-b14)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.45-b02 mixed mode windows-amd64 compressed oops)
# Problematic frame:
# V  [jvm.dll+0x13ca43]
#
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#
# An error report file with more information is saved as:
#     C:\Users\Bcc\Documents\NetBeansProjects\testSyncProjectConnectMysqlAndSql\hs_err_pid10584.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
#

,日志文件的内容为

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0000000057e1ca43, pid=10584, tid=11060
#
# JRE version: Java(TM) SE Runtime Environment (8.0_45-b14) (build 1.8.0_45-b14)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.45-b02 mixed mode windows-amd64 compressed oops)
# Problematic frame:
# V  [jvm.dll+0x13ca43]
#
#Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
#

---------------  T H R E A D  ---------------

Current thread (0x0000000002300800):  JavaThread "main" [_thread_in_vm, id=11060, stack(0x0000000002120000,0x0000000002220000)]

siginfo: ExceptionCode=0xc0000005, reading address 0x00000002bf8fc268

Registers:
RAX=0x0000000000000000, RBX=0x0000000002300800, RCX=0x0000000000000003, RDX=0x00000002bf8fc200
RSP=0x000000000221ea20, RBP=0x000000000221eb70, RSI=0x00000000023009f8, RDI=0x0000000002300800
R8 =0xffff8003f52c23b0, R9 =0x00007ffc0ad3dc7f, R10=0x000000000000002f, R11=0x000000000000002f
R12=0x0000000000000000, R13=0x0000000000000000, R14=0x000000000221edb0, R15=0x000000000221ed80
RIP=0x0000000057e1ca43, EFLAGS=0x0000000000010206

Top of Stack: (sp=0x000000000221ea20)
0x000000000221ea20:   00007ffc0ad3dc50 0000000002300800
0x000000000221ea30:   000000000221eb70 0000000000000000
0x000000000221ea40:   0000000002300800 0000000000000000
0x000000000221ea50:   0000000000000000 0000000000000000
0x000000000221ea60:   00000000023ee060 00007ffc0ad168f4
0x000000000221ea70:   00000000023009f8 000000000221eb70
0x000000000221ea80:   0000000002300800 00000000024612e0
0x000000000221ea90:   0000000000000000 00000000024613d7
0x000000000221eaa0:   00000000024616e0 0000000000000000
0x000000000221eab0:   0000000000000000 0000000000000000
0x000000000221eac0:   00000000024612e0 0000000002010000
0x000000000221ead0:   0000000000000000 0000000000000000
0x000000000221eae0:   0000000000000000 0000000000000000
0x000000000221eaf0:   0000000000000000 0000000000000000
0x000000000221eb00:   0000000000000000 000000000221edb8
0x000000000221eb10:   000000000221ed98 000000000221ed80 

Instructions: (pc=0x0000000057e1ca43)
0x0000000057e1ca23:   00 00 48 8b 17 74 15 8b 52 08 8b 0d 75 3d 65 00
0x0000000057e1ca33:   48 d3 e2 48 03 15 63 3d 65 00 eb 04 48 8b 52 08
0x0000000057e1ca43:   48 8b 52 68 48 8b ce e8 11 61 0d 00 48 83 7c 24
0x0000000057e1ca53:   28 00 48 8b f0 74 0a 48 8d 4c 24 20 e8 2c ae 13 


Register to memory mapping:

RAX=0x0000000000000000 is an unknown value
RBX=0x0000000002300800 is a thread
RCX=0x0000000000000003 is an unknown value
RDX=0x00000002bf8fc200 is an unknown value
RSP=0x000000000221ea20 is pointing into the stack for thread: 0x0000000002300800
RBP=0x000000000221eb70 is pointing into the stack for thread: 0x0000000002300800
RSI=0x00000000023009f8 is an unknown value
RDI=0x0000000002300800 is a thread
R8 =0xffff8003f52c23b0 is an unknown value
R9 =0x00007ffc0ad3dc7f is an unknown value
R10=0x000000000000002f is an unknown value
R11=0x000000000000002f is an unknown value
R12=0x0000000000000000 is an unknown value
R13=0x0000000000000000 is an unknown value
R14=0x000000000221edb0 is pointing into the stack for thread: 0x0000000002300800
R15=0x000000000221ed80 is pointing into the stack for thread: 0x0000000002300800

Stack: [0x0000000002120000,0x0000000002220000],  sp=0x000000000221ea20,  free space=1018k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [jvm.dll+0x13ca43]
C  [sqljdbc_auth.dll+0x68f4]
C  0x0000000002415e34

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j  com.microsoft.sqlserver.jdbc.AuthenticationJNI.SNISecGenClientContext([B[I[BI[B[I[ZLjava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/logging/Logger;)I+0
j  com.microsoft.sqlserver.jdbc.AuthenticationJNI.GenerateClientContext([BI[B[I[Z)I+24
j  com.microsoft.sqlserver.jdbc.SQLServerConnection.SSPIData([B[B[I[ZLcom/microsoft/sqlserver/jdbc/AuthenticationJNI;)V+13
j  com.microsoft.sqlserver.jdbc.SQLServerConnection.sendLogon(Lcom/microsoft/sqlserver/jdbc/SQLServerConnection$LogonCommand;Lcom/microsoft/sqlserver/jdbc/AuthenticationJNI;)V+151
j  com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(Lcom/microsoft/sqlserver/jdbc/SQLServerConnection$LogonCommand;)V+20
j  com.microsoft.sqlserver.jdbc.SQLServerConnection.access$000(Lcom/microsoft/sqlserver/jdbc/SQLServerConnection;Lcom/microsoft/sqlserver/jdbc/SQLServerConnection$LogonCommand;)V+2
j  com.microsoft.sqlserver.jdbc.SQLServerConnection$LogonCommand.doExecute()Z+5
j  com.microsoft.sqlserver.jdbc.TDSCommand.execute(Lcom/microsoft/sqlserver/jdbc/TDSWriter;Lcom/microsoft/sqlserver/jdbc/TDSReader;)Z+30
j  com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(Lcom/microsoft/sqlserver/jdbc/TDSCommand;)Z+45
j  com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(Lcom/microsoft/sqlserver/jdbc/ServerPortPlaceHolder;II)V+284
j  com.microsoft.sqlserver.jdbc.SQLServerConnection.login(Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;Lcom/microsoft/sqlserver/jdbc/FailoverInfo;IJ)V+399
j  com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(Ljava/util/Properties;Lcom/microsoft/sqlserver/jdbc/SQLServerPooledConnection;)Ljava/sql/Connection;+1736
j  com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(Ljava/lang/String;Ljava/util/Properties;)Ljava/sql/Connection;+45
j  java.sql.DriverManager.getConnection(Ljava/lang/String;Ljava/util/Properties;Ljava/lang/Class;)Ljava/sql/Connection;+171
j  java.sql.DriverManager.getConnection(Ljava/lang/String;)Ljava/sql/Connection;+13
j  testSyncProjectConnectMysqlAndSql.SqlConnection.<init>()V+16
j  testSyncProjectConnectMysqlAndSql.TestSyncProjectConnectMysqlAndSql.main([Ljava/lang/String;)V+4
v  ~StubRoutines::call_stub

---------------  P R O C E S S  ---------------

Java Threads: ( => current thread )
  0x0000000016fae800 JavaThread "Service Thread" daemon [_thread_blocked, id=12120, stack(0x0000000018ba0000,0x0000000018ca0000)]
  0x0000000016f5c000 JavaThread "C1 CompilerThread2" daemon [_thread_blocked, id=3624, stack(0x00000000186a0000,0x00000000187a0000)]
  0x0000000016f59000 JavaThread "C2 CompilerThread1" daemon [_thread_in_native, id=8876, stack(0x00000000185a0000,0x00000000186a0000)]
  0x0000000016f56800 JavaThread "C2 CompilerThread0" daemon [_thread_blocked, id=4804, stack(0x00000000184a0000,0x00000000185a0000)]
  0x0000000016f55800 JavaThread "Attach Listener" daemon [_thread_blocked, id=6372, stack(0x00000000183a0000,0x00000000184a0000)]
  0x0000000016fa7800 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=12028, stack(0x00000000182a0000,0x00000000183a0000)]
  0x0000000016f19800 JavaThread "Finalizer" daemon [_thread_blocked, id=8308, stack(0x00000000181a0000,0x00000000182a0000)]
  0x0000000016f18800 JavaThread "Reference Handler" daemon [_thread_blocked, id=7956, stack(0x00000000180a0000,0x00000000181a0000)]
=>0x0000000002300800 JavaThread "main" [_thread_in_vm, id=11060, stack(0x0000000002120000,0x0000000002220000)]

Other Threads:
  0x0000000016f17000 VMThread [stack: 0x0000000017fa0000,0x00000000180a0000] [id=8300]
  0x0000000018813800 WatcherThread [stack: 0x0000000018ca0000,0x0000000018da0000] [id=4676]

VM state:not at safepoint (normal execution)

VM Mutex/Monitor currently owned by a thread: None

Heap:
 PSYoungGen      total 38400K, used 16296K [0x00000000d5d80000, 0x00000000d8800000, 0x0000000100000000)
  eden space 33280K, 48% used [0x00000000d5d80000,0x00000000d6d6a3d8,0x00000000d7e00000)
  from space 5120K, 0% used [0x00000000d8300000,0x00000000d8300000,0x00000000d8800000)
  to   space 5120K, 0% used [0x00000000d7e00000,0x00000000d7e00000,0x00000000d8300000)
 ParOldGen       total 87552K, used 0K [0x0000000081800000, 0x0000000086d80000, 0x00000000d5d80000)
  object space 87552K, 0% used [0x0000000081800000,0x0000000081800000,0x0000000086d80000)
 Metaspace       used 7599K, capacity 7766K, committed 7808K, reserved 1056768K
  class space    used 802K, capacity 859K, committed 896K, reserved 1048576K

Card table byte_map: [0x00000000117c0000,0x0000000011bc0000] byte_map_base: 0x00000000113b4000

Marking Bits: (ParMarkBitMap*) 0x00000000584e4040
 Begin Bits: [0x0000000012270000, 0x0000000014210000)
 End Bits:   [0x0000000014210000, 0x00000000161b0000)

Polling page: 0x0000000000950000

CodeCache: size=245760Kb used=2653Kb max_used=2653Kb free=243106Kb
 bounds [0x0000000002400000, 0x00000000026a0000, 0x0000000011400000]
 total_blobs=1002 nmethods=675 adapters=240
 compilation: enabled

Compilation events (10 events):
Event: 0.556 Thread 0x0000000016f56800  672       4       sun.security.provider.MD5::II (31 bytes)
Event: 0.556 Thread 0x0000000016f56800 nmethod 672 0x0000000002699450 code [0x0000000002699580, 0x00000000026995f8]
Event: 0.558 Thread 0x0000000016f5c000  674       3       sun.net.www.ParseUtil::encodePath (336 bytes)
Event: 0.559 Thread 0x0000000016f5c000 nmethod 674 0x0000000002699650 code [0x00000000026998c0, 0x000000000269a8b8]
Event: 0.561 Thread 0x0000000016f5c000  675       3       java.util.ArrayList$Itr::hasNext (20 bytes)
Event: 0.561 Thread 0x0000000016f5c000 nmethod 675 0x0000000002694d50 code [0x0000000002694ec0, 0x0000000002695090]
Event: 0.561 Thread 0x0000000016f5c000  676       1       sun.security.jca.ProviderList::access$100 (5 bytes)
Event: 0.561 Thread 0x0000000016f5c000 nmethod 676 0x0000000002694a90 code [0x0000000002694be0, 0x0000000002694cd0]
Event: 0.561 Thread 0x0000000016f5c000  677  s!   3       sun.security.jca.ProviderConfig::getProvider (115 bytes)
Event: 0.562 Thread 0x0000000016f5c000 nmethod 677 0x0000000002696dd0 code [0x0000000002696f80, 0x0000000002697808]

GC Heap History (0 events):
No events

Deoptimization events (7 events):
Event: 0.261 Thread 0x0000000002300800 Uncommon trap: reason=unstable_if action=reinterpret pc=0x0000000002590864 method=java.util.HashMap.putVal(ILjava/lang/Object;Ljava/lang/Object;ZZ)Ljava/lang/Object; @ 181
Event: 0.277 Thread 0x0000000002300800 Uncommon trap: reason=class_check action=maybe_recompile pc=0x00000000025bcc5c method=java.util.HashMap.putVal(ILjava/lang/Object;Ljava/lang/Object;ZZ)Ljava/lang/Object; @ 253
Event: 0.277 Thread 0x0000000002300800 Uncommon trap: reason=class_check action=maybe_recompile pc=0x00000000025bcc5c method=java.util.HashMap.putVal(ILjava/lang/Object;Ljava/lang/Object;ZZ)Ljava/lang/Object; @ 253
Event: 0.277 Thread 0x0000000002300800 Uncommon trap: reason=class_check action=maybe_recompile pc=0x00000000025bcc5c method=java.util.HashMap.putVal(ILjava/lang/Object;Ljava/lang/Object;ZZ)Ljava/lang/Object; @ 253
Event: 0.277 Thread 0x0000000002300800 Uncommon trap: reason=class_check action=maybe_recompile pc=0x00000000025bcc5c method=java.util.HashMap.putVal(ILjava/lang/Object;Ljava/lang/Object;ZZ)Ljava/lang/Object; @ 253
Event: 0.411 Thread 0x0000000002300800 Uncommon trap: reason=unstable_if action=reinterpret pc=0x00000000025b8e14 method=java.lang.CharacterDataLatin1.digit(II)I @ 82
Event: 0.562 Thread 0x0000000002300800 Uncommon trap: reason=unstable_if action=reinterpret pc=0x0000000002689a30 method=java.util.HashMap.resize()[Ljava/util/HashMap$Node; @ 56

Internal exceptions (6 events):
Event: 0.034 Thread 0x0000000002300800 Exception <a 'java/lang/NoSuchMethodError': Method sun.misc.Unsafe.defineClass(Ljava/lang/String;[BII)Ljava/lang/Class; name or signature does not match> (0x00000000d5d92f40) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u45\3457\hotspot\sr ك‰Nصچ،?
Event: 0.034 Thread 0x0000000002300800 Exception <a 'java/lang/NoSuchMethodError': Method sun.misc.Unsafe.prefetchRead(Ljava/lang/Object;J)V name or signature does not match> (0x00000000d5d931d0) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u45\3457\hotspot\src\share\vm\prims\j\ع؛ه4إ?
Event: 0.166 Thread 0x0000000002300800 Exception <a 'java/security/PrivilegedActionException'> (0x00000000d6145d80) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u45\3457\hotspot\src\share\vm\prims\jvm.cpp, line 1382]
Event: 0.166 Thread 0x0000000002300800 Exception <a 'java/security/PrivilegedActionException'> (0x00000000d6145f38) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u45\3457\hotspot\src\share\vm\prims\jvm.cpp, line 1382]
Event: 0.166 Thread 0x0000000002300800 Exception <a 'java/security/PrivilegedActionException'> (0x00000000d6149cd0) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u45\3457\hotspot\src\share\vm\prims\jvm.cpp, line 1382]
Event: 0.166 Thread 0x0000000002300800 Exception <a 'java/security/PrivilegedActionException'> (0x00000000d6149e88) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u45\3457\hotspot\src\share\vm\prims\jvm.cpp, line 1382]

Events (10 events):
Event: 0.559 loading class javax/crypto/MacSpi done
Event: 0.561 loading class sun/security/ssl/CipherBox$1
Event: 0.561 loading class sun/security/ssl/CipherBox$1 done
Event: 0.561 loading class java/lang/StrictMath
Event: 0.561 loading class java/lang/StrictMath done
Event: 0.562 Thread 0x0000000002300800 Uncommon trap: trap_request=0xffffff65 fr.pc=0x0000000002689a30
Event: 0.562 Thread 0x0000000002300800 DEOPT PACKING pc=0x0000000002689a30 sp=0x000000000221ebc0
Event: 0.562 Thread 0x0000000002300800 DEOPT UNPACKING pc=0x000000000244582a sp=0x000000000221eb20 mode 2
Event: 0.562 loading class com/microsoft/sqlserver/jdbc/AuthenticationJNI
Event: 0.562 loading class com/microsoft/sqlserver/jdbc/AuthenticationJNI done


Dynamic libraries:
0x00007ff6cba10000 - 0x00007ff6cba47000     C:\Program Files\Java\jdk1.8.0_45\bin\java.exe
0x00007ffc2c060000 - 0x00007ffc2c221000     C:\Windows\SYSTEM32\ntdll.dll
0x00007ffc2bd20000 - 0x00007ffc2bdcd000     C:\Windows\system32\KERNEL32.DLL
0x00007ffc29550000 - 0x00007ffc2972d000     C:\Windows\system32\KERNELBASE.dll
0x00007ffc2bde0000 - 0x00007ffc2be86000     C:\Windows\system32\ADVAPI32.dll
0x00007ffc2b630000 - 0x00007ffc2b6cd000     C:\Windows\system32\msvcrt.dll
0x00007ffc29730000 - 0x00007ffc2978b000     C:\Windows\system32\sechost.dll
0x00007ffc2b7a0000 - 0x00007ffc2b8c6000     C:\Windows\system32\RPCRT4.dll
0x00007ffc2bb90000 - 0x00007ffc2bcde000     C:\Windows\system32\USER32.dll
0x00007ffc2b200000 - 0x00007ffc2b386000     C:\Windows\system32\GDI32.dll
0x00007ffc20430000 - 0x00007ffc206a4000     C:\Windows\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.10240.16384_none_f41f7b285750ef43\COMCTL32.dll
0x00007ffc2bce0000 - 0x00007ffc2bd16000     C:\Windows\system32\IMM32.DLL
0x00007ffc2ba20000 - 0x00007ffc2bb7c000     C:\Windows\system32\MSCTF.dll
0x00000000591f0000 - 0x00000000592c2000     C:\Program Files\Java\jdk1.8.0_45\jre\bin\msvcr100.dll
0x0000000057ce0000 - 0x0000000058563000     C:\Program Files\Java\jdk1.8.0_45\jre\bin\server\jvm.dll
0x00007ffc2bdd0000 - 0x00007ffc2bdd8000     C:\Windows\system32\PSAPI.DLL
0x00007ffc1e930000 - 0x00007ffc1e953000     C:\Windows\SYSTEM32\WINMM.dll
0x00007ffc25730000 - 0x00007ffc25739000     C:\Windows\SYSTEM32\WSOCK32.dll
0x00007ffc20420000 - 0x00007ffc2042a000     C:\Windows\SYSTEM32\VERSION.dll
0x00007ffc2b6d0000 - 0x00007ffc2b739000     C:\Windows\system32\WS2_32.dll
0x00007ffc2bb80000 - 0x00007ffc2bb88000     C:\Windows\system32\NSI.dll
0x00007ffc1e900000 - 0x00007ffc1e92c000     C:\Windows\SYSTEM32\WINMMBASE.dll
0x00007ffc29330000 - 0x00007ffc29374000     C:\Windows\system32\cfgmgr32.dll
0x00007ffc27400000 - 0x00007ffc27427000     C:\Windows\SYSTEM32\DEVOBJ.dll
0x00000000591a0000 - 0x00000000591af000     C:\Program Files\Java\jdk1.8.0_45\jre\bin\verify.dll
0x0000000059170000 - 0x0000000059199000     C:\Program Files\Java\jdk1.8.0_45\jre\bin\java.dll
0x0000000059150000 - 0x0000000059166000     C:\Program Files\Java\jdk1.8.0_45\jre\bin\zip.dll
0x00007ffc29c70000 - 0x00007ffc2b195000     C:\Windows\system32\SHELL32.dll
0x00007ffc28be0000 - 0x00007ffc29209000     C:\Windows\system32\windows.storage.dll
0x00007ffc29880000 - 0x00007ffc29afc000     C:\Windows\system32\combase.dll
0x00007ffc2b540000 - 0x00007ffc2b591000     C:\Windows\system32\shlwapi.dll
0x00007ffc28b00000 - 0x00007ffc28b0f000     C:\Windows\system32\kernel.appcore.dll
0x00007ffc29210000 - 0x00007ffc292c3000     C:\Windows\system32\shcore.dll
0x00007ffc28a90000 - 0x00007ffc28ada000     C:\Windows\system32\powrprof.dll
0x00007ffc28ae0000 - 0x00007ffc28af3000     C:\Windows\system32\profapi.dll
0x0000000059130000 - 0x000000005914a000     C:\Program Files\Java\jdk1.8.0_45\jre\bin\net.dll
0x00007ffc282a0000 - 0x00007ffc282fd000     C:\Windows\system32\mswsock.dll
0x00007ffc280a0000 - 0x00007ffc28148000     C:\Windows\SYSTEM32\DNSAPI.dll
0x00007ffc1f510000 - 0x00007ffc1f51a000     C:\Windows\System32\rasadhlp.dll
0x00007ffc1fff0000 - 0x00007ffc20058000     C:\Windows\System32\fwpuclnt.dll
0x00007ffc289c0000 - 0x00007ffc289e8000     C:\Windows\SYSTEM32\bcrypt.dll
0x0000000057a40000 - 0x0000000057a64000     C:\Program Files\Java\jdk1.8.0_45\jre\bin\sunec.dll
0x00007ffc28300000 - 0x00007ffc28317000     C:\Windows\SYSTEM32\CRYPTSP.dll
0x00007ffc27f50000 - 0x00007ffc27f83000     C:\Windows\system32\rsaenh.dll
0x00007ffc28080000 - 0x00007ffc2809f000     C:\Windows\SYSTEM32\USERENV.dll
0x00007ffc288b0000 - 0x00007ffc2891b000     C:\Windows\system32\bcryptprimitives.dll
0x00007ffc28470000 - 0x00007ffc2847b000     C:\Windows\SYSTEM32\CRYPTBASE.dll
0x00007ffc26650000 - 0x00007ffc26688000     C:\Windows\SYSTEM32\IPHLPAPI.DLL
0x00007ffc26640000 - 0x00007ffc2664b000     C:\Windows\SYSTEM32\WINNSI.DLL
0x00007ffc21ef0000 - 0x00007ffc21f06000     C:\Windows\SYSTEM32\dhcpcsvc6.DLL
0x00007ffc21ed0000 - 0x00007ffc21eea000     C:\Windows\SYSTEM32\dhcpcsvc.DLL
0x0000000058e10000 - 0x0000000058e21000     C:\Program Files\Java\jdk1.8.0_45\jre\bin\nio.dll
0x00007ffc19e10000 - 0x00007ffc19e25000     C:\Windows\system32\napinsp.dll
0x00007ffc19e40000 - 0x00007ffc19e5a000     C:\Windows\system32\pnrpnsp.dll
0x00007ffc26cf0000 - 0x00007ffc26d08000     C:\Windows\system32\NLAapi.dll
0x00007ffc19e60000 - 0x00007ffc19e6d000     C:\Windows\System32\winrnr.dll
0x00007ffc19ea0000 - 0x00007ffc19eb5000     C:\Windows\system32\wshbth.dll
0x00007ffc0ad10000 - 0x00007ffc0ad5e000     C:\Program Files\Java\jdk1.8.0_45\jre\bin\sqljdbc_auth.dll
0x00007ffc2b8d0000 - 0x00007ffc2ba11000     C:\Windows\system32\ole32.dll
0x00007ffc29380000 - 0x00007ffc29541000     C:\Windows\system32\CRYPT32.dll
0x00007ffc28b10000 - 0x00007ffc28b21000     C:\Windows\system32\MSASN1.dll
0x00007ffc23010000 - 0x00007ffc2301c000     C:\Windows\system32\secur32.dll
0x00007ffc286d0000 - 0x00007ffc286fc000     C:\Windows\SYSTEM32\SSPICLI.DLL
0x00007ffc28350000 - 0x00007ffc28444000     C:\Windows\system32\kerberos.DLL
0x00007ffc28320000 - 0x00007ffc28348000     C:\Windows\SYSTEM32\KerbClientShared.dll
0x00007ffc28450000 - 0x00007ffc28464000     C:\Windows\SYSTEM32\cryptdll.dll
0x00007ffc28240000 - 0x00007ffc2829f000     C:\Windows\system32\msv1_0.DLL
0x00007ffc28230000 - 0x00007ffc2823b000     C:\Windows\SYSTEM32\NtlmShared.dll
0x00007ffc10170000 - 0x00007ffc10198000     C:\Windows\system32\ntdsapi.dll
0x00007ffc235e0000 - 0x00007ffc2376a000     C:\Windows\SYSTEM32\dbghelp.dll

VM Arguments:
jvm_args: -Dfile.encoding=UTF-8 
java_command: testSyncProjectConnectMysqlAndSql.TestSyncProjectConnectMysqlAndSql
java_class_path (initial): C:\Users\Bcc\Desktop\sqljdbc4-3.0.jar;C:\Users\Bcc\Desktop\com.mysql.jdbc_5.1.5.jar;C:\Users\Bcc\Desktop\sqljdbc_6.0\enu\jre8\sqljdbc42.jar;C:\Users\Bcc\Documents\NetBeansProjects\testSyncProjectConnectMysqlAndSql\build\classes
Launcher Type: SUN_STANDARD

Environment Variables:
PATH=C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Skype\Phone\;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\xampp\php;C:\ProgramData\ComposerSetup\bin;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft SQL Server\120\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\ManagementStudio\;C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn\;C:\Program Files\Git\cmd;C:\Users\Bcc\AppData\Roaming\Composer\vendor\bin
USERNAME=Bcc
OS=Windows_NT
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 78 Stepping 3, GenuineIntel



---------------  S Y S T E M  ---------------

OS: Windows 10.0 , 64 bit Build 10240 (10.0.10240.16384)

CPU:total 4 (2 cores per cpu, 2 threads per core) family 6 model 78 stepping 3, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, avx, avx2, aes, clmul, erms, 3dnowpref, lzcnt, ht, tsc, tscinvbit, bmi1, bmi2, adx

Memory: 4k page, physical 8285184k(3671648k free), swap 9598092k(3407876k free)

vm_info: Java HotSpot(TM) 64-Bit Server VM (25.45-b02) for windows-amd64 JRE (1.8.0_45-b14), built on Apr 10 2015 10:34:15 by "java_re" with MS VC++ 10.0 (VS2010)

time: Sat Mar 11 00:48:37 2017
elapsed time: 0 seconds (0d 0h 0m 0s)

我的java代码是

public SqlConnection() throws SQLException {
    Connection conn=null;
    try {
        Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
        String connectionUrl="jdbc:sqlserver://localhost:1433;databaseName=testJava1;integratedSecurity=true";
        conn=DriverManager.getConnection(connectionUrl);

    } catch (Exception e) {
        e.printStackTrace();
    }finally{
        if (conn != null) {

            conn.close();

        }
    }

我在网上搜索了这个bug,但我找不到任何东西..

我正在使用netbeans IDE 8.0.2和jdk 1.8.0。

1 个答案:

答案 0 :(得分:1)

我认为你的问题在于sqljdbc_auth.dll,也许你没有使用正确的版本。

Java转储是非常严重的错误,涉及JNI方法,因此源代码可能是sqljdbc_auth.dll或JDK中的某些损坏文件。

您应该为sql server尝试最新的jdbc驱动程序,确保加载了最新的sqljdbc_auth.dll。

如果当前JVM中有一些损坏的文件,您还可以将JDK更新到最新版本(这是一个很好的做法)。