1

I am trying to write an example to connect to the Intersystems Cache from a Java class. I am using the eXtreme Data Objects framework from Intersystems Cache`. Here is the source code -

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());
            }
        }
    }
}

When I run this class, I see the following exception -

lc_conn::connect_device returned Db_err: source: lc_conn::connect() message: lc_conn::connect: CacheSecureStart returned -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.
#

Could you please help in fixing this issue?

Here is the audit table details -

enter image description here

Andrew Tobilko
  • 48,120
  • 14
  • 91
  • 142
user3600073
  • 1,773
  • 3
  • 18
  • 21
  • Could you check to see if there are any entries in the Audit Log? (LoginFailures or Protect errors?) – Brandon Horst Sep 29 '14 at 17:58
  • Thank you for the reply. "Audit Log" gave me a hint to lookup the documentation. Then documentation helped me. Please see my own answer below. I also updated my question with the audit log. – user3600073 Sep 30 '14 at 03:35

1 Answers1

2
  1. Open ManagementPortal from Cube.
  2. go to Home->System Administration -> Security -> Services
  3. Click %Service_Callin to open edit window
  4. Check Service enabled checkbox

This should let you login via JNI

user3600073
  • 1,773
  • 3
  • 18
  • 21
  • I am getting a similar error `com.intersys.globals.GlobalsException: lc_conn::connect_device returned Db_err: source: lc_conn::connect() message: lc_conn::connect: CacheSecureStart returned -1: ` what could it be? – Andrew Tobilko Feb 25 '18 at 11:12
  • there are no audits logged (`LoginFailures`/ `ProtectErrors`) – Andrew Tobilko Feb 25 '18 at 11:20