search cancel

SQL jobs fails with JNI error after upgrading system agent to r12 on Win2016

book

Article ID: 216793

calendar_today

Updated On:

Products

CA Workload Automation AE - System Agent (AutoSys)

Issue/Introduction

After upgrading system agent 11.3 SP6 to r12 on a Windows 2016 box, all sql plugin related jobs are failing with below error :

Exception in thread "main" java.lang.NoClassDefFoundError: cybermation.library.afm.CybInvalidAFMException
       at java.lang.J9VMInternals.prepareClassImpl(Native Method)
       at java.lang.J9VMInternals.prepareClassImpl(J9VMInternals.java:304)
       at java.lang.JClass.getMethodHelper(Class.java:1247)
       at java.lang.JClass.getMethod(Class.java:1191)
       at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544)
       at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526)
Caused by: java.lang.ClassNotFoundException: cybermation.library.afm.CybInvalidAFMException
       at java.net.URLClassLoader.findClass(URLClassLoader.java:591)
       at java.lang.ClassLoader.loadClassHelper(ClassLoader.java:953)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:898)
       at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
       at java.lang.ClassLoader.loadClassHelper(ClassLoader.java:881)
       ... 6 more
Error: A JNI error has occurred, please check your installation and try again

Environment

Release : 12.0

Component : CA Workload Automation AE - System Agent

Resolution

Verify following file "mssql_call.bat". This file can be found 

<system_agent_install_dir>\<agent_name>\wrappers

Example : C:\Program Files (x86)\CA\Workload Automation AE\SystemAgent\WA_AGENT\wrappers

Content of mssql_call.bat based on above location of system agent installation

@echo off
setlocal
set LIBS=C:\Program Files (x86)\CA\Workload Automation AE\SystemAgent\WA_AGENT\jars
set CLASSPATH="%CLASSPATH%;%LIBS%\*;%LIBS%\ext\*"
"C:\Program Files (x86)\CA\Workload Automation AE\SystemAgent\WA_AGENT\jre\bin\java.exe" -cp %CLASSPATH% cybermation.plugins.sql.SqlDriver %*
endlocal
exit /B %ERRORLEVEL%

Check if the LIBS statement and jre path corresponds with the system agent installation directories.