OAM 11g SDK API AccessClient Initialization Fails With OAMAGENT-02010 (Doc ID 1394989.1)

Last updated on MARCH 08, 2017

Applies to:

Oracle Access Manager - Version: 11.1.1.5.0 and later   [Release: and later ]
Information in this document applies to any platform.

Symptoms


Oracle Access Manager (OAM) 11g SDK Access API (AccessClient) program fails to initialize.

An 11g WebGate agent has been registered with OAM 11g Server and an AccessClient Java program has been created with reference to the following documentation:

Oracle Fusion Middleware Developer's Guide for Oracle Access Manager and Oracle Security Token Service 11g Release 1 (11.1.1)
2 Introduction to the Access SDK and API


The agent artifacts have been copied to a directory below the location referenced in the AccessClient.createDefaultInstance call.

When the program is run it fails with error 'AccessClient initialisation failed'.

a) If the agent is configured in Open mode and an agent password has been specified, it fails when decrypting the agent password.

Example:


"C:\Program Files\Java\jdk1.6.0_23\bin\javaw.exe" -client -classpath D:\Workdir\OAM\oam-server\.adf;D:\Workdir\OAM\oam-server\OAMAccessClient\classes;D:\Workdir\OAM\oam-server\servlet\lib\oamasdk-api.jar -Djavax.net.ssl.trustStore=D:\Workspace\Oracle\Middleware\wlserver_10.3\server\lib\DemoTrust.jks -Djava.util.logging.config.file=C:/temp/oamclient/oblix/lib/logging.properties OAMClient
Access Exception: OAMAGENT-02010
oracle.security.am.asdk.AccessException: OAMAGENT-02010: Oracle Access SDK initialization failed.
at oracle.security.am.asdk.AccessClient.initialize(AccessClient.java:639)
at oracle.security.am.asdk.AccessClient.<init>(AccessClient.java:527)
at oracle.security.am.asdk.AccessClient.createDefaultInstance(AccessClient.java:234)
at OAMClient.<init>(OAMClient.java:36)
at OAMClient.main(OAMClient.java:79)
Caused by: oracle.security.am.asdk.AccessException: OAMAGENT-02072: Failed to perform encrypt password operation.
at oracle.security.am.asdk.impl.Configuration.setEncryptedPassword(Configuration.java:263)
at oracle.security.am.asdk.impl.ConfigXMLHandler.processConfig(ConfigXMLHandler.java:570)
at oracle.security.am.asdk.impl.ConfigXMLHandler.readConfigurationFromFile(ConfigXMLHandler.java:124)
at oracle.security.am.asdk.AccessClient.initialize(AccessClient.java:608)
... 4 more
Caused by: java.lang.ArrayIndexOutOfBoundsException: 7
at oracle.security.am.common.nap.util.ObCrypt.crypt(ObCrypt.java:143)
at oracle.security.am.common.nap.util.ObCrypt.decrypt(ObCrypt.java:102)
at oracle.security.am.common.nap.util.ObCrypt.decrypt(ObCrypt.java:214)
at oracle.security.am.asdk.impl.Configuration.decrypt(Configuration.java:810)
at oracle.security.am.asdk.impl.Configuration.decryptPassword(Configuration.java:766)
at oracle.security.am.asdk.impl.Configuration.setEncryptedPassword(Configuration.java:242)
... 7 more
Exception in thread "main" java.lang.NullPointerException
at OAMClient.<init>(OAMClient.java:69)
at OAMClient.main(OAMClient.java:79)
Process exited with exit code 1.
================================================



b) If the agent is configured to use Cert Transport Security Mode then the program fails when decrypting the Global Passphrase.

Example:

"C:\Program Files\Java\jdk1.6.0_23\bin\javaw.exe" -client -classpath D:\Workdir\OAM\oam-server\.adf;D:\Workdir\OAM\oam-server\OAMAccessClient\classes;D:\Workdir\OAM\oam-server\servlet\lib\oamasdk-api.jar -Djavax.net.ssl.trustStore=D:\Workspace\Oracle\Middleware\wlserver_10.3\server\lib\DemoTrust.jks -Djava.util.logging.config.file=C:/temp/oamclient/oblix/lib/logging.properties OAMClient
10-jan-2012 15:07:59 oracle.security.am.asdk.impl.Configuration setGlobalPass
SEVERE: Failed to perform decrypt Global passphrase operation.
10-jan-2012 15:07:59 oracle.security.am.asdk.impl.Configuration setGlobalPass
SEVERE:
java.lang.NumberFormatException: For input string: "4d"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
at java.lang.Integer.parseInt(Integer.java:458)
at java.lang.Integer.parseInt(Integer.java:499)
at oracle.security.am.common.nap.util.ObCrypt.convert(ObCrypt.java:163)
at oracle.security.am.common.nap.util.ObCrypt.decrypt(ObCrypt.java:100)
at oracle.security.am.common.nap.util.ObCrypt.decrypt(ObCrypt.java:214)
at oracle.security.am.asdk.impl.Configuration.decrypt(Configuration.java:810)
at oracle.security.am.asdk.impl.Configuration.decryptPassword(Configuration.java:766)
at oracle.security.am.asdk.impl.Configuration.setGlobalPass(Configuration.java:290)
at oracle.security.am.asdk.impl.ConfigXMLHandler.readCertDetails(ConfigXMLHandler.java:347)
at oracle.security.am.asdk.AccessClient.initialize(AccessClient.java:609)
at oracle.security.am.asdk.AccessClient.<init>(AccessClient.java:527)
at oracle.security.am.asdk.AccessClient.createDefaultInstance(AccessClient.java:234)
at OAMClient.<init>(OAMClient.java:36)
at OAMClient.main(OAMClient.java:78)
10-jan-2012 15:07:59 oracle.security.am.asdk.AccessClient initialize
SEVERE: Oracle Access SDK initialization failed.
oracle.security.am.asdk.AccessException: OAMAGENT-02072: Failed to perform decrypt Global passphrase operation.
at oracle.security.am.asdk.impl.Configuration.setGlobalPass(Configuration.java:305)
at oracle.security.am.asdk.impl.ConfigXMLHandler.readCertDetails(ConfigXMLHandler.java:347)
at oracle.security.am.asdk.AccessClient.initialize(AccessClient.java:609)
at oracle.security.am.asdk.AccessClient.<init>(AccessClient.java:527)
at oracle.security.am.asdk.AccessClient.createDefaultInstance(AccessClient.java:234)
at OAMClient.<init>(OAMClient.java:36)
at OAMClient.main(OAMClient.java:78)
Caused by: java.lang.NumberFormatException: For input string: "4d"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
at java.lang.Integer.parseInt(Integer.java:458)
at java.lang.Integer.parseInt(Integer.java:499)
at oracle.security.am.common.nap.util.ObCrypt.convert(ObCrypt.java:163)
at oracle.security.am.common.nap.util.ObCrypt.decrypt(ObCrypt.java:100)
at oracle.security.am.common.nap.util.ObCrypt.decrypt(ObCrypt.java:214)
at oracle.security.am.asdk.impl.Configuration.decrypt(Configuration.java:810)
at oracle.security.am.asdk.impl.Configuration.decryptPassword(Configuration.java:766)
at oracle.security.am.asdk.impl.Configuration.setGlobalPass(Configuration.java:290)
... 6 more
Exception in thread "main" java.lang.NullPointerException
at OAMClient.<init>(OAMClient.java:68)
at OAMClient.main(OAMClient.java:78)
Access Exception: OAMAGENT-02010
Process exited with exit code 1.
=================================================






Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms