geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hari Krishna Korrapati" <harikrishna.korrap...@gmail.com>
Subject Problem with connection management
Date Mon, 17 Dec 2007 13:44:43 GMT
Hi,

I am facing some problem with hibernate on Geronimo. Got the following
exception when a "*select*" query is issued against DB2.
                     com.ibm.db2.jcc.a.SqlException: DB2 SQL error: SQLCODE:
-911, SQLSTATE: 40001, SQLERRMC: 68

When i google it, i came to know it can because of connection pooling.
Would like to know whether it is something related to connection management
which we need to configure in Geronimo.

Following is the full log for the exception

17:49:14,738 WARN  [GeronimoConnectionEventListener] connectionErrorOccurred
called with null
com.ibm.db2.jcc.a.SqlException: DB2 SQL error: SQLCODE: -911, SQLSTATE:
40001, SQLERRMC: 68
    at com.ibm.db2.jcc.a.cc.b(cc.java:2828)
    at com.ibm.db2.jcc.b.be.i(be.java:181)
    at com.ibm.db2.jcc.b.be.a (be.java:142)
    at com.ibm.db2.jcc.b.be.a(be.java:33)
    at com.ibm.db2.jcc.b.s.a(s.java:31)
    at com.ibm.db2.jcc.b.h.bH(h.java:273)
    at com.ibm.db2.jcc.a.cc.N(cc.java:2736)
    at com.ibm.db2.jcc.b.d.f (d.java:977)
    at com.ibm.db2.jcc.a.o.a(o.java:181)
    at com.ibm.db2.jcc.a.cc.c(cc.java:284)
    at com.ibm.db2.jcc.a.cc.next(cc.java:259)
    at org.tranql.connector.jdbc.ResultSetHandle.next(ResultSetHandle.java:791)
    at net.sf.hibernate.loader.Loader.doQuery(Loader.java:200)
    at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections
(Loader.java:133)
    at net.sf.hibernate.loader.Loader.doList(Loader.java :955)
    at net.sf.hibernate.loader.Loader.list(Loader.java:946)
    at net.sf.hibernate.hql.QueryTranslator.list(QueryTranslator.java:846)
    at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1543)
    at net.sf.hibernate.impl.QueryImpl.list(QueryImpl.java:39)
    at samples.dao.hibernate.HibernateUserDAO.authticateUser(
HibernateUserDAO.java:740)
    ...................................
    ...................................
17:49:14,769 WARN  [JDBCExceptionReporter] SQL Error: -911, SQLState: 40001
17:49:14,769 ERROR [JDBCExceptionReporter] DB2 SQL error: SQLCODE: -911,
SQLSTATE: 40001, SQLERRMC: 68
17:49:14,769 WARN  [BatcherImpl] exception clearing maxRows/queryTimeout
java.lang.NullPointerException
    at org.tranql.connector.jdbc.ConnectionHandle.connectionError(
ConnectionHandle.java:103)
    at org.tranql.connector.jdbc.StatementHandle.getMaxRows(
StatementHandle.java:231)
    at net.sf.hibernate.impl.BatcherImpl.closeQueryStatement(
BatcherImpl.java:143)
    at net.sf.hibernate.impl.BatcherImpl.closeQueryStatement(
BatcherImpl.java:103)
    at net.sf.hibernate.loader.Loader.doQuery(Loader.java :234)
    at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections
(Loader.java:133)
    at net.sf.hibernate.loader.Loader.doList(Loader.java:955)
    at net.sf.hibernate.loader.Loader.list(Loader.java :946)
    at net.sf.hibernate.hql.QueryTranslator.list(QueryTranslator.java:846)
    at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1543)
    at net.sf.hibernate.impl.QueryImpl.list(QueryImpl.java:39)
    at samples.dao.hibernate.HibernateUserDAO.authticateUser(
HibernateUserDAO.java:740)
    ...................................
    ...................................
17:49:14,769 WARN  [JDBCExceptionReporter] SQL Error: -911, SQLState: 40001
17:49:14,769 ERROR [JDBCExceptionReporter] DB2 SQL error: SQLCODE: -911,
SQLSTATE: 40001, SQLERRMC: 68
17:49:14,769 ERROR [JDBCExceptionReporter] Could not execute query
com.ibm.db2.jcc.a.SqlException: DB2 SQL error: SQLCODE: -911, SQLSTATE:
40001, SQLERRMC: 68
    at com.ibm.db2.jcc.a.cc.b(cc.java:2828)
    at com.ibm.db2.jcc.b.be.i(be.java:181)
    at com.ibm.db2.jcc.b.be.a(be.java:142)
    at com.ibm.db2.jcc.b.be.a(be.java:33)
    at com.ibm.db2.jcc.b.s.a(s.java :31)
    at com.ibm.db2.jcc.b.h.bH(h.java:273)
    at com.ibm.db2.jcc.a.cc.N(cc.java:2736)
    at com.ibm.db2.jcc.b.d.f(d.java:977)
    at com.ibm.db2.jcc.a.o.a(o.java:181)
    at com.ibm.db2.jcc.a.cc.c(cc.java :284)
    ...................................
    ...................................

17:49:14,800 ERROR [AbstractTransactionContext] Unable to roll back
transaction
java.lang.IllegalStateException: Status is STATUS_NO_TRANSACTION
    at org.apache.geronimo.transaction.manager.TransactionImpl.rollback(
TransactionImpl.java:438)
    at
org.apache.geronimo.transaction.context.InheritableTransactionContext.rollbackAndThrow
(InheritableTransactionContext.java :308)
    at
org.apache.geronimo.transaction.context.InheritableTransactionContext.complete
(InheritableTransactionContext.java:199)
    at
org.apache.geronimo.transaction.context.InheritableTransactionContext.commit(
InheritableTransactionContext.java:146)
    at org.openejb.transaction.ContainerPolicy$TxRequired.invoke(
ContainerPolicy.java:152)
    at org.openejb.transaction.TransactionContextInterceptor.invoke(
TransactionContextInterceptor.java :80)
    at org.openejb.SystemExceptionInterceptor.invoke(
SystemExceptionInterceptor.java:82)
    at org.openejb.GenericEJBContainer.invoke(GenericEJBContainer.java:238)
    at org.openejb.proxy.EJBMethodInterceptor.intercept (
EJBMethodInterceptor.java:164)
    at
org.openejb.proxy.SessionEJBObject$$EnhancerByCGLIB$$6c960803.authenticate
(<generated>)



For the reference below is the part of my DataSource plan
          <connection-definition>
                <connectionfactory-interface>javax.sql.DataSource
</connectionfactory-interface>
                <connectiondefinition-instance>
                    <name>XYZDataSource</name>
                    <config-property-setting
name="Password">db2inst3</config-property-setting>
                    <config-property-setting name="Driver">
com.ibm.db2.jcc.DB2Driver</config-property-setting>
                    <config-property-setting
name="UserName">db2inst3</config-property-setting>
                    <config-property-setting
name="ConnectionURL">jdbc:db2://IP:PORT/DBNAME</config-property-setting>
                    <connectionmanager>
                        <local-transaction/>
                        <single-pool>
                            <max-size>10</max-size>
                            <min-size>0</min-size>

<blocking-timeout-milliseconds>5000</blocking-timeout-milliseconds>
                            <idle-timeout-minutes>30</idle-timeout-minutes>
                            <match-one/>
                        </single-pool>
                    </connectionmanager>
                </connectiondefinition-instance>
            </connection-definition>

and below is the hibernate configuration
        <property name="connection.driver_class">
COM.ibm.db2.jdbc.app.DB2Driver</property>
        <property name="connection.url">jdbc:db2:DBNAME</property>
        <property name="connection.username">db2inst3</property>
        <property name="connection.password">db2inst3</property>
        <property name="show_sql">true</property>
        <property name="use_outer_join">true</property>
        <property
name="dialect">net.sf.hibernate.dialect.DB2Dialect</property>


 <!-- Database settings -->
        <property name="dialect">net.sf.hibernate.dialect.DB2Dialect
</property>
        <property name="show_sql">true</property>
        <property name="use_outer_join">true</property>

        <!-- JDBC settings -->
        <property name="hibernate.jdbc.batch_size">200</property>
        <property name="statement_cache.size">100</property>

        <!-- Cache settings-->
        <property name="hibernate.cache.provider_class">
net.sf.ehcache.hibernate.Provider</property>
        <property name="hibernate.cache.use_query_cache">true</property>

        <!-- Transaction API -->
        <property name="transaction.factory_class">
net.sf.hibernate.transaction.JDBCTransactionFactory</property>
        <property name="transaction.manager_lookup_class">
net.sf.hibernate.transaction.GeronimoTransactionManagerLookup</property>



Please advice me on how to proceed further.

Regards,
Hari

Mime
View raw message