activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Raj_New <rsr_...@yahoo.co.in>
Subject Re: [ActiveMQ Cleanup Timer] (org.apache.activemq.store.jdbc.DefaultDatabaseLocker:keepAlive:123) - Failed to update database lock:
Date Mon, 27 Apr 2009 15:37:31 GMT

I have gone through AMQ 5.2 source code and found following particular
section where I am geetting exception. The exception is thrown after couple
of days running my applicaton successfully. 

Any idea how to avoid it???

DefaultDatabaseLocker.java

    public boolean keepAlive() {
        PreparedStatement statement = null;
        boolean result = false;
        try {
            statement =
connection.prepareStatement(statements.getLockUpdateStatement());
            statement.setLong(1, System.currentTimeMillis());
            int rows = statement.executeUpdate();
            if (rows == 1) {
                result=true;
            }
        } catch (Exception e) {
            LOG.error("Failed to update database lock: " + e, e);       
}finally {
            if (statement != null) {
                try {
                    statement.close();
                } catch (SQLException e) {
                    LOG.error("Failed to close statement",e);
                }
            }
        }
        return result;
    }





Raj_New wrote:
> 
> I am getting this error using embedded broker of AMQ5.2 which is causing
> to shut down the broker. Database driver is db2. please suggest me how
> could I remove this error. I hope their are some configuration enteries
> that I am missing in activemq.xml.
> 
> [4/26/09 20:13:19:769 CDT] 0000002f SystemOut     O ERROR [ActiveMQ
> Cleanup Timer]
> (org.apache.activemq.store.jdbc.DefaultDatabaseLocker:keepAlive:123) -
> Failed to update database lock: com.ibm.db2.jcc.b.SqlException: DB2 SQL
> error: SQLCODE: -964, SQLSTATE: 57011, SQLERRMC: null
> com.ibm.db2.jcc.b.SqlException: DB2 SQL error: SQLCODE: -964, SQLSTATE:
> 57011, SQLERRMC: null
> 	at java.sql.SQLException.<init>(Unknown Source)
> 	at com.ibm.db2.jcc.b.SqlException.<init>(SqlException.java:71)
> 	at com.ibm.db2.jcc.b.zc.d(zc.java:1351)
> 	at com.ibm.db2.jcc.a.db.l(db.java:366)
> 	at com.ibm.db2.jcc.a.db.a(db.java:64)
> 	at com.ibm.db2.jcc.a.r.a(r.java:48)
> 	at com.ibm.db2.jcc.a.tb.c(tb.java:266)
> 	at com.ibm.db2.jcc.b.ad.Z(ad.java:1666)
> 	at com.ibm.db2.jcc.b.ad.d(ad.java:2224)
> 	at com.ibm.db2.jcc.b.ad.V(ad.java:521)
> 	at com.ibm.db2.jcc.b.ad.executeUpdate(ad.java:504)
> 	at
> org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:94)
> 	at
> org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:94)
> 	at
> org.apache.activemq.store.jdbc.DefaultDatabaseLocker.keepAlive(DefaultDatabaseLocker.java:118)
> 	at
> org.apache.activemq.store.jdbc.JDBCPersistenceAdapter.databaseLockKeepAlive(JDBCPersistenceAdapter.java:481)
> 	at
> org.apache.activemq.store.jdbc.JDBCPersistenceAdapter$1.run(JDBCPersistenceAdapter.java:183)
> 	at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:452)
> 	at
> java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:328)
> 	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:161)
> 	at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:109)
> 	at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:192)
> 	at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:216)
> 	at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:896)
> 	at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
> 	at java.lang.Thread.run(Thread.java:735)
> [4/26/09 20:13:19:769 CDT] 0000002f SystemOut     O  INFO [ActiveMQ
> Cleanup Timer]
> (org.apache.activemq.store.jdbc.JDBCPersistenceAdapter:stopBroker:495) -
> No longer able to keep the exclusive lock so giving up being a master
> [4/26/09 20:13:19:769 CDT] 0000002f SystemOut     O  INFO [ActiveMQ
> Cleanup Timer] (org.apache.activemq.broker.BrokerService:stop:505) -
> ActiveMQ Message Broker (localhost,
> ID:cscdevdal001-1150-1240269302749-0:0) is shutting down
> [4/26/09 20:13:22:878 CDT] 0000002f SystemOut     O  INFO [ActiveMQ
> Cleanup Timer] (org.apache.activemq.broker.TransportConnector:stop:273) -
> Connector openwire Stopped
> [4/26/09 20:13:26:503 CDT] 0000002f SystemOut     O  INFO [ActiveMQ
> Cleanup Timer] (org.apache.activemq.broker.BrokerService:stop:542) -
> ActiveMQ JMS Message Broker (localhost,
> ID:cscdevdal001-1150-1240269302749-0:0) stopped
> 

-- 
View this message in context: http://www.nabble.com/-ActiveMQ-Cleanup-Timer--%28org.apache.activemq.store.jdbc.DefaultDatabaseLocker%3AkeepAlive%3A123%29---Failed-to-update-database-lock%3A-tp23252301p23259064.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message