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