FATAL ERROR: Exception from System.loadLibrary(smjavaagentapi) java.lang.UnsatisfiedLinkError: smjavaagentapi (Not found in java.library.path)
search cancel

FATAL ERROR: Exception from System.loadLibrary(smjavaagentapi) java.lang.UnsatisfiedLinkError: smjavaagentapi (Not found in java.library.path)

book

Article ID: 8976

calendar_today

Updated On:

Products

CA Single Sign On Secure Proxy Server (SiteMinder) CA Single Sign On SOA Security Manager (SiteMinder) CA Single Sign-On

Issue/Introduction

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?

Environment

SDK R12.52 SP2

Cause

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.

Resolution

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.