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

DataSource lookup problem from WebSphere 5.1 Stand alone Client Program

 
balasg jothi
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am trying to access the datasource defined in the FRAMEWORK_APP server, but it giving the following error.

code here:
env.put(Context.INITIAL_CONTEXT_FACTORY, "com.ibm.websphere.naming.WsnInitialContextFactory");
env.put(Context.PROVIDER_URL,"iiop://ssunicc01.aspac.citicorp.com:2809");
ctx = new InitialContext(env);
System.out.println("test 2");
DataSource ds = (DataSource)ctx.lookup("ssunicc01.ND.Cell/nodes/ssunicc01.node/servers/FRAMEWORK_APP/jdbc/FW_DB2_CON");
System.out.println("test 3");

Any body help on the prpblem?


thanks
bala

Exception in thread "P=860585 =0:CT" javax.naming.NameNotFoundException: Context: ssunicc01.ND.Cell/nodes/ssunicc01.node/servers/
nodeagent, name: ssunicc01.ND.Cell/nodes/ssunicc01.node/servers/FRAMEWORK_APP/jdbc/FW_DB2_CON: First component in name ssunicc01.ND.Cell/nodes/ssunicc01.node/servers/FRAMEWORK_APP/jdbc/FW_DB2_CON not found. [Root exception is org.omg.CosNaming.NamingContextPac
kage.NotFound: IDL mg.org/CosNaming/NamingContext/NotFound:1.0]
at com.ibm.ws.naming.jndicos.CNContextImpl.processNotFoundException(CNContextImpl.java:3840)
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1527)
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1480)
at com.ibm.ws.naming.jndicos.CNContextImpl.lookupExt(CNContextImpl.java:1187)
at com.ibm.ws.naming.jndicos.CNContextImpl.lookup(CNContextImpl.java:1067)
at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:144)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at citibank.test.DataSourceClient.main(DataSourceClient.java:34)
Caused by: org.omg.CosNaming.NamingContextPackage.NotFound: IDL mg.org/CosNaming/NamingContext/NotFound:1.0
at org.omg.CosNaming.NamingContextPackage.NotFoundHelper.read(NotFoundHelper.java:85)
at com.ibm.WsnOptimizedNaming._NamingContextStub.resolve_complete_info(Unknown Source)
at com.ibm.ws.naming.jndicos.CNContextImpl.cosResolve(CNContextImpl.java:3491)
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1519)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic