1
我有一個應用程序在java應該連接到Microsoft SQL Server ..我使用JRE 1.8和sqljdbc4-2.0.jar ..當我嘗試運行:Java運行時環境檢測到致命錯誤 - Microsoft SQL Server
#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x000000006f41dd27, pid=8404, tid=8960
#
# JRE version: Java(TM) SE Runtime Environment (8.0_25-b18) (build 1.8.0_25-b18)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.25-b02 mixed mode windows-amd64 compressed oops)
# Problematic frame:
# V [jvm.dll+0x5dd27]
#
# 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:
# D:\eclipse\workspace\Website\hs_err_pid8404.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.sun.com/bugreport/crash.jsp
#
我搜索了這個bug在線,但我無法找到任何東西..
這是我使用的代碼:
try {
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver").newInstance();
String connectionUrl = "jdbc:sqlserver://localhost:1433;instance=SQLEXPRESS;databaseName=Mydatabase;integratedSecurity=true";
con = DriverManager.getConnection(connectionUrl);
System.out.println("Connected");
} catch (ClassNotFoundException e) {
throw new Exception("Driver Not Found");
}
我們可以看看你的代碼嗎?我們不能告訴你任何事情。 –
我加了代碼.. :) –
我猜測你不能使用'integratedSecurity = true'。也許你應該尋找另一個JDBC驅動程序。 –