Pages

Tuesday, June 26, 2012

tcLookupOperationsIntf Interface API Example

The tcLookupOperationsIntf inteface API being used to create, update, and remove the Lookup Definition to the Oracle Identity Manager repository.

Pre-Requisite:


Initial Setup.


Please follow the link and setup the OIM client environment to use to create the OIM Objects.

Client Code Setup

tcLookupOperationsIntf API Usage:

The following tasks needs to be performed to add, update, and delete the Lookup Definition to the Oracle Identity Manager. They are

1.    Create the OIMClient Handle

OIMClient client= new OIMClient();
client.login(username,password.toCharArray());

 

2.    Get tcSchedulerOperationsIntf service object

tcLookupOperationsIntf lookup= client.getService(tcLookupOperationsIntf.class);

 

3.    Adding Lookup Definition

String lookupName = "Lookup.Test Lookup";
lookup.addLookupCode(lookupName);

 

4.    Adding Lookup Value to Lookup Definition

String lookupCode="basedn";
String lookupValue="dc=test,dc=com";
lookup.addLookupValue(lookupName,LookupCode,lookupValue,"","");

 

5.    Updating the Lookup Value to the Lookup Definition

lookupCode="basedn";
lookupValue="ou=people,dc=test,dc=com";
Map<String, String> updateMap= new HashMap<String, String>();
updateMap.put("Lookup Definition.Lookup Code Information.Code Key", lookupCode);
updateMap.put("Lookup Definition.Lookup Code Information.Decode",lookupValue );
lookup.updateLookupValue(lookupName, lookupCode, updateMap);

 

6.    Deleting the Lookup Code from The Lookup Definition

lookup.removeLookupValue(lookupName,lookupCode);

 

7.    Getting the Lookup Definition Values

Map<String,String> lookupPairs= new HashMap<String,String>();
tcResultSet rs= lookup.getLookupValues(lookupName);
int count=rs.getRowCount();
if(count >0)
{
    For(int i=0;i<count;i++)
   {
       lookupPairs.put(rs.getStringValue("Lookup Definition.Lookup Code Information.Code Key"),rs.getStringValue("Lookup Definition.Lookup Code Information.Decode"));  
   }
}

 

8.    Removing the Lookup Definition

lookup.removeLookupCode(lookupName);

Friday, June 22, 2012

weblogic.socket.MaxMessageSizeExceededException

Hi

I am getting the following exception while importing the Config file using tcImportOperationsIntf to the Oracle Identity Manager repository.


 weblogic.socket.MaxMessageSizeExceededException: Incoming message of size: '10000080' bytes exceeds the configured maximum of: '10000000' bytes for protocol: 'iiop'.
weblogic.socket.MaxMessageSizeExceededException: Incoming message of size: '10000080' bytes exceeds the configured maximum of: '10000000' bytes for protocol: 'iiop'
        at weblogic.socket.BaseAbstractMuxableSocket.incrementBufferOffset(BaseAbstractMuxableSocket.java:174)
        at weblogic.socket.SocketMuxer.readFromSocket(SocketMuxer.java:983)
        at weblogic.socket.SocketMuxer.readReadySocketOnce(SocketMuxer.java:922)
        at weblogic.socket.SocketMuxer.readReadySocket(SocketMuxer.java:898)
        at weblogic.socket.EPollSocketMuxer.dataReceived(EPollSocketMuxer.java:215)
        at weblogic.socket.EPollSocketMuxer.processSockets(EPollSocketMuxer.java:177)
        at weblogic.socket.SocketReaderRequest.run(SocketReaderRequest.java:29)
        at weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:43)
        at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:145)
        at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:117)

Solution:

Login into the Web Logic Admin Console --> Servers --> OIM Server --> Protocols --> Modify the Maximum Message Size: value.
For example Default value is 100000000.
Add higher value to the Maximum Message Size: is 1000000000.

The Issue is resolved.

Best Of luck.

Exception in thread "Main Thread" org.omg.CORBA.NO_PERMISSION: vmcid: 0x0 minor code: 0 completed: No

Hi


I am getting the following exception while importing the Config file using tcImportOperationsIntf to the Oracle Identity Manager repository.




[java] java.lang.reflect.InvocationTargetException
[java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[java] at java.lang.reflect.Method.invoke(Method.java:597)
[java] at oracle.iam.platform.OIMClient.loginSessionCreated(OIMClient.java:209)
[java] at oracle.iam.platform.OIMClient.login(OIMClient.java:136)
[java] at oracle.iam.platform.OIMClient.login(OIMClient.java:129)
[java] at edu.sfsu.idalias.deploy.util.DeploymentUtil.login(Unknown Source)
[java] at edu.sfsu.idalias.deploy.ImportConfig.initialize(Unknown Source)
[java] at edu.sfsu.idalias.deploy.ImportConfig.main(Unknown Source)
[java] Caused by: org.omg.CORBA.NO_PERMISSION: vmcid: 0x0 minor code: 0 completed: No
[java] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[java] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
[java] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
[java] at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
[java] at java.lang.Class.newInstance0(Class.java:355)
[java] at java.lang.Class.newInstance(Class.java:308)
[java] at com.sun.corba.se.impl.protocol.giopmsgheaders.MessageBase.getSystemException(MessageBase.java:897)
[java] at com.sun.corba.se.impl.protocol.giopmsgheaders.ReplyMessage_1_2.getSystemException(ReplyMessage_1_2.java:99)
[java] at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.getSystemExceptionReply(CorbaMessageMediatorImpl.java:572)
[java] at com.sun.corba.se.impl.protocol.CorbaClientRequestDispatcherImpl.processResponse(CorbaClientRequestDispatcherImpl.java:471)
[java] at com.sun.corba.se.impl.protocol.CorbaClientRequestDispatcherImpl.marshalingComplete(CorbaClientRequestDispatcherImpl.java:358)
[java] at com.sun.corba.se.impl.protocol.CorbaClientDelegateImpl.invoke(CorbaClientDelegateImpl.java:129)
[java] at org.omg.CORBA.portable.ObjectImpl._invoke(ObjectImpl.java:457)
[java] at oracle.iam.platformservice.api._ClientLoginSessionService_1nfafx_ClientLoginSessionServiceRemoteRIntf_Stub.loginSessionCreatedx(Unknown Source)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[java] at java.lang.reflect.Method.invoke(Method.java:597)
[java] at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.invoke(RemoteBusinessIntfProxy.java:85)
[java] at $Proxy0.loginSessionCreatedx(Unknown Source)
[java] at oracle.iam.platformservice.api.ClientLoginSessionServiceDelegate.loginSessionCreated(Unknown Source)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[java] at java.lang.reflect.Method.invoke(Method.java:597)
[java] at Thor.API.Base.SecurityInvocationHandler$1.run(SecurityInvocationHandler.java:68)
[java] at weblogic.security.subject.SubjectProxy.doAs(SubjectProxy.java:64)
[java] at weblogic.security.subject.SubjectManager.runAs(SubjectManager.java:262)
[java] at weblogic.security.Security.runAs(Security.java:48)
[java] at Thor.API.Security.LoginHandler.weblogicLoginSession.runAs(weblogicLoginSession.java:52)
[java] at Thor.API.Base.SecurityInvocationHandler.invoke(SecurityInvocationHandler.java:79)
[java] at $Proxy1.loginSessionCreated(Unknown Source)
[java] ... 10 more
[java] Exception in thread "Main Thread" org.omg.CORBA.NO_PERMISSION: vmcid: 0x0 minor code: 0 completed: No
[java] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[java] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
[java] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
[java] at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
[java] at java.lang.Class.newInstance0(Class.java:355)
[java] at java.lang.Class.newInstance(Class.java:308)
[java] at com.sun.corba.se.impl.protocol.giopmsgheaders.MessageBase.getSystemException(MessageBase.java:897)
[java] at com.sun.corba.se.impl.protocol.giopmsgheaders.ReplyMessage_1_2.getSystemException(ReplyMessage_1_2.java:99)
[java] at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.getSystemExceptionReply(CorbaMessageMediatorImpl.java:572)
[java] at com.sun.corba.se.impl.protocol.CorbaClientRequestDispatcherImpl.processResponse(CorbaClientRequestDispatcherImpl.java:471)
[java] at com.sun.corba.se.impl.protocol.CorbaClientRequestDispatcherImpl.marshalingComplete(CorbaClientRequestDispatcherImpl.java:358)
[java] at com.sun.corba.se.impl.protocol.CorbaClientDelegateImpl.invoke(CorbaClientDelegateImpl.java:129)
[java] at org.omg.CORBA.portable.ObjectImpl._invoke(ObjectImpl.java:457)
[java] at Thor.API.Operations._tcImportOperationsIntf_uawk3z_tcImportOperationsIntfRemoteImpl_Stub.acquireLockx(Unknown Source)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[java] at java.lang.reflect.Method.invoke(Method.java:597)
[java] at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.invoke(RemoteBusinessIntfProxy.java:85)
[java] at $Proxy2.acquireLockx(Unknown Source)
[java] at Thor.API.Operations.tcImportOperationsIntfDelegate.acquireLock(Unknown Source)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[java] at java.lang.reflect.Method.invoke(Method.java:597)
[java] at Thor.API.Base.SecurityInvocationHandler$1.run(SecurityInvocationHandler.java:68)
[java] at weblogic.security.subject.SubjectProxy.doAs(SubjectProxy.java:64)
[java] at weblogic.security.subject.SubjectManager.runAs(SubjectManager.java:262)
[java] at weblogic.security.Security.runAs(Security.java:48)
[java] at Thor.API.Security.LoginHandler.weblogicLoginSession.runAs(weblogicLoginSession.java:52)
[java] at Thor.API.Base.SecurityInvocationHandler.invoke(SecurityInvocationHandler.java:79)
[java] at $Proxy3.acquireLock(Unknown Source)
[java] at edu.sfsu.idalias.deploy.ImportConfig.initialize(Unknown Source)
[java] at edu.sfsu.idalias.deploy.ImportConfig.main(Unknown Source)
[java] Java Result: 1



Solution:


Login into the Web Logic Admin Console --> Servers --> OIM Server --> Protocols --> Modify the Maximum Message Size: value.

For example Default value is 100000000.

add higher value to the Maximum Message Size: is 1000000000.

Wednesday, June 13, 2012

oracle.iam.platform.utils.NoSuchServiceException

Problem:



The Oracle Identity Manager throws Exception oracle.iam.platform.utils.NoSuchServiceException while deploying the Oracle Identity Manager Plugin.


[java] oracle.iam.platform.utils.NoSuchServiceException: java.lang.reflect.InvocationTargetException
[java] at oracle.iam.platform.OIMClient.getServiceDelegate(OIMClient.java:197)
[java] at oracle.iam.platform.OIMClient.getService(OIMClient.java:174)
[java] at oracle.iam.platform.OIMClient.loginSessionCreated(OIMClient.java:209)
[java] at oracle.iam.platform.OIMClient.login(OIMClient.java:136)
[java] at oracle.iam.platform.OIMClient.login(OIMClient.java:114)
[java] at oracle.iam.platformservice.utils.PluginUtility.main(PluginUtility.java:125)
[java] Caused by: java.lang.reflect.InvocationTargetException
[java] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[java] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
[java] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
[java] at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
[java] at oracle.iam.platform.OIMClient.getServiceDelegate(OIMClient.java:193)
[java] ... 5 more
[java] Caused by: oracle.iam.platform.utils.NoSuchServiceException: javax.naming.CommunicationException [Root exception is java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is:
[java] java.io.EOFException]
[java] at oracle.iam.platformservice.api.ClientLoginSessionServiceDelegate.(Unknown Source)
[java] ... 10 more
[java] Caused by: javax.naming.CommunicationException [Root exception is java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is:
[java] java.io.EOFException]
[java] at weblogic.jrmp.Context.lookup(Context.java:189)
[java] at weblogic.jrmp.Context.lookup(Context.java:195)
[java] at javax.naming.InitialContext.lookup(InitialContext.java:392)
[java] at org.springframework.jndi.JndiTemplate$1.doInContext(JndiTemplate.java:132)
[java] at org.springframework.jndi.JndiTemplate.execute(JndiTemplate.java:88)
[java] at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:130)
[java] at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:155)
[java] ... 11 more
[java] Caused by: java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is:
[java] java.io.EOFException
[java] at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:286)
[java] at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:184)
[java] at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:322)
[java] at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
[java] at weblogic.jrmp.Context.lookup(Context.java:185)
[java] ... 17 more
[java] Caused by: java.io.EOFException
[java] at java.io.DataInputStream.readByte(DataInputStream.java:250)
[java] at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:228)
[java] ... 21 more
[java] Error occured during the use of plugin registering utility. java.lang.reflect.InvocationTargetException
[java] Jun 13, 2012 3:54:10 PM PluginUtility main
[java] SEVERE: Exception occured {0}
[java] oracle.iam.platform.utils.NoSuchServiceException: java.lang.reflect.InvocationTargetException
[java] at oracle.iam.platform.OIMClient.getServiceDelegate(OIMClient.java:197)
[java] at oracle.iam.platform.OIMClient.getService(OIMClient.java:174)
[java] at oracle.iam.platformservice.utils.PluginUtility.main(PluginUtility.java:128)
[java] Caused by: java.lang.reflect.InvocationTargetException
[java] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[java] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
[java] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
[java] at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
[java] at oracle.iam.platform.OIMClient.getServiceDelegate(OIMClient.java:193)
[java] ... 2 more
[java] Caused by: oracle.iam.platform.utils.NoSuchServiceException: javax.naming.CommunicationException [Root exception is java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is:
[java] java.io.EOFException]
[java] at oracle.iam.platformservice.api.PlatformServiceDelegate.(Unknown Source)
[java] ... 7 more
[java] Caused by: javax.naming.CommunicationException [Root exception is java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is:
[java] java.io.EOFException]
[java] at weblogic.jrmp.Context.lookup(Context.java:189)
[java] at weblogic.jrmp.Context.lookup(Context.java:195)
[java] at javax.naming.InitialContext.lookup(InitialContext.java:392)
[java] at org.springframework.jndi.JndiTemplate$1.doInContext(JndiTemplate.java:132)
[java] at org.springframework.jndi.JndiTemplate.execute(JndiTemplate.java:88)
[java] at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:130)
[java] at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:155)
[java] ... 8 more
[java] Caused by: java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is:
[java] java.io.EOFException
[java] at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:286)
[java] at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:184)
[java] at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:322)
[java] at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
[java] at weblogic.jrmp.Context.lookup(Context.java:185)
[java] ... 14 more
[java] Caused by: java.io.EOFException
[java] at java.io.DataInputStream.readByte(DataInputStream.java:250)
[java] at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:228)
[java] ... 18 more
[java] Exception in thread "main" oracle.iam.platform.utils.NoSuchServiceException: java.lang.reflect.InvocationTargetException
[java] at oracle.iam.platform.OIMClient.getServiceDelegate(OIMClient.java:197)
[java] at oracle.iam.platform.OIMClient.getService(OIMClient.java:174)
[java] at oracle.iam.platformservice.utils.PluginUtility.main(PluginUtility.java:128)
[java] Caused by: java.lang.reflect.InvocationTargetException
[java] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[java] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
[java] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
[java] at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
[java] at oracle.iam.platform.OIMClient.getServiceDelegate(OIMClient.java:193)
[java] ... 2 more
[java] Caused by: oracle.iam.platform.utils.NoSuchServiceException: javax.naming.CommunicationException [Root exception is java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is:
[java] java.io.EOFException]
[java] at oracle.iam.platformservice.api.PlatformServiceDelegate.(Unknown Source)
[java] ... 7 more
[java] Caused by: javax.naming.CommunicationException [Root exception is java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is:
[java] java.io.EOFException]
[java] at weblogic.jrmp.Context.lookup(Context.java:189)
[java] at weblogic.jrmp.Context.lookup(Context.java:195)
[java] at javax.naming.InitialContext.lookup(InitialContext.java:392)
[java] at org.springframework.jndi.JndiTemplate$1.doInContext(JndiTemplate.java:132)
[java] at org.springframework.jndi.JndiTemplate.execute(JndiTemplate.java:88)
[java] at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:130)
[java] at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:155)
[java] ... 8 more
[java] Caused by: java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is:
[java] java.io.EOFException
[java] at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:286)
[java] at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:184)
[java] at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:322)
[java] at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
[java] at weblogic.jrmp.Context.lookup(Context.java:185)
[java] ... 14 more
[java] Caused by: java.io.EOFException
[java] at java.io.DataInputStream.readByte(DataInputStream.java:250)
[java] at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:228)
[java] ... 18 more
[java] Java Result: 1





Cause:


Unnecessary Jar Files in the CLASSPATH.





Solution:


Add the following jar files into the classpath. They are


$OIM_ORACLE_HOME/server/ext/spring.jar
$OIM_ORACLE_HOME/server/ext/jakarta-commons/commons-logging.jar
$OIM_ORACLE_HOME/server/ext/internal/toplink.jariam-platform-context.jar
$OIM_ORACLE_HOME/server/platform/iam-platform-utils.jar
$OIM_ORACLE_HOME/server/platform/iam-platform-auth-client.jar
$OIM_ORACLE_HOME/server/platform/iam-platform-pluginframework.jar
$OIM_ORACLE_HOME/server/client/oimclient.jar
$WL_HOME/server/lib/wlfullclient.jar



Once You setup the CLASSPATH and plugin will deploy in OIM without any issue.