Automic Workload Automation

Error: A JNI error has occurred

  • 1.  Error: A JNI error has occurred

    Posted Nov 29, 2016 11:00 AM
    After a newll installation, when attempting to start the SAP agent from a CLI, for example with this kind of command (Windows):

    "C:\Program Files\Java\jdk1.8.0_77\bin\java.exe" -jar  "E:\Apps\AutomicV11\Agents\SAP01\bin\ucxjr3x.jar"

    The agent fails to start up and returns this kind of java error. No log file is created in the temp folder.

    =====================================================================================

    E:\Apps\AutomicV11\Agents\SAP01\bin>"C:\Program Files\Java\jdk1.8.0_77\bin\java.
    exe" -jar  "E:\Apps\AutomicV11\Agents\SAP01\bin\ucxjr3x.jar"
    Error: A JNI error has occurred, please check your installation and try again
    Exception in thread "main" java.lang.NoClassDefFoundError: com/sap/conn/jco/ext/
    DestinationDataProvider
            at java.lang.Class.getDeclaredMethods0(Native Method)
            at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
            at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
            at java.lang.Class.getMethod0(Class.java:3018)
            at java.lang.Class.getMethod(Class.java:1784)
            at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544
    )
            at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526)

    Caused by: java.lang.ClassNotFoundException: com.sap.conn.jco.ext.DestinationDat
    aProvider
            at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
            at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
            ... 7 more

    E:\Apps\AutomicV11\Agents\SAP01\bin>

    =====================================================================================

    The reason for this behavior is that the SAP Java Connector has not been copied into the bin folder of the Agent.

    The SAP Java Connector is in charge of providing all RFC API calls to the SAP agent which is also a Java application.

    The SAP Java Connector Version 3. can be download from the SAP support portal.