Why fuse log shows ERRORCODE=-4470, SQLSTATE=08003 DB2 connection is closed error ?

Solution Unverified - Updated -

Issue

  • Why are we getting the following (and attached) exception in our production logs :
Caused by: com.ibm.db2.jcc.am.SqlNonTransientConnectionException: [jcc][t4][10335][10366][4.15.82] Invalid operation: Connection is closed. ERRORCODE=-4470, SQLSTATE=08003
    at com.ibm.db2.jcc.am.fd.a(fd.java:686)[277:wrap_mvn_com.ibm_db2jcc4_4.15.82:0
  • Following is the data source configuration
    <service interface="javax.sql.DataSource">
        <service-properties>
            <entry key="osgi.jndi.service.name" value="jdbc/DataSource" />
        </service-properties>
        <bean class="com.ibm.db2.jcc.DB2DataSource">
            <property name="serverName" value="${db.connection.host}" />
            <property name="portNumber" value="${db.connection.port}" />
            <property name="databaseName" value="${db.connection.sid}" />
            <property name="currentSchema" value="${db.connection.currentSchema}" />
            <property name="user" value="${db.connection.user}" />
            <property name="password" value="${db.connection.password}" />
            <property name="driverType" value="4" />
            <property name="dataSourceName" value="TestConnectionPoll" />
            <property name="blockingReadConnectionTimeout" value="15" />
            <property name="loginTimeout" value="3" />
        </bean>
    </service>
  • Following is the persistence unit config :
    <persistence-unit name="dmsPersistenceUnit" transaction-type="RESOURCE_LOCAL">
        <description>Persistence unit for the Test service</description>
        <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
        <non-jta-data-source>osgi:service/javax.sql.DataSource/(osgi.jndi.service.name=jdbc/DataSource)</non-jta-data-source>
        <class>test.TestEntity</class>
        <exclude-unlisted-classes>true</exclude-unlisted-classes>
        <properties>
            <property name="openjpa.jdbc.DBDictionary" value="db2" />
            <property name="openjpa.Log" value="DefaultLevel=WARN, Runtime=WARN, Tool=WARN, SQL=TRACE" />
            <property name="openjpa.ConnectionFactoryProperties" value="PrintParameters=true" />
            <!-- <property name="openjpa.DataCache" value="true(CacheSize=2000, SoftReferenceSize=2000)"/>
            <property name="openjpa.QueryCache" value="true"/> -->
        </properties>
    </persistence-unit>

Environment

  • Red Hat JBoss Fuse
    • 6.1.0

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.