2014-12-24 5 views
1

Java에서 Microsoft SQL Server에 연결해야하는 응용 프로그램이 있습니다. JRE 1.8 및 sqljdbc4-2.0.jar를 사용합니다. 실행하려고 할 때 :Java Runtime Environment - 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 
# 
내가하지만 난 아무것도 찾을 수 없습니다 온라인이 버그를 검색

.. 여기

내가 사용하는 코드입니다 :이 사이트에 따르면

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"); 
    } 
+0

코드를 볼 수 있습니까? 우리는 이것으로부터 아무 것도 말할 수 없습니다. –

+0

코드를 추가했습니다. :) –

+0

나는'integratedSecurity = true'를 사용할 수 없다고 추측 할 것입니다. 다른 JDBC 드라이버를 찾아야합니다. –

답변

0

Building the Connection URL 당신이 미그 연결 문자열에 문제가 있습니다.

jdbc:sqlserver://localhost:1433;instance=SQLEXPRESS;databaseName=Mydatabase;integratedSecurity=true 

은 다음과 같아야합니다

jdbc:sqlserver://localhost;instanceName=SQLEXPRESS;databaseName=Mydatabase;integratedSecurity=true 

또한

.... 최적의 연결 성능을

, 연결할 때 portNumber를 설정해야합니다 (여기서 instanceName이 아닌 인스턴스를 참고) 명명 된 인스턴스에. 이렇게하면 포트 번호를 판별하기 위해 서버로의 왕복을 피할 수 있습니다. portNumber와 instanceName을 모두 사용하면 portNumber가 우선 적용되며 instanceName은 무시됩니다.

희망 하시겠습니까?

관련 문제