Custom OIM Login Code Fails On OIM 11g Clustered Deployement (Doc ID 1415376.1)

Last updated on NOVEMBER 03, 2016

Applies to:

Identity Manager - Version 11.1.1.3.2 and later
Information in this document applies to any platform.
**Checked For Relevance on 02-Aug-2013**

Symptoms

Implemented a custom java class (login part of the code shown below) which implements the OIM APIs to perform various actions in OIM on a two node cluster (node1 on host1 and node2 on host2):

Hashtable env = new Hashtable();
env.put(OIMClient.JAVA_NAMING_PROVIDER_URL, PROVIDER_URL);
env.put(OIMClient.JAVA_NAMING_FACTORY_INITIAL, OIMClient.WLS_CONTEXT_FACTORY);
OIMClient oimClient = new OIMClient(env);
oimClient.login(USERNAME, PASSWORD.toCharArray());


The code uses the string: "t3://host1:14000/oim,t3://host2:14000/oim" to connect to the 2-node OIM cluster.
This fails with the following exception :

java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at oracle.iam.platform.OIMClient.getServiceDelegate(OIMClient.java:120)
at oracle.iam.platform.OIMClient.getService(OIMClient.java:97)
at oracle.iam.platform.OIMClient.loginSessionCreated(OIMClient.java:133)
at oracle.iam.platform.OIMClient.login(OIMClient.java:63)
at oracle.iam.platform.OIMClient.login(OIMClient.java:55)
at za.ac.up.RunMe.initialise(RunMe.java:31)
at za.ac.up.RunMe.main(RunMe.java:39)
Caused by: oracle.iam.platform.utils.NoSuchServiceException: javax.naming.ConfigurationException: Call to NamingManager.getObjectInstance() failed: [Root exception is javax.naming.ConfigurationException: Call to NamingManager.getObjectInstance() failed: [Root exception is java.lang.NullPointerException]]; remaining name ''
at oracle.iam.platformservice.api.ClientLoginSessionServiceDelegate.<init>(ClientLoginSessionServiceDelegate.java:37)
... 11 more
Caused by: javax.naming.ConfigurationException: Call to NamingManager.getObjectInstance() failed: [Root exception is javax.naming.ConfigurationException: Call to NamingManager.getObjectInstance() failed: [Root exception is java.lang.NullPointerException]]; remaining name ''
at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:234)
at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:348)
at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:259)
at weblogic.jndi.internal.ServerNamingNode_1030_WLStub.lookup(Unknown Source)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:392)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:380)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at org.springframework.jndi.JndiTemplate$1.doInContext(JndiTemplate.java:132)
at org.springframework.jndi.JndiTemplate.execute(JndiTemplate.java:88)
at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:130)
at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:155)
at oracle.iam.platformservice.api.ClientLoginSessionServiceDelegate.<init>(ClientLoginSessionServiceDelegate.java:32)
... 11 more
Caused by: javax.naming.ConfigurationException: Call to NamingManager.getObjectInstance() failed: [Root exception is java.lang.NullPointerException]
at weblogic.jndi.internal.ServerNamingNode.resolveObject(ServerNamingNode.java:394)
at weblogic.jndi.internal.BasicNamingNode.resolveObject(BasicNamingNode.java:856)
at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:209)
at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:214)
at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:214)
at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:214)
at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:214)
at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:214)
at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:214)
at weblogic.jndi.internal.RootNamingNode_WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:589)
at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:230)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:477)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:473)


When connecting to node 1 only (meaning using the "t3://host1:14000/oim" URL), login calls are successful.


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