Posted By:
Anonymous
Posted On:
Sunday, June 2, 2002 07:08 AM
I am using IBM WAS 4.0.2. I hit an error when i tried to bind a context. I am trying to call the source codes below, however, javax.naming.InitialContext ctx = new javax.naming.InitialContext(); DataSource originalDs = (DataSource) ctx.lookup("jdbc/dataSource1"); DataSource selectedDs = (DataSource) ctxx.lookup(("jdbc/dataSource2"); ctx.rebind("jdbc/dataSource1", selectedDs); The error is Object is not of any type which can be bound. A NamingException is being thrown from a javax.naming.Context implementation. Exception stack trace: com.ibm.ws.naming.util.CannotBindObjectException: Object is not of any type which can be bound. at com.ibm.ws.namin
More>>
I am using IBM WAS 4.0.2. I hit an error when i tried to bind a context.
I am trying to call the source codes below, however,
javax.naming.InitialContext ctx = new javax.naming.InitialContext();
DataSource originalDs = (DataSource) ctx.lookup("jdbc/dataSource1");
DataSource selectedDs = (DataSource) ctxx.lookup(("jdbc/dataSource2");
ctx.rebind("jdbc/dataSource1", selectedDs);
The error is
Object is not of any type which can be bound.
A NamingException is being thrown from a javax.naming.Context implementation.
Exception stack trace: com.ibm.ws.naming.util.CannotBindObjectException: Object is not of any type which can be bound.
at com.ibm.ws.naming.util.Helpers.processJavaObjectForBinding(Helpers.java:629)
at com.ibm.ejs.ns.jndi.CNContextImpl.doRebind(CNContextImpl.java:1841)
at com.ibm.ejs.ns.jndi.CNContextImpl.rebind(CNContextImpl.java:597)
at com.ibm.ws.naming.util.WsnInitCtx.rebind(WsnInitCtx.java:168)
at javax.naming.InitialContext.rebind(InitialContext.java:367)
<<Less