Error: A JNI error has occurred

Discussion created by Pascal_Osthus-bugat_1753 on Nov 29, 2016
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/
        at java.lang.Class.getDeclaredMethods0(Native Method)
        at java.lang.Class.privateGetDeclaredMethods(
        at java.lang.Class.privateGetMethodRecursive(
        at java.lang.Class.getMethod0(
        at java.lang.Class.getMethod(
        at sun.launcher.LauncherHelper.validateMainClass(
        at sun.launcher.LauncherHelper.checkAndLoadMain(

Caused by: java.lang.ClassNotFoundException:
        at java.lang.ClassLoader.loadClass(
        at sun.misc.Launcher$AppClassLoader.loadClass(
        at java.lang.ClassLoader.loadClass(
        ... 7 more



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.