Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
No replies
D5HX_vito_Zhang
D5HX_vito_Zhang
1 Post
ACCEPTED ANSWER

Pinned topic The error "DataSourceCon E DSRA8040I: Failed to connect to the DataSource. Encountered "": java.sql.SQLException: null DSRA0010E: SQL State = 08001, Error Code = -1,639" came out ,when try to test connection between WAS and DB2

‏2013-05-22T07:29:19Z |

Hello all

Today , one issue came out when I tried to make integration with WAS and DB2.

 

1.version of WAS is 8.5 ,version of DB2 is 10.1.

 

DB2 was installed and one instance was created ,the instance name is db2admin whose user is db2admin ,the database name is helloman.

2.[db2admin@onion java]$ db2 connect to helloman

   Database Connection Information

 Database server        = DB2/LINUX 10.1.0
 SQL authorization ID   = DB2ADMIN
 Local database alias   = HELLOMAN
 

port number is 60004


3.[db2admin@onion java]$ db2 get dbm cfg|grep SVCE*
 TCP/IP Service name                          (SVCENAME) = 60004
 SSL service name                         (SSL_SVCENAME) =

And some  other information:


4.[db2admin@onion java]$ db2set -all
[i] DB2COMM=TCPIP
[i] DB2AUTOSTART=YES
[g] DB2INSTDEF=db2admin
 

5.The JDBC home is:/home/db2admin/sqllib/java

[db2admin@onion java]$ pwd
/home/db2admin/sqllib/java
[db2admin@onion java]$ ls -l
total 15440
-rwxr-xr-x. 1 root root     169 May 20 22:30 42E32181339E47B2BF8145FD26612E69.properties
-rwxr-xr-x. 1 bin  bin  2290106 Apr  3  2012 Common.jar
-rwxr-xr-x. 1 bin  bin    61934 Apr  3  2012 db2dbgm.jar
-rwxr-xr-x. 1 bin  bin  1061256 Apr  3  2012 db2java.zip
-rwxr-xr-x. 1 bin  bin  3714904 Apr  3  2012 db2jcc4.jar
-rwxr-xr-x. 1 bin  bin  3516375 Apr  3  2012 db2jcc.jar
-rwxr-xr-x. 1 bin  bin     1015 Apr  3  2012 db2jcc_license_cu.jar
-rwxr-xr-x. 1 bin  bin   122816 Apr  3  2012 db2policy.jar
-rwxr-xr-x. 1 bin  bin   179890 Apr  3  2012 db2qgjava.jar
-rwxr-xr-x. 1 bin  bin     9455 Apr  3  2012 db2umplugin.jar
-rwxr-xr-x. 1 bin  bin   618901 Apr  3  2012 ib6core.jar
-rwxr-xr-x. 1 bin  bin    32637 Apr  3  2012 ib6extra.jar
-rwxr-xr-x. 1 bin  bin   297505 Apr  3  2012 ib6js.jar
-rwxr-xr-x. 1 bin  bin    74756 Apr  3  2012 ib6swing.jar
-rwxr-xr-x. 1 bin  bin   103344 Apr  3  2012 ib6util.jar
-rwxr-xr-x. 1 bin  bin     4859 Apr  3  2012 IBMUpdateUtil.jar
-rwxr-xr-x. 1 bin  bin       59 Apr  3  2012 IBMUpdateUtil.prop
drwxr-xr-x. 8 bin  bin     4096 Apr  3  2012 jdk32
-rwxr-xr-x. 1 bin  bin  1675305 Apr  3  2012 sqlj4.zip
-rwxr-xr-x. 1 bin  bin  1644384 Apr  3  2012 sqlj.zip
-rwxr-xr-x. 1 bin  bin   347851 Apr  3  2012 us.jar

 

6.name one jDBC as   
DB2 Universal JDBC Driver DataSource_boy_datasource

JNDI name boy_datasource 

Component-managed authentication alias was configured .

Then save the configuration.



7.Then test connection ,the error showed :

"The test connection operation failed for data source DB2 Universal JDBC Driver DataSource_boy_datasource on server nodeagent at node onionNode01 with the following exception: java.sql.SQLException: null DSRA0010E: SQL State = 08001, Error Code = -1,639. View JVM logs for further details."

8.check information from WAS systemout log:

[5/22/13 0:22:50:424 PDT] 00000076 DataSourceCon E   DSRA8040I: Failed to connect to the DataSource.  Encountered "": java.sql.SQLException: null DSRA0010E: SQL State = 08001, Error Code = -1,639
        at com.ibm.db2.jcc.am.fd.a(fd.java:669)
        at com.ibm.db2.jcc.am.fd.a(fd.java:60)
        at com.ibm.db2.jcc.am.fd.a(fd.java:127)
        at com.ibm.db2.jcc.am.ib.a(ib.java:4636)
        at com.ibm.db2.jcc.t4.ab.q(ab.java:851)
        at com.ibm.db2.jcc.t4.ab.o(ab.java:696)
        at com.ibm.db2.jcc.t4.ab.k(ab.java:491)
        at com.ibm.db2.jcc.t4.ab.c(ab.java:138)
        at com.ibm.db2.jcc.t4.b.Zc(b.java:1359)
        at com.ibm.db2.jcc.t4.b.b(b.java:1278)
        at com.ibm.db2.jcc.t4.b.a(b.java:6230)
        at com.ibm.db2.jcc.t4.b.b(b.java:835)
        at com.ibm.db2.jcc.t4.b.b(b.java:758)
        at com.ibm.db2.jcc.t4.b.a(b.java:419)
        at com.ibm.db2.jcc.t4.b.a(b.java:394)
        at com.ibm.db2.jcc.t4.b.<init>(b.java:332)
        at com.ibm.db2.jcc.DB2PooledConnection.<init>(DB2PooledConnection.java:84)
        at com.ibm.db2.jcc.DB2ConnectionPoolDataSource.getPooledConnectionX(DB2ConnectionPoolDataSource.java:347)
        at com.ibm.db2.jcc.DB2ConnectionPoolDataSource.getPooledConnection(DB2ConnectionPoolDataSource.java:156)
        at com.ibm.ws.rsadapter.DSConfigHelper$1.run(DSConfigHelper.java:1251)
        at com.ibm.ws.security.auth.ContextManagerImpl.runAs(ContextManagerImpl.java:5429)
        at com.ibm.ws.security.auth.ContextManagerImpl.runAsSystem(ContextManagerImpl.java:5555)
        at com.ibm.ws.security.core.SecurityContext.runAsSystem(SecurityContext.java:255)
        at com.ibm.ws.rsadapter.spi.ServerFunction$6.run(ServerFunction.java:565)
        at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
        at com.ibm.ws.rsadapter.DSConfigHelper.getPooledConnection(DSConfigHelper.java:1266)
        at com.ibm.ws.rsadapter.DSConfigHelper.getPooledConnection(DSConfigHelper.java:1174)
        at com.ibm.ws.rsadapter.DSConfigurationHelper.getConnectionFromDSOrPooledDS(DSConfigurationHelper.java:1975)
        at com.ibm.ws.rsadapter.DSConfigurationHelper.getConnectionFromDSOrPooledDS(DSConfigurationHelper.java:1851)
        at com.ibm.ws.rsadapter.DSConfigurationHelper.testConnectionForGUI(DSConfigurationHelper.java:2709)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
        at java.lang.reflect.Method.invoke(Method.java:611)
        at com.ibm.ws.management.DataSourceConfigHelperMBean.testConnectionToDataSource2(DataSourceConfigHelperMBean.java:556)
        at com.ibm.ws.management.DataSourceConfigHelperMBean.testConnection(DataSourceConfigHelperMBean.java:484)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
        at java.lang.reflect.Method.invoke(Method.java:611)
        at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:49)
        at sun.reflect.GeneratedMethodAccessor25.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
        at java.lang.reflect.Method.invoke(Method.java:611)
        at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:256)
        at javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredModelMBean.java:1085)
        at javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:966)
        at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:848)
        at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:773)
        at com.ibm.ws.management.AdminServiceImpl$1.run(AdminServiceImpl.java:1335)
        at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
        at com.ibm.ws.management.AdminServiceImpl.invoke(AdminServiceImpl.java:1228)
        at com.ibm.ws.management.connector.AdminServiceDelegator.invoke(AdminServiceDelegator.java:181)
        at com.ibm.ws.management.connector.ipc.CallRouter.route(CallRouter.java:247)
        at com.ibm.ws.management.connector.ipc.IPCConnectorInboundLink.doWork(IPCConnectorInboundLink.java:360)
        at com.ibm.ws.management.connector.ipc.IPCConnectorInboundLink$IPCConnectorReadCallback.complete(IPCConnectorInboundLink.java:602)
        at com.ibm.ws.ssl.channel.impl.SSLReadServiceContext$SSLReadCompletedCallback.complete(SSLReadServiceContext.java:1784)
        at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
        at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
        at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
        at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
        at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
        at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:816)
        at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
        at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1783)
 

9.[db2admin@onion java]$ netstat -an|grep 60004
tcp        0      0 0.0.0.0:60004               0.0.0.0:*                   LISTEN
 

10.

[db2admin@onion java]$ telnet 192.168.189.129 60004
Trying 192.168.189.129...
Connected to 192.168.189.129.
Escape character is '^]'.
 

 

11.

JDBC provider:DB2 Universal JDBC Driver Provider_good2

   
scope:Node=onionNode01,Server=server1  

 


    
 

Could someone please provide  suggestion and solution?



 

Attachments

Updated on 2013-05-22T09:43:44Z at 2013-05-22T09:43:44Z by D5HX_vito_Zhang