Skip to Main Content

Security Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Error while connecting to client from custom code 11g

958133Oct 9 2012 — edited Oct 9 2012
Hi,
I am trying to connect to the OIM client using a simple code as per documentation in:
http://docs.oracle.com/cd/E27559_01/dev.1112/e27150/apis.htm#CIHDFGAJ
The snipped is like:
System.out.println("Creating client....");
String ctxFactory = "weblogic.jndi.WLInitialContextFactory";
String serverURL = "t3://Hostname:port";
String username = "username";
String password = "password";
Hashtable env = new Hashtable();
env.put(OIMClient.JAVA_NAMING_FACTORY_INITIAL,ctxFactory);
env.put(OIMClient.JAVA_NAMING_PROVIDER_URL, serverURL);
oimClient = new OIMClient(env);
System.out.println(" Logging in");
oimClient.login(username, password);
System.out.println("Log in successful");

Envoked the method in main class but i am recieveing following error:

Creating client....
Exception in thread "main" java.lang.NoClassDefFoundError: oracle/jrf/PortabilityLayerException
at cgc.com.customcode.OIMCustomCode.initiate(OIMCustomCode.java:30)
at cgc.com.customcode.OIMCustomCode.changeEmail(OIMCustomCode.java:50)
at cgc.com.customcode.OIMCustomCode.main(OIMCustomCode.java:81)

A bit of inspection shows error on code line :
--> oimClient = new OIMClient(env);
Is this a known issue, is there a way out ?
Thanks in advance
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 6 2012
Added on Oct 9 2012
10 comments
11,586 views