我正在尝试编写一个示例,以便从Java类连接到Intersystems Cache。我正在使用Intersystems Cache的eXtreme Data Objects框架。这是源代码 -
package demo;
import com.intersys.xdo.DatabaseConnection;
import com.intersys.xdo.DatabaseConnectionFactory;
import com.intersys.xdo.XDOException;
class XDODemo {
public static void main(String[] args) {
java.sql.Connection jdbcConnection = null;
DatabaseConnection xdoConnection = null;
String namespc = "USER";
String url = "jdbc:Cache://localhost:1972/" + namespc;
String user = "admin";
String password = "admin";
try {
xdoConnection = DatabaseConnectionFactory
.createJNIDatabaseConnection();
xdoConnection.connect(namespc, user, password);
} catch (XDOException e) {
System.out.println(e.getMessage());
} catch (Exception e) {
System.out.println(e.getMessage());
} finally {
try {
if (xdoConnection != null)
xdoConnection.disconnect();
} catch (XDOException e) {
System.out.println(e.getMessage());
} catch (Exception e) {
System.out.println(e.getMessage());
}
}
}
}
当我运行这个类时,我看到以下异常 -
lc_conn :: connect_device返回Db_err:source:lc_conn :: connect()消息:lc_conn :: connect:CacheSecureStart返回-15:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x000000000045ab78, pid=5132, tid=9084
#
# JRE version: Java(TM) SE Runtime Environment (7.0_60-b19) (build 1.7.0_60-b19)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (24.60-b09 mixed mode windows-amd64 compressed oops)
# Problematic frame:
# C [lcbjni.dll+0xab78]
#
# 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:\intersystems\trycache1\mgr\hs_err_pid5132.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.sun.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
你能帮忙解决这个问题吗?
以下是审计表详情 -
答案 0 :(得分:2)
这应该让你通过JNI登录