Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Cannot obtain an InitialContext in WebSphere

 
Binh Nguyen
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
for some reason I cannot obtain an InitialContext to lookup for resource.
I have an EAR file, inside this EAR file, I have a Web module and an EJB module, these two module use (reference to) my common helper classes (packaged in helper JAR file, stored at the EAR-root). the classes in the helper-JAR tried to obtain an InitialContext in order to look up DataSource and EJBBean , but I got this error message below, this error is generated right at the time the InitialContext is created
itc = new InitialContext(properties);
I have not performed any lookup yet, I still dont know why it says that "
Failed to lookup JDBC Datasource. Please double check that the JNDI name defined in the resource-description "
Please help me, my application run OK in WebLogic, but not with WebSphere, I dont know what is wrong?
Thanks
Xenoux
NMSV0906E: Could not create an instance of the class "com.ibm.ws.naming.util.WsnInitCtxFactory".
Failed to lookup JDBC Datasource. Please double check that the JNDI name defined in the resource-description
 
Paul McKenna
Ugly Redneck
Ranch Hand
Posts: 1006
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what are the values in the property files that create the initial context?
also try using a hashmap instead of a property file. Secondly, the websphere naming server runs on iiop:900
check these details
-sriraj
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic