We are moving a custom SDK program from Solaris to Linux environment and it fails with the following exception:
FATAL ERROR: Exception from System.loadLibrary(smjavaagentapi) java.lang.UnsatisfiedLinkError: smjavaagentapi (Not found in java.library.path)
FATAL ERROR: Exception from AgentAPI.initialize() java.lang.UnsatisfiedLinkError: netegrity/siteminder/javaagent/AgentAPI.initialize()V
Exception in thread "main" java.lang.UnsatisfiedLinkError: netegrity/siteminder/javaagent/AgentAPI.javaagent_api_init(Lnetegrity/siteminder/javaagent/InitDef;)I
at netegrity.siteminder.javaagent.AgentAPI.init(AgentAPI.java:509)
at com.ig.ci.sm.util.ApiConnection.createApiConnection(Unknown Source)
at com.ig.ci.sm.util.ApiConnection.createAdminSession(Unknown Source)
It was working fine on the Solaris box. How can we solve this?
The issue is caused as the smjavaagentapi cannot be loaded during startup as it cannot be found on the current path. This happened becasue the CAPKIHOME path environment variable is missing.
Verify the following:
1: Use a compatible version of Java to compile the SDK code.
2: Set CAPKIHOME environment variable path. You can do it as follows:
# CAPKIHOME="/usr/local/CA/webagent/CAPKI"
# export CAPKIHOME
You can also install a regular Web Agent on the Linux box and then it will set the CAPKIHOME path.