GeeCON Prague 2014*
The moose likes Websphere and the fly likes Datasource with WSAD5 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Products » Websphere
Bookmark "Datasource with WSAD5" Watch "Datasource with WSAD5" New topic
Author

Datasource with WSAD5

Lu Samm
Greenhorn

Joined: Nov 13, 2002
Posts: 13
Dear all,
I met problem while trying to use JNDI to look up datasource for JDBC connection, the datasource is setted as WSAD5 V5 data source. Similar problem also occured while trying to access the datasource with JSP. (Note that the datasource can bind successfully when the local WAS server start)
Console output of WAS shown error below:
==================================================
Context implementation: com.ibm.ws.naming.jndicos.CNContextImpl
Context method: lookup
Context name: localhost/nodes/localhost/servers/server1
Target name: jdbc/hdcd
Other data:
Exception stack trace:
com.ibm.websphere.naming.CannotInstantiateObjectException: Exception
occurred while the JNDI NamingManager was processing a
javax.naming.Reference object. Root exception is java.lang.Exception:
Attempted to use a 5.0 DataSource outside of a 2.3 servlet
at
com.ibm.ejs.j2c.ConnectionFactoryBuilderImpl.validServlet(ConnectionFactoryBuilderImpl.java:2083)
at
com.ibm.ejs.j2c.ConnectionFactoryBuilderImpl.getCMConfigData(ConnectionFactoryBuilderImpl.java:1478)
at
com.ibm.ejs.j2c.ConnectionFactoryBuilderImpl.getObjectInstance(ConnectionFactoryBuilderImpl.java:1244)
at
javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:313)
at
com.ibm.ws.naming.util.Helpers.processSerializedObjectForLookup(Helpers.java:884)
at
com.ibm.ws.naming.jndicos.CNContextImpl.processResolveResults(CNContextImpl.java:1674)
at
com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1537)
at
com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1457)
at
com.ibm.ws.naming.jndicos.CNContextImpl.lookup(CNContextImpl.java:1167)
at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:132)
at javax.naming.InitialContext.lookup(InitialContext.java:359)
at
com.ibm.etools.utc.servlet.JNDILookupServlet.lookup(JNDILookupServlet.java:75)
at
com.ibm.etools.utc.servlet.JNDILookupServlet.doPost(JNDILookupServlet.java:47)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.
_service(StrictLifecycleServlet.java:174)
at
com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
at
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
at
com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:258)
at
com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
at
com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:872)
at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:491)
at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:173)
at
com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:79)
at
com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:199)
at
com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
at
com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:182)
at
com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:331)
at
com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
at
com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:432)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:343)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:592)
=================================================

Is there anyone met the similar problem before? or any idea on it?
Thanks!
Regards.
Imad Uddin Chishti
Greenhorn

Joined: Oct 13, 2002
Posts: 15
can u post the code for better understanding?


Imad Uddin Chishti<br />Sun Certified JAVA Programmer platform 2<br />Senior Consultant<br />BearingPoint Pakistan
 
GeeCON Prague 2014
 
subject: Datasource with WSAD5