Hi All,
I am trying to connect to a datasource created in websphere 7.0.0.25 server through a struts/Spring application.
Here is my datasource bean definition in spring config file.
Here is the code I used to look up the datasource from the
struts web application
How ever when I execute the code through web application I am getting below exception trace at websphere logs.
Caused by: javax.naming.ConfigurationException: Name space accessor for the
java: name space has not been set. Possible cause is that the user is specifying a java: URL name in a JNDI Context method call but is not running in a
J2EE client or server environment.
at com.ibm.ws.naming.java.javaURLContextFactory.isNameSpaceAccessable(javaURLContextFactory.java:102)
at com.ibm.ws.naming.urlbase.UrlContextFactory.getObjectInstance(UrlContextFactory.java:84)
at javax.naming.spi.NamingManager.getURLObject(NamingManager.java:584)
at javax.naming.spi.NamingManager.getURLContext(NamingManager.java:533)
at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:279)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
This app is running in j2ee environment of websphere 7.0.0.25
Please assist me to figure out this issue
Thanks,
Isuru