Connecting db2 using datasource in WebSphere application server 5.0
3 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Thursday, May 22, 2003 02:35 AM

i had created a datasource in websphere application server 5.0 and iam trying to access the db2 database using the datasource, iam getting the following error, pleasee help me 5/22/03 17:25:35:594 MYT] 6bbc7eeb WebGroup I SRVE0180I: [test2.war] [/ejb] [Servlet.LOG]: /HelloHTML.jsp: init [5/22/03 17:25:37:329 MYT] 6bbc7eeb WebGroup E SRVE0026E: [Servlet Error]-[SQLConnect]: java.lang.UnsatisfiedLinkError: SQLConnect at COM.ibm.db2.jdbc.app.DB2Connection.connect(DB2Connection.java:502) at COM.ibm.db2.jdbc.app.DB2Connection. (DB2Connection.java:424) at COM.ibm.db2.jdbc.app.DB2ReusableConnection. (DB2ReusableConnection.java:69) at COM.ibm.db2.jdbc.DB2PooledConnection.getConnection(DB2Pool   More>>

i had created a datasource in websphere application server 5.0 and iam trying to access the db2 database using the datasource, iam getting the following error,

pleasee help me

5/22/03 17:25:35:594 MYT] 6bbc7eeb WebGroup I SRVE0180I: [test2.war] [/ejb] [Servlet.LOG]: /HelloHTML.jsp: init
[5/22/03 17:25:37:329 MYT] 6bbc7eeb WebGroup E SRVE0026E: [Servlet Error]-[SQLConnect]: java.lang.UnsatisfiedLinkError: SQLConnect
at COM.ibm.db2.jdbc.app.DB2Connection.connect(DB2Connection.java:502)
at COM.ibm.db2.jdbc.app.DB2Connection. (DB2Connection.java:424)
at COM.ibm.db2.jdbc.app.DB2ReusableConnection. (DB2ReusableConnection.java:69)
at COM.ibm.db2.jdbc.DB2PooledConnection.getConnection(DB2PooledConnection.java:188)
at com.ibm.ws.rsadapter.spi.WSRdbDataSource.getConnection(WSRdbDataSource.java:213)
at com.ibm.ws.rsadapter.spi.WSManagedConnectionFactoryImpl.createManagedConnection(WSManagedConnectionFactoryImpl.java:504)
at com.ibm.ejs.j2c.poolmanager.FreePool.createManagedConnectionWithMCWrapper(FreePool.java:1106)
at com.ibm.ejs.j2c.poolmanager.FreePool.createOrWaitForConnection(FreePool.java:897)
at com.ibm.ejs.j2c.poolmanager.PoolManager.reserve(PoolManager.java:1065)
at com.ibm.ejs.j2c.ConnectionManager.allocateMCWrapper(ConnectionManager.java:560)
at com.ibm.ejs.j2c.ConnectionManager.allocateConnection(ConnectionManager.java:374)
at com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.java:205)
at com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.java:180)
at org.apache.jsp._HelloHTML._jspService(_HelloHTML.java:88)
at com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java:89)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:344)
at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet.java:598)
at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java:696)
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.cache.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java:114)
at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:187)
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)

   <<Less

Re: Connecting db2 using datasource in WebSphere application server 5.0

Posted By:   graham_eaton  
Posted On:   Monday, June 9, 2003 06:33 AM

UnsatisfiedLinkError is nearly always a classpath issue.
Ensure the jdbc driver jar files are in your classpath.

Re: Connecting db2 using datasource in WebSphere application server 5.0

Posted By:   H_Puri  
Posted On:   Friday, May 30, 2003 09:14 AM

Assuming this is on a *ix platform
You need to run the db2profile for the db2instance that you are using e.g.
. /home/db2inst1/sqllib/db2profile

Then restart the appserver.

For future use add the call to your .bashrc/.profile login script

Re: Connecting db2 using datasource in WebSphere application server 5.0

Posted By:   Martin_Huber  
Posted On:   Friday, May 23, 2003 04:48 AM

Hi,

watch out for having a db2-client which is reconfigured to use JDBC2, especially if you're using a Windows-Platform with your WAS.

There is a script which changes the JDBC-Classes from JDBC1 to JDBC2.

After Installation of DB2-Client it is set to JDBC1...


Hope this helps...

Best wishes, Martin

About | Sitemap | Contact