Skip to Main Content

Integration

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!

JNDI lookup() for a Resource Adapter fails

901275Feb 14 2012 — edited Feb 26 2020
Hi guys,

I've deployed a Resource Adapter on Weblogic (v10.3.4). It's JNDI name is: jca/HelloAdapter

Moreover, in the Outbound Connection Pools tag, I've created a javax.resource.cci.ConnectionFactory entry with JNDI name: eis/HelloAdapter.

I want to write a simple Java test to lookup my Resource adapter. The code I am using is the following:
      Hashtable<String, String> properties = new Hashtable<String, String>();
      properties.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
      properties.put(Context.PROVIDER_URL, "t3://localhost:8001");
      properties.put(Context.SECURITY_PRINCIPAL, "weblogic");
      properties.put(Context.SECURITY_CREDENTIALS, "weblogic1");
      
      Context ctx = null;
      try {
          ctx = new InitialContext(properties);
          javax.resource.cci.ConnectionFactory cf = 
            (javax.resource.cci.ConnectionFactory) ctx.lookup("jca/HelloAdapter");
      } catch (NamingException e) {
          e.printStackTrace();
      }
I get the following exception:
javax.naming.NameNotFoundException: No Object found:  jca/HelloAdapter|null
	at weblogic.connector.deploy.JNDIHandler.lookupObject(JNDIHandler.java:881)
	at weblogic.connector.deploy.JNDIHandler.getObjectInstance(JNDIHandler.java:843)
	at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
	at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:424)
	at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:411)
	at javax.naming.InitialContext.lookup(InitialContext.java:392)
Any ideas please ? Thank you for your time

Regards,
George
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 13 2012
Added on Feb 14 2012
1 comment
322 views