activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Woody Dickson" <woodydick...@gmail.com>
Subject Please help with a strange ibatis problem
Date Sat, 10 Jan 2009 07:52:48 GMT
Hi,

I am using iBatis to automatically store some info into the database when a
message is received by Activemq.  My routing is shown as follows:

 <route>
            <from uri="activemq:topic:AgentLogin"/>
        <process ref="eventProcessor"/>
            <to uri="ibatis:agentPark"/>
        <to uri="ibatis:agentLogin"/>
                <to uri="bean:agentMatcher"/>
        </route>

The the data is received, I am getting
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException, but then Activemq
would store preceed with storing the data into the database.  I have no clue
why it is happening.  I also checked my SqlMapConfig.xml and the path to
mysql db is correct.

Here is the log:

DEBUG ActiveMQMessageConsumer        -
ID:localhost.localdomain-38968-1231601378803-2:0:1:1 received message:
MessageDispatch {commandId = 0, responseRequired = false, consumerId =
ID:localhost.localdomain-38968-1231601378803-2:0:1:1, destination =
topic://AgentLogin, message = ActiveMQTextMessage {commandId = 4,
responseRequired = false, messageId =
ID:localhost.localdomain-38968-1231601378803-9:4:-1:1:2, originalDestination
= null, originalTransactionId = null, producerId =
ID:localhost.localdomain-38968-1231601378803-9:4:-1:1, destination =
topic://AgentLogin, transactionId = null, expiration = 0, timestamp =
1231602146556, arrival = 0, brokerInTime = 1231602146556, brokerOutTime =
1231602146556, correlationId = null, replyTo = null, persistent = false,
type = null, priority = 0, groupID = null, groupSequence = 0,
targetConsumerId = null, compressed = false, userID = null, content =
org.apache.activemq.util.ByteSequence@4b1bcd, marshalledProperties = null,
dataStructure = null, redeliveryCounter = 0, size = 0, properties = null,
readOnlyProperties = true, readOnlyBody = true, droppable = false, text =
null}, redeliveryCounter = 0}
DEBUG EndpointMessageListener        - Endpoint[activemq:topic:AgentLogin]
consumer receiving JMS message: ActiveMQTextMessage {commandId = 4,
responseRequired = false, messageId =
ID:localhost.localdomain-38968-1231601378803-9:4:-1:1:2, originalDestination
= null, originalTransactionId = null, producerId =
ID:localhost.localdomain-38968-1231601378803-9:4:-1:1, destination =
topic://AgentLogin, transactionId = null, expiration = 0, timestamp =
1231602146556, arrival = 0, brokerInTime = 1231602146556, brokerOutTime =
1231602146556, correlationId = null, replyTo = null, persistent = false,
type = null, priority = 0, groupID = null, groupSequence = 0,
targetConsumerId = null, compressed = false, userID = null, content =
org.apache.activemq.util.ByteSequence@4b1bcd, marshalledProperties = null,
dataStructure = null, redeliveryCounter = 0, size = 0, properties = null,
readOnlyProperties = true, readOnlyBody = true, droppable = false, text =
null}
INFO  TraceInterceptor               -
ID-localhost.localdomain/40083-1231601383004/2-4 -> process(ref:
eventProcessor) , Pattern:InOnly , Headers:{JMSXGroupID=null,
JMSCorrelationID=null, JMSType=null, JMSExpiration=0,
JMSMessageID=ID:localhost.localdomain-38968-1231601378803-9:4:-1:1:2,
JMSRedelivered=false, JMSDeliveryMode=1, JMSPriority=0, JMSReplyTo=null,
JMSTimestamp=1231602146556, JMSDestination=topic://AgentLogin} ,
BodyType:String ,
Body:<document><event><event-name>CUSTOM</event-name><action-name>consumer_start</action-name><uuid>fa29ddaf-c4c6-4b7b-b075-747bbea48d55</uuid><host>192.168.1.101</host><time>2009-01-10
23:32:58</time><caller-id>1000</caller-id><dest>0</dest><inbound></inbound><other-leg-uuid></other-leg-uuid><agent-sip-id>1000</agent-sip-id></event></document>


payload =
<document><event><event-name>CUSTOM</event-name><action-name>consumer_start</action-name><uuid>fa29ddaf-c4c6-4b7b-b075-747bbea48d55</uuid><host>192.168.1.101</host><time>2009-01-10
23:32:58</time><caller-id>1000</caller-id><dest>0</dest><inbound></inbound><other-leg-uuid></other-leg-uuid><agent-sip-id>1000</agent-sip-id></event></document>


inboundid = 0
INFO  TraceInterceptor               -
ID-localhost.localdomain/40083-1231601383004/2-4 ->
to(ibatis:agentPark)      , Pattern:InOnly , Headers:{JMSXGroupID=null,
JMSCorrelationID=null, JMSType=null, JMSExpiration=0,
JMSMessageID=ID:localhost.localdomain-38968-1231601378803-9:4:-1:1:2,
JMSRedelivered=false, JMSDeliveryMode=1, JMSPriority=0, JMSReplyTo=null,
JMSTimestamp=1231602146556, JMSDestination=topic://AgentLogin} ,
BodyType:com.yht.activemq.ibatis.Event ,
Body:com.yht.activemq.ibatis.Event@1eee3fb
DEBUG SimpleDataSource               - Checked out connection 8023092 from
pool.
DEBUG Connection                     - {conn-100019} Connection
DEBUG Connection                     - {conn-100019} Preparing
Statement:       insert into agent_park_status (       agent_id,  uuid,
host, time)     Select agent_id, ?,?, ? from agent where sip_user =
?
ERROR Connection                     - Error calling
Connection.prepareStatement:
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No
operations allowed after connection closed.Connection was implicitly closed
due to underlying exception/error:


** BEGIN NESTED EXCEPTION **

com.mysql.jdbc.exceptions.jdbc4.CommunicationsException
MESSAGE: Communications link failure

Last packet sent to the server was 1 ms ago.

STACKTRACE:

com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link
failure

Last packet sent to the server was 1 ms ago.
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
        at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
        at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
        at
com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1074)
        at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2985)
        at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2871)
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3414)
        at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1936)
        at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2060)
        at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2536)
        at
com.mysql.jdbc.ConnectionImpl.rollbackNoChecks(ConnectionImpl.java:4706)
        at com.mysql.jdbc.ConnectionImpl.rollback(ConnectionImpl.java:4591)
        at
com.ibatis.common.jdbc.SimpleDataSource.popConnection(SimpleDataSource.java:629)
        at
com.ibatis.common.jdbc.SimpleDataSource.getConnection(SimpleDataSource.java:222)
        at
com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.init(JdbcTransaction.java:48)
        at
com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.getConnection(JdbcTransaction.java:89)
        at
com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeUpdate(MappedStatement.java:94)
        at
com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.insert(SqlMapExecutorDelegate.java:393)
        at
com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.insert(SqlMapSessionImpl.java:82)
        at
com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.insert(SqlMapClientImpl.java:58)
        at
org.apache.camel.component.ibatis.IBatisProducer.process(IBatisProducer.java:52)
        at
org.apache.camel.processor.SendProcessor.process(SendProcessor.java:61)
        at
org.apache.camel.processor.DelegateProcessor.processNext(DelegateProcessor.java:50)
        at
org.apache.camel.processor.DelegateProcessor.proceed(DelegateProcessor.java:79)
        at
org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:84)
        at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:75)
        at
org.apache.camel.processor.DeadLetterChannel.process(DeadLetterChannel.java:172)
        at
org.apache.camel.processor.DeadLetterChannel.process(DeadLetterChannel.java:93)
        at org.apache.camel.processor.Pipeline.process(Pipeline.java:115)
        at org.apache.camel.processor.Pipeline.process(Pipeline.java:89)
        at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:63)
        at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:41)
        at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:50)
        at
org.apache.camel.processor.DelegateProcessor.processNext(DelegateProcessor.java:50)
        at
org.apache.camel.processor.DelegateProcessor.proceed(DelegateProcessor.java:79)
        at
org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:84)
        at
org.apache.camel.impl.converter.AsyncProcessorTypeConverter$ProcessorToAsyncProcessorBridge.process(AsyncProcessorTypeConverter.java:43)
        at
org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:47)
        at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:41)
        at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:66)
        at
org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:72)
        at
org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:531)
        at
org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:466)
        at
org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:435)
        at
org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:316)
        at
org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:255)
        at
org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:887)
        at
org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:822)
        at java.lang.Thread.run(Thread.java:619)
Caused by: java.io.EOFException: Can not read response from server. Expected
to read 4 bytes, read 0 bytes before connection was unexpectedly lost.
        at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:2431)
        at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2882)
        ... 44 more


** END NESTED EXCEPTION **


        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
        at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
        at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
        at com.mysql.jdbc.Util.getInstance(Util.java:381)
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:984)
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:926)
        at
com.mysql.jdbc.ConnectionImpl.checkClosed(ConnectionImpl.java:1098)
        at
com.mysql.jdbc.ConnectionImpl.prepareStatement(ConnectionImpl.java:4076)
        at
com.mysql.jdbc.ConnectionImpl.prepareStatement(ConnectionImpl.java:4042)
        at sun.reflect.GeneratedMethodAccessor36.invoke(Unknown Source)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at
com.ibatis.common.jdbc.SimpleDataSource$SimplePooledConnection.invoke(SimpleDataSource.java:958)
        at $Proxy27.prepareStatement(Unknown Source)
        at sun.reflect.GeneratedMethodAccessor36.invoke(Unknown Source)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at
com.ibatis.common.jdbc.logging.ConnectionLogProxy.invoke(ConnectionLogProxy.java:53)
        at $Proxy27.prepareStatement(Unknown Source)
        at
com.ibatis.sqlmap.engine.execution.SqlExecutor.prepareStatement(SqlExecutor.java:497)
        at
com.ibatis.sqlmap.engine.execution.SqlExecutor.executeUpdate(SqlExecutor.java:75)
        at
com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.sqlExecuteUpdate(MappedStatement.java:216)
        at
com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeUpdate(MappedStatement.java:94)
        at
com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.insert(SqlMapExecutorDelegate.java:393)
        at
com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.insert(SqlMapSessionImpl.java:82)
        at
com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.insert(SqlMapClientImpl.java:58)
        at
org.apache.camel.component.ibatis.IBatisProducer.process(IBatisProducer.java:52)
        at
org.apache.camel.processor.SendProcessor.process(SendProcessor.java:61)
        at
org.apache.camel.processor.DelegateProcessor.processNext(DelegateProcessor.java:50)
        at
org.apache.camel.processor.DelegateProcessor.proceed(DelegateProcessor.java:79)
        at
org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:84)
        at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:75)
        at
org.apache.camel.processor.DeadLetterChannel.process(DeadLetterChannel.java:172)
        at
org.apache.camel.processor.DeadLetterChannel.process(DeadLetterChannel.java:93)
        at org.apache.camel.processor.Pipeline.process(Pipeline.java:115)
        at org.apache.camel.processor.Pipeline.process(Pipeline.java:89)
        at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:63)
        at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:41)
        at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:50)
        at
org.apache.camel.processor.DelegateProcessor.processNext(DelegateProcessor.java:50)
        at
org.apache.camel.processor.DelegateProcessor.proceed(DelegateProcessor.java:79)
        at
org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:84)
        at
org.apache.camel.impl.converter.AsyncProcessorTypeConverter$ProcessorToAsyncProcessorBridge.process(AsyncProcessorTypeConverter.java:43)
        at
org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:47)
        at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:41)
        at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:66)
        at
org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:72)
        at
org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:531)
        at
org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:466)
        at
org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:435)
        at
org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:316)
        at
org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:255)
        at
org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:887)
        at
org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:822)
        at java.lang.Thread.run(Thread.java:619)
ERROR Connection                     - Error calling Connection.rollback:
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException:
Connection.close() has already been called. Invalid operation in this state.
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
        at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
        at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
        at com.mysql.jdbc.Util.getInstance(Util.java:381)
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:984)
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:926)
        at com.mysql.jdbc.ConnectionImpl.getMutex(ConnectionImpl.java:3018)
        at com.mysql.jdbc.ConnectionImpl.rollback(ConnectionImpl.java:4564)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at
com.ibatis.common.jdbc.SimpleDataSource$SimplePooledConnection.invoke(SimpleDataSource.java:958)
        at $Proxy27.rollback(Unknown Source)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at
com.ibatis.common.jdbc.logging.ConnectionLogProxy.invoke(ConnectionLogProxy.java:68)
        at $Proxy27.rollback(Unknown Source)
        at
com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.rollback(JdbcTransaction.java:72)
        at
com.ibatis.sqlmap.engine.transaction.TransactionManager.end(TransactionManager.java:87)
        at
com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.endTransaction(SqlMapExecutorDelegate.java:734)
        at
com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.endTransaction(SqlMapSessionImpl.java:176)
        at
com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.endTransaction(SqlMapClientImpl.java:153)
        at
com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.autoEndTransaction(SqlMapExecutorDelegate.java:835)
        at
com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.insert(SqlMapExecutorDelegate.java:410)
        at
com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.insert(SqlMapSessionImpl.java:82)
        at
com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.insert(SqlMapClientImpl.java:58)
        at
org.apache.camel.component.ibatis.IBatisProducer.process(IBatisProducer.java:52)
        at
org.apache.camel.processor.SendProcessor.process(SendProcessor.java:61)
        at
org.apache.camel.processor.DelegateProcessor.processNext(DelegateProcessor.java:50)
        at
org.apache.camel.processor.DelegateProcessor.proceed(DelegateProcessor.java:79)
        at
org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:84)
        at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:75)
        at
org.apache.camel.processor.DeadLetterChannel.process(DeadLetterChannel.java:172)
        at
org.apache.camel.processor.DeadLetterChannel.process(DeadLetterChannel.java:93)
        at org.apache.camel.processor.Pipeline.process(Pipeline.java:115)
        at org.apache.camel.processor.Pipeline.process(Pipeline.java:89)
        at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:63)
        at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:41)
        at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:50)
        at
org.apache.camel.processor.DelegateProcessor.processNext(DelegateProcessor.java:50)
        at
org.apache.camel.processor.DelegateProcessor.proceed(DelegateProcessor.java:79)
        at
org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:84)
        at
org.apache.camel.impl.converter.AsyncProcessorTypeConverter$ProcessorToAsyncProcessorBridge.process(AsyncProcessorTypeConverter.java:43)
        at
org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:47)
        at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:41)
        at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:66)
        at
org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:72)
        at
org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:531)
        at
org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:466)
        at
org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:435)
        at
org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:316)
        at
org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:255)
        at
org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:887)
        at
org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:822)
        at java.lang.Thread.run(Thread.java:619)
DEBUG SimpleDataSource               - A bad connection (8023092) attempted
to return to the pool, discarding connection.
INFO  TraceInterceptor               -
ID-localhost.localdomain/40083-1231601383004/2-4 ->
to(ibatis:agentPark)      , Pattern:InOnly , Headers:{JMSXGroupID=null,
JMSCorrelationID=null, JMSType=null, JMSExpiration=0,
JMSMessageID=ID:localhost.localdomain-38968-1231601378803-9:4:-1:1:2,
JMSRedelivered=false, JMSDeliveryMode=1, JMSPriority=0, JMSReplyTo=null,
JMSTimestamp=1231602146556, JMSDestination=topic://AgentLogin} ,
BodyType:com.yht.activemq.ibatis.Event ,
Body:com.yht.activemq.ibatis.Event@1eee3fb
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException:
Connection.close() has already been called. Invalid operation in this state.
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
        at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
        at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
        at com.mysql.jdbc.Util.getInstance(Util.java:381)
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:984)
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:926)
        at com.mysql.jdbc.ConnectionImpl.getMutex(ConnectionImpl.java:3018)
        at com.mysql.jdbc.ConnectionImpl.rollback(ConnectionImpl.java:4564)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at
com.ibatis.common.jdbc.SimpleDataSource$SimplePooledConnection.invoke(SimpleDataSource.java:958)
        at $Proxy27.rollback(Unknown Source)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at
com.ibatis.common.jdbc.logging.ConnectionLogProxy.invoke(ConnectionLogProxy.java:68)
        at $Proxy27.rollback(Unknown Source)
        at
com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.rollback(JdbcTransaction.java:72)
        at
com.ibatis.sqlmap.engine.transaction.TransactionManager.end(TransactionManager.java:87)
        at
com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.endTransaction(SqlMapExecutorDelegate.java:734)
        at
com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.endTransaction(SqlMapSessionImpl.java:176)
        at
com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.endTransaction(SqlMapClientImpl.java:153)
        at
com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.autoEndTransaction(SqlMapExecutorDelegate.java:835)
        at
com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.insert(SqlMapExecutorDelegate.java:410)
        at
com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.insert(SqlMapSessionImpl.java:82)
        at
com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.insert(SqlMapClientImpl.java:58)
        at
org.apache.camel.component.ibatis.IBatisProducer.process(IBatisProducer.java:52)
        at
org.apache.camel.processor.SendProcessor.process(SendProcessor.java:61)
        at
org.apache.camel.processor.DelegateProcessor.processNext(DelegateProcessor.java:50)
        at
org.apache.camel.processor.DelegateProcessor.proceed(DelegateProcessor.java:79)
        at
org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:84)
        at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:75)
        at
org.apache.camel.processor.DeadLetterChannel.process(DeadLetterChannel.java:172)
        at
org.apache.camel.processor.DeadLetterChannel.process(DeadLetterChannel.java:93)
        at org.apache.camel.processor.Pipeline.process(Pipeline.java:115)
        at org.apache.camel.processor.Pipeline.process(Pipeline.java:89)
        at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:63)
        at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:41)
        at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:50)
        at
org.apache.camel.processor.DelegateProcessor.processNext(DelegateProcessor.java:50)
        at
org.apache.camel.processor.DelegateProcessor.proceed(DelegateProcessor.java:79)
        at
org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:84)
        at
org.apache.camel.impl.converter.AsyncProcessorTypeConverter$ProcessorToAsyncProcessorBridge.process(AsyncProcessorTypeConverter.java:43)
        at
org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:47)
        at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:41)
        at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:66)
        at
org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:72)
        at
org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:531)
        at
org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:466)
        at
org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:435)
        at
org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:316)
        at
org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:255)
        at
org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:887)
        at
org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:822)
        at java.lang.Thread.run(Thread.java:619)
ERROR DeadLetterChannel              - Failed delivery for exchangeId:
ID-localhost.localdomain/40083-1231601383004/0-4. On delivery attempt: 0
caught:
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException:
Connection.close() has already been called. Invalid operation in this state.
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException:
Connection.close() has already been called. Invalid operation in this state.
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
        at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
        at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
        at com.mysql.jdbc.Util.getInstance(Util.java:381)
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:984)
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:926)
        at com.mysql.jdbc.ConnectionImpl.getMutex(ConnectionImpl.java:3018)
        at com.mysql.jdbc.ConnectionImpl.rollback(ConnectionImpl.java:4564)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at
com.ibatis.common.jdbc.SimpleDataSource$SimplePooledConnection.invoke(SimpleDataSource.java:958)
        at $Proxy27.rollback(Unknown Source)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at
com.ibatis.common.jdbc.logging.ConnectionLogProxy.invoke(ConnectionLogProxy.java:68)
        at $Proxy27.rollback(Unknown Source)
        at
com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.rollback(JdbcTransaction.java:72)
        at
com.ibatis.sqlmap.engine.transaction.TransactionManager.end(TransactionManager.java:87)
        at
com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.endTransaction(SqlMapExecutorDelegate.java:734)
        at
com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.endTransaction(SqlMapSessionImpl.java:176)
        at
com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.endTransaction(SqlMapClientImpl.java:153)
        at
com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.autoEndTransaction(SqlMapExecutorDelegate.java:835)
        at
com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.insert(SqlMapExecutorDelegate.java:410)
        at
com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.insert(SqlMapSessionImpl.java:82)
        at
com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.insert(SqlMapClientImpl.java:58)
        at
org.apache.camel.component.ibatis.IBatisProducer.process(IBatisProducer.java:52)
        at
org.apache.camel.processor.SendProcessor.process(SendProcessor.java:61)
        at
org.apache.camel.processor.DelegateProcessor.processNext(DelegateProcessor.java:50)
        at
org.apache.camel.processor.DelegateProcessor.proceed(DelegateProcessor.java:79)
        at
org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:84)
        at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:75)
        at
org.apache.camel.processor.DeadLetterChannel.process(DeadLetterChannel.java:172)
        at
org.apache.camel.processor.DeadLetterChannel.process(DeadLetterChannel.java:93)
        at org.apache.camel.processor.Pipeline.process(Pipeline.java:115)
        at org.apache.camel.processor.Pipeline.process(Pipeline.java:89)
        at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:63)
        at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:41)
        at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:50)
        at
org.apache.camel.processor.DelegateProcessor.processNext(DelegateProcessor.java:50)
        at
org.apache.camel.processor.DelegateProcessor.proceed(DelegateProcessor.java:79)
        at
org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:84)
        at
org.apache.camel.impl.converter.AsyncProcessorTypeConverter$ProcessorToAsyncProcessorBridge.process(AsyncProcessorTypeConverter.java:43)
        at
org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:47)
        at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:41)
        at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:66)
        at
org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:72)
        at
org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:531)
        at
org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:466)
        at
org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:435)
        at
org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:316)
        at
org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:255)
        at
org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:887)
        at
org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:822)
        at java.lang.Thread.run(Thread.java:619)
DEBUG DefaultExceptionPolicyStrategy - Finding best suited exception policy
for thrown exception
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException
DEBUG DefaultExceptionPolicyStrategy - No candidate found to be used as
exception policy
DEBUG RedeliveryPolicy               - Sleeping for: 1000 millis until
attempting redelivery
INFO  TraceInterceptor               -
ID-localhost.localdomain/40083-1231601383004/2-4 ->
to(ibatis:agentPark)      , Pattern:InOnly ,
Properties:{CamelCauseException=com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException:
Connection.close() has already been called. Invalid operation in this
state.} , Headers:{JMSCorrelationID=null,
JMSMessageID=ID:localhost.localdomain-38968-1231601378803-9:4:-1:1:2,
JMSExpiration=0, org.apache.camel.RedeliveryCounter=1, JMSDeliveryMode=1,
JMSPriority=0, JMSTimestamp=1231602146556, JMSReplyTo=null,
JMSDestination=topic://AgentLogin, JMSXGroupID=null, JMSType=null,
JMSRedelivered=false, org.apache.camel.Redelivered=true} ,
BodyType:com.yht.activemq.ibatis.Event ,
Body:com.yht.activemq.ibatis.Event@1eee3fb
DEBUG SimpleDataSource               - Created connection 3927400.
DEBUG Connection                     - {conn-100020} Connection
DEBUG Connection                     - {conn-100020} Preparing
Statement:       insert into agent_park_status (       agent_id,  uuid,
host, time)     Select agent_id, ?,?, ? from agent where sip_user =
?
DEBUG PreparedStatement              - {pstm-100021} Executing
Statement:       insert into agent_park_status (       agent_id,  uuid,
host, time)     Select agent_id, ?,?, ? from agent where sip_user =
?
DEBUG PreparedStatement              - {pstm-100021} Parameters:
[fa29ddaf-c4c6-4b7b-b075-747bbea48d55, 192.168.1.101, 2009-01-10 23:32:58,
1000]
DEBUG PreparedStatement              - {pstm-100021} Types:
[java.lang.String, java.lang.String, java.lang.String, java.lang.String]
DEBUG SimpleDataSource               - Returned connection 3927400 to pool.
INFO  TraceInterceptor               -
ID-localhost.localdomain/40083-1231601383004/2-4 ->
to(ibatis:agentLogin)     , Pattern:InOnly ,
Properties:{CamelCauseException=com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException:
Connection.close() has already been called. Invalid operation in this
state.} , Headers:{JMSCorrelationID=null,
JMSMessageID=ID:localhost.localdomain-38968-1231601378803-9:4:-1:1:2,
JMSExpiration=0, org.apache.camel.RedeliveryCounter=1, JMSDeliveryMode=1,
JMSPriority=0, JMSTimestamp=1231602146556, JMSReplyTo=null,
JMSDestination=topic://AgentLogin, JMSXGroupID=null, JMSType=null,
JMSRedelivered=false, org.apache.camel.Redelivered=true} ,
BodyType:com.yht.activemq.ibatis.Event ,
Body:com.yht.activemq.ibatis.Event@1eee3fb
DEBUG SimpleDataSource               - Checked out connection 3927400 from
pool.
DEBUG Connection                     - {conn-100022} Connection
DEBUG Connection                     - {conn-100022} Preparing
Statement:     insert into agent_log ( agent_id,login_time, channel_uuid)
select agent_id ,    ?,? from agent where sip_user = ?
DEBUG PreparedStatement              - {pstm-100023} Executing
Statement:     insert into agent_log ( agent_id,login_time, channel_uuid)
select agent_id ,    ?,? from agent where sip_user = ?
DEBUG PreparedStatement              - {pstm-100023} Parameters: [2009-01-10
23:32:58, fa29ddaf-c4c6-4b7b-b075-747bbea48d55, 1000]
DEBUG PreparedStatement              - {pstm-100023} Types:
[java.lang.String, java.lang.String, java.lang.String]
DEBUG SimpleDataSource               - Returned connection 3927400 to pool.
INFO  TraceInterceptor               -
ID-localhost.localdomain/40083-1231601383004/2-4 ->
to(bean:agentMatcher)     , Pattern:InOnly ,
Properties:{CamelCauseException=com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException:
Connection.close() has already been called. Invalid operation in this
state.} , Headers:{JMSCorrelationID=null,
JMSMessageID=ID:localhost.localdomain-38968-1231601378803-9:4:-1:1:2,
JMSExpiration=0, org.apache.camel.RedeliveryCounter=1, JMSDeliveryMode=1,
JMSPriority=0, JMSTimestamp=1231602146556, JMSReplyTo=null,
JMSDestination=topic://AgentLogin, JMSXGroupID=null, JMSType=null,
JMSRedelivered=false, org.apache.camel.Redelivered=true} ,
BodyType:com.yht.activemq.ibatis.Event ,
Body:com.yht.activemq.ibatis.Event@1eee3fb
init connection time=1231602147623
get property
driver name=com.mysql.jdbc.Driver

conn string =jdbc:mysql://
192.168.1.105/app?useUnicode=true&characterEncoding=gb2312&useServerPrepStmts=false

after get connection

close connection time=1231602147634
DEBUG EndpointMessageListener        - Cannot send reply message as there is
no replyDestination for: JmsMessage: ActiveMQTextMessage {commandId = 4,
responseRequired = false, messageId =
ID:localhost.localdomain-38968-1231601378803-9:4:-1:1:2, originalDestination
= null, originalTransactionId = null, producerId =
ID:localhost.localdomain-38968-1231601378803-9:4:-1:1, destination =
topic://AgentLogin, transactionId = null, expiration = 0, timestamp =
1231602146556, arrival = 0, brokerInTime = 1231602146556, brokerOutTime =
1231602146556, correlationId = null, replyTo = null, persistent = false,
type = null, priority = 0, groupID = null, groupSequence = 0,
targetConsumerId = null, compressed = false, userID = null, content = null,
marshalledProperties = null, dataStructure = null, redeliveryCounter = 0,
size = 0, properties = null, readOnlyProperties = true, readOnlyBody = true,
droppable = false, text =
<document><event><event-name>CUSTOM</event-name><action-name>consumer_start</action-name><uuid>fa29ddaf-c4c6-4b7b-b075-747bbea48d55</uuid><host>192.168.1.101</host><time>2009-01-10
23:32:58</time><caller-id>1000</caller-id><dest>0</dest><inbound></inbound><other-leg-uuid></other-leg-uuid><agent-sip-id>1000</agent-sip-id></event></document>

}




Thanks in advance for all your help.

Woody

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message