1

我正在尝试编写一个示例以从 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: 来源: 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.
#

你能帮忙解决这个问题吗?

这是审计表的详细信息 -

在此处输入图像描述

4

1 回答 1

2
  1. 从 Cube 打开 ManagementPortal。
  2. 转到主页->系统管理->安全->服务
  3. 点击 %Service_Callin 打开编辑窗口
  4. 检查服务启用复选框

这应该让您通过 JNI 登录

于 2014-09-30T03:30:42.053 回答