【发布时间】:2014-12-24 20:12:43
【问题描述】:
我有一个应该连接到 Microsoft SQL Server 的 Java 应用程序。我使用 JRE 1.8 和 sqljdbc4-2.0.jar。当我尝试运行时:
#
# 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");
}
【问题讨论】:
-
我们可以看看你的代码吗?我们不能告诉你任何事情。
-
我添加了代码.. :)
-
我猜你不能使用
integratedSecurity=true。也许您应该寻找另一个 JDBC 驱动程序。 -
D:\eclipse\workspace\Website\hs_err_pid8404.log 是否显示任何其他信息?
-
我建议改用jTDS JDBC Driver。
标签: java sql-server fatal-error