[jboss-user] [JCA/JBoss] - JBOSS & DB2 V9.1 : com.ibm.db2.jcc.c.SqlException: SQL10007N

toplink do-not-reply at jboss.com
Mon Nov 5 14:17:32 EST 2007


I am running toplink tests on JBOSS 4.2.2.GA against DB2 V9.1, I got SqlException, following is the data sources xmls I am using and detailed exception:

1. db2-jcc-xa-ds.xml

<?xml version="1.0" encoding="UTF-8"?>


    <!--
        IBM DB2 XA driver
        db2jcc.jar
    -->
    
    <xa-datasource>
        <jndi-name>JTSTopLinkDS</jndi-name>
       
        <xa-datasource-class>com.ibm.db2.jcc.DB2XADataSource</xa-datasource-class>
        <!--xa-datasource-property name="ServerName">tlsvrdb7.ca.oracle.com</xa-datasource-property-->
        <xa-datasource-property name="DatabaseName">TOPLINK</xa-datasource-property>
        <xa-datasource-property name="User">aime</xa-datasource-property>
        <xa-datasource-property name="Password">2cool</xa-datasource-property>
        
        <!-- Note, as opposed to the Type2 driver, DB2 Type 4 requires the PortNumber. By default this is 50000-->
        <xa-datasource-property name="PortNumber">50003</xa-datasource-property>
        
        <!-- Must be set if using multiple DB2 XA resources in same transaction -->
        
        <isSameRM-override-value>false</isSameRM-override-value>    
        
        <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml -->
        
            <type-mapping>DB2</type-mapping>
        
    
    </xa-datasource>
    


2. db2-ds.xml

<?xml version="1.0" encoding="UTF-8"?>

<!-- ===================================================================== -->
<!--                                                                       -->
<!--  JBoss Server Configuration                                           -->
<!--                                                                       -->
<!-- ===================================================================== -->

<!-- $Id: db2-ds.xml 63175 2007-05-21 16:26:06Z rrajesh $ -->



  <local-tx-datasource>
    <jndi-name>TopLinkDS</jndi-name>
    <connection-url>jdbc:db2://tlsvrdb7.ca.oracle.com:50003/TOPLINK</connection-url>
    <driver-class>com.ibm.db2.jcc.DB2Driver</driver-class>
    <user-name>aime</user-name>
    2cool
    <min-pool-size>0</min-pool-size>
        <!-- sql to call when connection is created
        <new-connection-sql>some arbitrary sql</new-connection-sql>
        -->

        <!-- sql to call on an existing pooled connection when it is obtained from pool 
        <check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
        -->

      <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml -->
      
         <type-mapping>DB2</type-mapping>
      
  </local-tx-datasource>



3. Excpetion:

[java] 13:59:12,494 WARN  [JBossManagedConnectionPool] Throwable while attempting to get a new connection: null
     [java] org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (com.ibm.db2.jcc.c.SqlException: SQL10007N Message "-1390" could not be retrieved.  Reason code: "3".
     [java] )
     [java] 	at org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory.createManagedConnection(XAManagedConnectionFactory.java:144)
     [java] 	at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConnectionPool.java:577)
     [java] 	at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:262)
     [java] 	at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:500)
     [java] 	at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:341)
     [java] 	at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:315)
     [java] 	at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:396)
     [java] 	at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:842)
     [java] 	at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:88)
     [java] 	at oracle.toplink.jndi.JNDIConnector.connect(JNDIConnector.java:123)
     [java] 	at oracle.toplink.jndi.JNDIConnector.connect(JNDIConnector.java:84)
     [java] 	at oracle.toplink.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:153)
     [java] 	at oracle.toplink.internal.databaseaccess.DatasourceAccessor.connectInternal(DatasourceAccessor.java:263)
     [java] 	at oracle.toplink.internal.databaseaccess.DatabaseAccessor.connectInternal(DatabaseAccessor.java:235)
     [java] 	at oracle.toplink.internal.databaseaccess.DatasourceAccessor.connect(DatasourceAccessor.java:355)
     [java] 	at oracle.toplink.threetier.ConnectionPool.buildConnection(ConnectionPool.java:111)
     [java] 	at oracle.toplink.threetier.ExternalConnectionPool.startUp(ExternalConnectionPool.java:98)
     [java] 	at oracle.toplink.threetier.ServerSession.connect(ServerSession.java:441)
     [java] 	at oracle.toplink.internal.sessions.DatabaseSessionImpl.login(DatabaseSessionImpl.java:600)
     [java] 	at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(SessionManager.java:467)
     [java] 	at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(SessionManager.java:280)
     [java] 	at oracle.toplink.testing.ejb.testframework.ServerSideTestHelperBean.getSession(ServerSideTestHelperBean.java:153)
     [java] 	at oracle.toplink.testing.ejb.testframework.ServerSideTestHelperBean.changeDatabasePlatform(ServerSideTestHelperBean.java:99)
     [java] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     [java] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     [java] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     [java] 	at java.lang.reflect.Method.invoke(Method.java:585)
     [java] 	at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
     [java] 	at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:237)
     [java] 	at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:158)
     [java] 	at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
     [java] 	at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
     [java] 	at org.jboss.ejb.plugins.AbstractTxInterceptorBMT.invokeNext(AbstractTxInterceptorBMT.java:173)
     [java] 	at org.jboss.ejb.plugins.TxInterceptorBMT.invoke(TxInterceptorBMT.java:77)
     [java] 	at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:169)
     [java] 	at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:168)
     [java] 	at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
     [java] 	at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:138)
     [java] 	at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:648)
     [java] 	at org.jboss.ejb.Container.invoke(Container.java:960)
     [java] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     [java] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     [java] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     [java] 	at java.lang.reflect.Method.invoke(Method.java:585)
     [java] 	at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
     [java] 	at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
     [java] 	at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
     [java] 	at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
     [java] 	at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
     [java] 	at org.jboss.invocation.unified.server.UnifiedInvoker.invoke(UnifiedInvoker.java:231)
     [java] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     [java] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     [java] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     [java] 	at java.lang.reflect.Method.invoke(Method.java:585)
     [java] 	at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
     [java] 	at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
     [java] 	at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
     [java] 	at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
     [java] 	at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
     [java] 	at javax.management.MBeanServerInvocationHandler.invoke(MBeanServerInvocationHandler.java:201)
     [java] 	at $Proxy16.invoke(Unknown Source)
     [java] 	at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:769)
     [java] 	at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:573)
     [java] 	at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:387)
     [java] 	at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:166)

I am wondering if I must install DB2 app client for the testing, any advice and suggestions will be appreciated!

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4101927#4101927

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4101927



More information about the jboss-user mailing list