Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

websphere jndi

 
Vikram Kamate
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,
when i run the following code in jsp on ibm websphere it gives the exception i.e =
"com.ibm.ws.naming.util.CannotBindObjectException: Object is not of any type which can be bound."
code is =
try {
MyClass md = new MyClass();
Properties prpWebSphere = System.getProperties();
prpWebSphere.setProperty(Context.INITIAL_CONTEXT_FACTORY, "com.ibm.websphere.naming.WsnInitialContextFactory");
prpWebSphere.setProperty(Context.PROVIDER_URL, "iiop://localhost:900");
InitialContext ctxWebSphere = new InitialContext(prpWebSphere);
ctxWebSphere.rebind("obj", md);
out.println("bound");
}catch (Exception ex) {
out.println("EX : " + ex);
}
so, their is any solution for that.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic