You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Woody Dickson <wo...@gmail.com> on 2009/01/10 09:55:00 UTC
Problem with using ibatis
Hi,
I am using activemq with camel and ibatis. My routing is like this:
<route>
<from uri="activemq:topic:AgentLogin"/>
<process ref="eventProcessor"/>
<to uri="ibatis:agentPark"/>
<to uri="ibatis:agentLogin"/>
<to uri="bean:agentMatcher"/>
</route>
the first time a message is received, everything works fine. But after
that, I keep getting strange Mysql error when receiving messages. Does
anyone know why? Thanks in advance for your help.
Here is the exception I am getting:
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 32 ms ago.
STACKTRACE:
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link
failure
Last packet sent to the server was 32 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.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.prepareStatement(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: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 (21121915) attempted
to return to the pool, discarding connection.
INFO TraceInterceptor -
ID-localhost.localdomain/51636-1231606099896/2-1 ->
to(ibatis:agentUnpark) , Pattern:InOnly , Headers:{JMSXGroupID=null,
JMSCorrelationID=null, JMSType=null, JMSExpiration=0,
JMSMessageID=ID:localhost.localdomain-36307-1231606095985-9:1:-1:1:1,
JMSRedelivered=false, JMSDeliveryMode=1, JMSPriority=0, JMSReplyTo=null,
JMSTimestamp=1231606148623, JMSDestination=topic://AgentLogout} ,
BodyType:com.yht.activemq.ibatis.Event ,
Body:com.yht.activemq.ibatis.Event@1d43bb3
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/51636-1231606099896/0-1. 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.MySQLNonTrans
Re: Problem with using ibatis
Posted by Claus Ibsen <cl...@gmail.com>.
Hi
You might wanna try with a ConnectionPool for the Connections to the
MySQL database.
If you are using Spring they have nice abstractions for that, I guess
iBatis can reuse.
You are using iBATIS driver type SIMPLE that might lead to this problem.
However I am just guessing. I think iBatis have other types so you can
lookup a driver manager in Spring or the likes.
Must be samples on the net how to use iBatis and Spring to let Spring
handle the connection pooling.
On Sat, Jan 10, 2009 at 3:30 PM, Woody Dickson <wo...@gmail.com> wrote:
> Hi,
>
> I resolved this problem by using autoReconnect=true in my dburl, but now I
> am getting another weird problem. When I send message to a specific topic,
> and continue to send to that topic, there is no error. However, when I send
> message to topic that requires ibatis ( AgentLogin in my case ) and then
> send message to another topic that does not require ibatis ( AgentLogout in
> my case ), and then send another message to AgentLogin, I get error. After
> the error occurs, I continue to get error no matter which topic I send the
> message to. Does anyone know why? I would appreciate any help and advice
> on solving this problem.
>
>
> Here is the error:
>
> payload =
> <document><event><event-name>CUSTOM</event-name><action-name>consumer_start</action-name><uuid>891a5e47-da70-4551-bfcd-35c088239620</uuid><host>192.168.1.101</host><time>2009-01-11
> 02:25:29</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>
>
>
> ERROR DeadLetterChannel - Failed delivery for exchangeId:
> ID-localhost.localdomain/42721-1231625700365/0-2. On delivery attempt: 0
> caught: com.ibatis.common.jdbc.exception.NestedSQLException:
> --- The error occurred in com/yht/activemq/ibatis/resource/Event.xml.
> --- The error occurred while applying a parameter map.
> --- Check the agentPark-InlineParameterMap.
> --- Check the statement (update failed).
> --- Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:
> Communications link failure
>
> Last packet sent to the server was 26 ms ago.
> com.ibatis.common.jdbc.exception.NestedSQLException:
> --- The error occurred in com/yht/activemq/ibatis/resource/Event.xml.
> --- The error occurred while applying a parameter map.
> --- Check the agentPark-InlineParameterMap.
> --- Check the statement (update failed).
> --- Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:
> Communications link failure
>
> Last packet sent to the server was 26 ms ago.
> at
> com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeUpdate(MappedStatement.java:107)
> 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.impl.converter.AsyncProcessorTypeConverter$ProcessorToAsyncProcessorBridge.process(AsyncProcessorTypeConverter.java:43)
> at
> org.apache.camel.processor.SendProcessor.process(SendProcessor.java:75)
> at
> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:63)
> 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.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:322)
> at
> org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:260)
> at
> org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:944)
> at
> org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:875)
> at java.lang.Thread.run(Thread.java:619)
> Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:
> Communications link failure
>
> Last packet sent to the server was 26 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.send(MysqlIO.java:3246)
> at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1917)
> at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2060)
> at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2542)
> at
> com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1734)
> at
> com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:995)
> at
> com.ibatis.sqlmap.engine.execution.SqlExecutor.executeUpdate(SqlExecutor.java:80)
> at
> com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.sqlExecuteUpdate(MappedStatement.java:216)
> at
> com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeUpdate(MappedStatement.java:94)
> ... 24 more
> Caused by: java.net.SocketException: Broken pipe
> at java.net.SocketOutputStream.socketWrite0(Native Method)
> at
> java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
> at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
> at
> java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
> at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
> at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:3227)
> ... 32 more
> DEBUG DefaultExceptionPolicyStrategy - Finding best suited exception policy
> for thrown exception com.ibatis.common.jdbc.exception.NestedSQLException
> DEBUG DefaultExceptionPolicyStrategy - No candidate found to be used as
> exception policy
> DEBUG RedeliveryPolicy - Sleeping for: 1000 millis until
> attempting redelivery
> ERROR DeadLetterChannel - Failed delivery for exchangeId:
> ID-localhost.localdomain/42721-1231625700365/0-2. On delivery attempt: 1
> caught: com.ibatis.common.jdbc.exception.NestedSQLException:
> --- The error occurred in com/yht/activemq/ibatis/resource/Event.xml.
> --- The error occurred while applying a parameter map.
> --- Check the agentPark-InlineParameterMap.
> --- Check the statement (update failed).
> --- Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:
> Communications link failure
>
> Last packet sent to the server was 1054 ms ago.
> com.ibatis.common.jdbc.exception.NestedSQLException:
> --- The error occurred in com/yht/activemq/ibatis/resource/Event.xml.
> --- The error occurred while applying a parameter map.
> --- Check the agentPark-InlineParameterMap.
> --- Check the statement (update failed).
> --- Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:
> Communications link failure
>
> Last packet sent to the server was 1054 ms ago.
> at
> com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeUpdate(MappedStatement.java:107)
> 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.impl.converter.AsyncProcessorTypeConverter$ProcessorToAsyncProcessorBridge.process(AsyncProcessorTypeConverter.java:43)
> at
> org.apache.camel.processor.SendProcessor.process(SendProcessor.java:75)
> at
> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:63)
> 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.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:322)
> at
> org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:260)
> at
> org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:944)
> at
> org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:875)
> at java.lang.Thread.run(Thread.java:619)
> Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:
> Communications link failure
>
> Last packet sent to the server was 1054 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.send(MysqlIO.java:3246)
> at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1917)
> at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2060)
> at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2542)
> at
> com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1734)
> at
> com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:995)
> at
> com.ibatis.sqlmap.engine.execution.SqlExecutor.executeUpdate(SqlExecutor.java:80)
> at
> com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.sqlExecuteUpdate(MappedStatement.java:216)
> at
> com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeUpdate(MappedStatement.java:94)
> ... 24 more
> Caused by: java.net.SocketException: Broken pipe
> at java.net.SocketOutputStream.socketWrite0(Native Method)
> at
> java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
> at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
> at
> java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
> at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
> at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:3227)
> ... 32 more
> DEBUG DefaultExceptionPolicyStrategy - Finding best suited exception policy
> for thrown exception com.ibatis.common.jdbc.exception.NestedSQLException
> DEBUG DefaultExceptionPolicyStrategy - No candidate found to be used as
> exception policy
> DEBUG RedeliveryPolicy - Sleeping for: 1000 millis until
> attempting redelivery
> ERROR DeadLetterChannel - Failed delivery for exchangeId:
> ID-localhost.localdomain/42721-1231625700365/0-2. On delivery attempt: 2
> caught: com.ibatis.common.jdbc.exception.NestedSQLException:
> --- The error occurred in com/yht/activemq/ibatis/resource/Event.xml.
> --- The error occurred while applying a parameter map.
> --- Check the agentPark-InlineParameterMap.
> --- Check the statement (update failed).
> --- Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:
> Communications link failure
>
> Last packet sent to the server was 2063 ms ago.
> com.ibatis.common.jdbc.exception.NestedSQLException:
> --- The error occurred in com/yht/activemq/ibatis/resource/Event.xml.
> --- The error occurred while applying a parameter map.
> --- Check the agentPark-InlineParameterMap.
> --- Check the statement (update failed).
> --- Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:
> Communications link failure
>
> Last packet sent to the server was 2063 ms ago.
> at
> com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeUpdate(MappedStatement.java:107)
> 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.impl.converter.AsyncProcessorTypeConverter$ProcessorToAsyncProcessorBridge.process(AsyncProcessorTypeConverter.java:43)
> at
> org.apache.camel.processor.SendProcessor.process(SendProcessor.java:75)
> at
> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:63)
> 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.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:322)
> at
> org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:260)
> at
> org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:944)
> at
> org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:875)
> at java.lang.Thread.run(Thread.java:619)
> Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:
> Communications link failure
>
> Last packet sent to the server was 2063 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.send(MysqlIO.java:3246)
> at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1917)
> at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2060)
> at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2542)
> at
> com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1734)
> at
> com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:995)
> at
> com.ibatis.sqlmap.engine.execution.SqlExecutor.executeUpdate(SqlExecutor.java:80)
> at
> com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.sqlExecuteUpdate(MappedStatement.java:216)
> at
> com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeUpdate(MappedStatement.java:94)
> ... 24 more
> Caused by: java.net.SocketException: Broken pipe
> at java.net.SocketOutputStream.socketWrite0(Native Method)
> at
> java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
> at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
> at
> java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
> at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
> at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:3227)
> ... 32 more
> DEBUG DefaultExceptionPolicyStrategy - Finding best suited exception policy
> for thrown exception com.ibatis.common.jdbc.exception.NestedSQLException
> DEBUG DefaultExceptionPolicyStrategy - No candidate found to be used as
> exception policy
> DEBUG RedeliveryPolicy - Sleeping for: 1000 millis until
> attempting redelivery
> ERROR DeadLetterChannel - Failed delivery for exchangeId:
> ID-localhost.localdomain/42721-1231625700365/0-2. On delivery attempt: 3
> caught: com.ibatis.common.jdbc.exception.NestedSQLException:
> --- The error occurred in com/yht/activemq/ibatis/resource/Event.xml.
> --- The error occurred while applying a parameter map.
> --- Check the agentPark-InlineParameterMap.
> --- Check the statement (update failed).
> --- Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:
> Communications link failure
>
> Last packet sent to the server was 3069 ms ago.
> com.ibatis.common.jdbc.exception.NestedSQLException:
> --- The error occurred in com/yht/activemq/ibatis/resource/Event.xml.
> --- The error occurred while applying a parameter map.
> --- Check the agentPark-InlineParameterMap.
> --- Check the statement (update failed).
> --- Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:
> Communications link failure
>
> Last packet sent to the server was 3069 ms ago.
> at
> com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeUpdate(MappedStatement.java:107)
> 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.impl.converter.AsyncProcessorTypeConverter$ProcessorToAsyncProcessorBridge.process(AsyncProcessorTypeConverter.java:43)
> at
> org.apache.camel.processor.SendProcessor.process(SendProcessor.java:75)
> at
> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:63)
> 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.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:322)
> at
> org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:260)
> at
> org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:944)
> at
> org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:875)
> at java.lang.Thread.run(Thread.java:619)
> Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:
> Communications link failure
>
> Last packet sent to the server was 3069 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.send(MysqlIO.java:3246)
> at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1917)
> at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2060)
> at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2542)
> at
> com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1734)
> at
> com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:995)
> at
> com.ibatis.sqlmap.engine.execution.SqlExecutor.executeUpdate(SqlExecutor.java:80)
> at
> com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.sqlExecuteUpdate(MappedStatement.java:216)
> at
> com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeUpdate(MappedStatement.java:94)
> ... 24 more
> Caused by: java.net.SocketException: Broken pipe
> at java.net.SocketOutputStream.socketWrite0(Native Method)
> at
> java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
> at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
> at
> java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
> at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
> at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:3227)
> ... 32 more
> DEBUG DefaultExceptionPolicyStrategy - Finding best suited exception policy
> for thrown exception com.ibatis.common.jdbc.exception.NestedSQLException
> DEBUG DefaultExceptionPolicyStrategy - No candidate found to be used as
> exception policy
> DEBUG RedeliveryPolicy - Sleeping for: 1000 millis until
> attempting redelivery
> ERROR DeadLetterChannel - Failed delivery for exchangeId:
> ID-localhost.localdomain/42721-1231625700365/0-2. On delivery attempt: 4
> caught: com.ibatis.common.jdbc.exception.NestedSQLException:
> --- The error occurred in com/yht/activemq/ibatis/resource/Event.xml.
> --- The error occurred while applying a parameter map.
> --- Check the agentPark-InlineParameterMap.
> --- Check the statement (update failed).
> --- Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:
> Communications link failure
>
> Last packet sent to the server was 4077 ms ago.
> com.ibatis.common.jdbc.exception.NestedSQLException:
> --- The error occurred in com/yht/activemq/ibatis/resource/Event.xml.
> --- The error occurred while applying a parameter map.
> --- Check the agentPark-InlineParameterMap.
> --- Check the statement (update failed).
> --- Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:
> Communications link failure
>
> Last packet sent to the server was 4077 ms ago.
> at
> com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeUpdate(MappedStatement.java:107)
> 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.impl.converter.AsyncProcessorTypeConverter$ProcessorToAsyncProcessorBridge.process(AsyncProcessorTypeConverter.java:43)
> at
> org.apache.camel.processor.SendProcessor.process(SendProcessor.java:75)
> at
> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:63)
> 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.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:322)
> at
> org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:260)
> at
> org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:944)
> at
> org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:875)
> at java.lang.Thread.run(Thread.java:619)
> Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:
> Communications link failure
>
> Last packet sent to the server was 4077 ms ago.
> at sun.reflect.GeneratedConstructorAccessor18.newInstance(Unknown
> Source)
> 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.send(MysqlIO.java:3246)
> at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1917)
> at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2060)
> at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2542)
> at
> com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1734)
> at
> com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:995)
> at
> com.ibatis.sqlmap.engine.execution.SqlExecutor.executeUpdate(SqlExecutor.java:80)
> at
> com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.sqlExecuteUpdate(MappedStatement.java:216)
> at
> com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeUpdate(MappedStatement.java:94)
> ... 24 more
> Caused by: java.net.SocketException: Broken pipe
> at java.net.SocketOutputStream.socketWrite0(Native Method)
> at
> java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
> at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
> at
> java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
> at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
> at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:3227)
> ... 32 more
> DEBUG DefaultExceptionPolicyStrategy - Finding best suited exception policy
> for thrown exception com.ibatis.common.jdbc.exception.NestedSQLException
> DEBUG DefaultExceptionPolicyStrategy - No candidate found to be used as
> exception policy
> DEBUG RedeliveryPolicy - Sleeping for: 1000 millis until
> attempting redelivery
> ERROR DeadLetterChannel - Failed delivery for exchangeId:
> ID-localhost.localdomain/42721-1231625700365/0-2. On delivery attempt: 5
> caught: com.ibatis.common.jdbc.exception.NestedSQLException:
> --- The error occurred in com/yht/activemq/ibatis/resource/Event.xml.
> --- The error occurred while applying a parameter map.
> --- Check the agentPark-InlineParameterMap.
> --- Check the statement (update failed).
> --- Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:
> Communications link failure
>
> Last packet sent to the server was 5083 ms ago.
> com.ibatis.common.jdbc.exception.NestedSQLException:
> --- The error occurred in com/yht/activemq/ibatis/resource/Event.xml.
> --- The error occurred while applying a parameter map.
> --- Check the agentPark-InlineParameterMap.
> --- Check the statement (update failed).
> --- Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:
> Communications link failure
>
> Last packet sent to the server was 5083 ms ago.
> at
> com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeUpdate(MappedStatement.java:107)
> 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.impl.converter.AsyncProcessorTypeConverter$ProcessorToAsyncProcessorBridge.process(AsyncProcessorTypeConverter.java:43)
> at
> org.apache.camel.processor.SendProcessor.process(SendProcessor.java:75)
> at
> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:63)
> 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.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:322)
> at
> org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:260)
> at
> org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:944)
> at
> org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:875)
> at java.lang.Thread.run(Thread.java:619)
> Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:
> Communications link failure
>
> Last packet sent to the server was 5083 ms ago.
> at sun.reflect.GeneratedConstructorAccessor18.newInstance(Unknown
> Source)
> 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.send(MysqlIO.java:3246)
> at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1917)
> at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2060)
> at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2542)
> at
> com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1734)
> at
> com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:995)
> at
> com.ibatis.sqlmap.engine.execution.SqlExecutor.executeUpdate(SqlExecutor.java:80)
> at
> com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.sqlExecuteUpdate(MappedStatement.java:216)
> at
> com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeUpdate(MappedStatement.java:94)
> ... 24 more
> Caused by: java.net.SocketException: Broken pipe
> at java.net.SocketOutputStream.socketWrite0(Native Method)
> at
> java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
> at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
> at
> java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
> at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
> at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:3227)
> ... 32 more
> DEBUG DefaultExceptionPolicyStrategy - Finding best suited exception policy
> for thrown exception com.ibatis.common.jdbc.exception.NestedSQLException
> DEBUG DefaultExceptionPolicyStrategy - No candidate found to be used as
> exception policy
> ERROR DeadLetterChannel -
> Exchange[BodyType:com.yht.activemq.ibatis.Event,
> Body:com.yht.activemq.ibatis.Event@61562]
> DEBUG DeadLetterChannel - This exchange is not handled so its
> marked as failed: Exchange[JmsMessage: ActiveMQTextMessage {commandId = 7,
> responseRequired = false, messageId =
> ID:localhost.localdomain-40407-1231625696940-4:0:-1:1:5, originalDestination
> = null, originalTransactionId = null, producerId =
> ID:localhost.localdomain-40407-1231625696940-4:0:-1:1, destination =
> topic://AgentLogin, transactionId = null, expiration = 0, timestamp =
> 1231625770024, arrival = 0, brokerInTime = 1231625770024, brokerOutTime =
> 1231625770024, 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 = 1024, properties = null, readOnlyProperties = true, readOnlyBody =
> true, droppable = false, text =
> <document><event><event-name>CUSTOM</event-na...ocument>
>
> }]
> ERROR DeadLetterChannel - Failed delivery for exchangeId:
> ID-localhost.localdomain/42721-1231625700365/0-2. Handled by the failure
> processor: RecipientList[log:org.apache.camel.DeadLetterChannel?level=error]
> DEBUG Pipeline - Message exchange has failed so
> breaking out of pipeline: Exchange[JmsMessage: ActiveMQTextMessage
> {commandId = 7, responseRequired = false, messageId =
> ID:localhost.localdomain-40407-1231625696940-4:0:-1:1:5, originalDestination
> = null, originalTransactionId = null, producerId =
> ID:localhost.localdomain-40407-1231625696940-4:0:-1:1, destination =
> topic://AgentLogin, transactionId = null, expiration = 0, timestamp =
> 1231625770024, arrival = 0, brokerInTime = 1231625770024, brokerOutTime =
> 1231625770024, 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 = 1024, properties = null, readOnlyProperties = true, readOnlyBody =
> true, droppable = false, text =
> <document><event><event-name>CUSTOM</event-na...ocument>
>
> }] exception: com.ibatis.common.jdbc.exception.NestedSQLException:
> --- The error occurred in com/yht/activemq/ibatis/resource/Event.xml.
> --- The error occurred while applying a parameter map.
> --- Check the agentPark-InlineParameterMap.
> --- Check the statement (update failed).
> --- Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:
> Communications link failure
>
> Last packet sent to the server was 5083 ms ago. fault: null
> WARN EndpointMessageListener - Endpoint[activemq:topic:AgentLogin]
> consumer caught an exception while processing JMS message:
> ActiveMQTextMessage {commandId = 7, responseRequired = false, messageId =
> ID:localhost.localdomain-40407-1231625696940-4:0:-1:1:5, originalDestination
> = null, originalTransactionId = null, producerId =
> ID:localhost.localdomain-40407-1231625696940-4:0:-1:1, destination =
> topic://AgentLogin, transactionId = null, expiration = 0, timestamp =
> 1231625770024, arrival = 0, brokerInTime = 1231625770024, brokerOutTime =
> 1231625770024, 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 = 1024, properties = null, readOnlyProperties = true, readOnlyBody =
> true, droppable = false, text =
> <document><event><event-name>CUSTOM</event-na...ocument>
>
> }
> org.apache.camel.RuntimeCamelException:
> com.ibatis.common.jdbc.exception.NestedSQLException:
> --- The error occurred in com/yht/activemq/ibatis/resource/Event.xml.
> --- The error occurred while applying a parameter map.
> --- Check the agentPark-InlineParameterMap.
> --- Check the statement (update failed).
> --- Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:
> Communications link failure
>
> Last packet sent to the server was 5083 ms ago.
> at
> org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:724)
> at
> org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:81)
> 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:322)
> at
> org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:260)
> at
> org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:944)
> at
> org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:875)
> at java.lang.Thread.run(Thread.java:619)
> Caused by: com.ibatis.common.jdbc.exception.NestedSQLException:
> --- The error occurred in com/yht/activemq/ibatis/resource/Event.xml.
> --- The error occurred while applying a parameter map.
> --- Check the agentPark-InlineParameterMap.
> --- Check the statement (update failed).
> --- Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:
> Communications link failure
>
>
>
> Here is my SqlMapConfig:
>
> <?xml version="1.0" encoding="UTF-8" ?>
>
> <!DOCTYPE sqlMapConfig
> PUBLIC "-//ibatis.apache.org//DTD SQL Map Config 2.0//EN"
> "http://ibatis.apache.org/dtd/sql-map-config-2.dtd">
>
> <sqlMapConfig>
>
> <transactionManager type="JDBC" commitRequired="false">
> <dataSource type="SIMPLE">
> <property name="JDBC.Driver" value="com.mysql.jdbc.Driver"/>
> <property name="JDBC.ConnectionURL" value="jdbc:mysql://
> 192.168.1.105/app"/>
> <property name="JDBC.Username" value="root"/>
> <property name="JDBC.Password" value="xxx"/>
> </dataSource>
> </transactionManager>
>
> <sqlMap resource="Event.xml"/>
>
>
> </sqlMapConfig>
>
>
> Here is my Event.xml
>
> <?xml version="1.0" encoding="UTF-8" ?>
>
> <!DOCTYPE sqlMap
> PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN"
> "http://ibatis.apache.org/dtd/sql-map-2.dtd">
>
> <sqlMap namespace="EventHandler">
>
> <typeAlias alias="Event" type="com.yht.activemq.ibatis.Event"/>
> <typeAlias alias="Caller" type="com.yht.activemq.ibatis.Caller"/>
>
>
> <resultMap id="nextCaller" class="Caller">
> <result property="ip" column="host" />
> <result property="uuid" column="uuid" />
> </resultMap>
>
> <!-- Insert example, using the Account parameter class -->
> <insert id="agentPark" parameterClass="Event">
> insert into agent_park_status (
>
> agent_id, uuid, host, time)
> Select agent_id, #uuid#,#host#, #time# from agent where sip_user =
> #agentUsername#
>
> </insert>
> <delete id="agentUnpark" parameterClass="Event">
> delete from agent_park_status where agent_id = (select agent_id from
> agent where sip_user = #agentUsername#)
>
> </delete>
> <insert id="agentLogin" parameterClass="Event">
> insert into agent_log ( agent_id,login_time, channel_uuid) select
> agent_id ,
> #time#,#uuid# from agent where sip_user = #agentUsername#
>
> </insert>
>
> <update id="agentLogout" parameterClass="Event">
> update agent_log set logout_time = #time# where agent_id = (select
> agent_id from agent where sip_user = #agentUsername#)
> </update>
>
>
>
>
> </sqlMap>
>
> Here is my routing
> <from uri="activemq:topic:AgentLogin"/>
> <process ref="eventProcessor"/>
> <to uri="ibatis:agentPark"/>
>
> </route>
>
>
> <route>
> <from uri="activemq:topic:AgentLogout"/>
> <process ref="eventProcessor"/>
>
> </route>
>
> <route>
>
--
/Claus Ibsen
Apache Camel Committer
Blog: http://davsclaus.blogspot.com/
Re: Problem with using ibatis
Posted by Woody Dickson <wo...@gmail.com>.
Hi,
I resolved this problem by using autoReconnect=true in my dburl, but now I
am getting another weird problem. When I send message to a specific topic,
and continue to send to that topic, there is no error. However, when I send
message to topic that requires ibatis ( AgentLogin in my case ) and then
send message to another topic that does not require ibatis ( AgentLogout in
my case ), and then send another message to AgentLogin, I get error. After
the error occurs, I continue to get error no matter which topic I send the
message to. Does anyone know why? I would appreciate any help and advice
on solving this problem.
Here is the error:
payload =
<document><event><event-name>CUSTOM</event-name><action-name>consumer_start</action-name><uuid>891a5e47-da70-4551-bfcd-35c088239620</uuid><host>192.168.1.101</host><time>2009-01-11
02:25:29</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>
ERROR DeadLetterChannel - Failed delivery for exchangeId:
ID-localhost.localdomain/42721-1231625700365/0-2. On delivery attempt: 0
caught: com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred in com/yht/activemq/ibatis/resource/Event.xml.
--- The error occurred while applying a parameter map.
--- Check the agentPark-InlineParameterMap.
--- Check the statement (update failed).
--- Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:
Communications link failure
Last packet sent to the server was 26 ms ago.
com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred in com/yht/activemq/ibatis/resource/Event.xml.
--- The error occurred while applying a parameter map.
--- Check the agentPark-InlineParameterMap.
--- Check the statement (update failed).
--- Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:
Communications link failure
Last packet sent to the server was 26 ms ago.
at
com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeUpdate(MappedStatement.java:107)
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.impl.converter.AsyncProcessorTypeConverter$ProcessorToAsyncProcessorBridge.process(AsyncProcessorTypeConverter.java:43)
at
org.apache.camel.processor.SendProcessor.process(SendProcessor.java:75)
at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:63)
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.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:322)
at
org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:260)
at
org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:944)
at
org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:875)
at java.lang.Thread.run(Thread.java:619)
Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:
Communications link failure
Last packet sent to the server was 26 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.send(MysqlIO.java:3246)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1917)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2060)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2542)
at
com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1734)
at
com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:995)
at
com.ibatis.sqlmap.engine.execution.SqlExecutor.executeUpdate(SqlExecutor.java:80)
at
com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.sqlExecuteUpdate(MappedStatement.java:216)
at
com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeUpdate(MappedStatement.java:94)
... 24 more
Caused by: java.net.SocketException: Broken pipe
at java.net.SocketOutputStream.socketWrite0(Native Method)
at
java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
at
java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:3227)
... 32 more
DEBUG DefaultExceptionPolicyStrategy - Finding best suited exception policy
for thrown exception com.ibatis.common.jdbc.exception.NestedSQLException
DEBUG DefaultExceptionPolicyStrategy - No candidate found to be used as
exception policy
DEBUG RedeliveryPolicy - Sleeping for: 1000 millis until
attempting redelivery
ERROR DeadLetterChannel - Failed delivery for exchangeId:
ID-localhost.localdomain/42721-1231625700365/0-2. On delivery attempt: 1
caught: com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred in com/yht/activemq/ibatis/resource/Event.xml.
--- The error occurred while applying a parameter map.
--- Check the agentPark-InlineParameterMap.
--- Check the statement (update failed).
--- Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:
Communications link failure
Last packet sent to the server was 1054 ms ago.
com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred in com/yht/activemq/ibatis/resource/Event.xml.
--- The error occurred while applying a parameter map.
--- Check the agentPark-InlineParameterMap.
--- Check the statement (update failed).
--- Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:
Communications link failure
Last packet sent to the server was 1054 ms ago.
at
com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeUpdate(MappedStatement.java:107)
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.impl.converter.AsyncProcessorTypeConverter$ProcessorToAsyncProcessorBridge.process(AsyncProcessorTypeConverter.java:43)
at
org.apache.camel.processor.SendProcessor.process(SendProcessor.java:75)
at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:63)
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.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:322)
at
org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:260)
at
org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:944)
at
org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:875)
at java.lang.Thread.run(Thread.java:619)
Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:
Communications link failure
Last packet sent to the server was 1054 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.send(MysqlIO.java:3246)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1917)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2060)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2542)
at
com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1734)
at
com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:995)
at
com.ibatis.sqlmap.engine.execution.SqlExecutor.executeUpdate(SqlExecutor.java:80)
at
com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.sqlExecuteUpdate(MappedStatement.java:216)
at
com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeUpdate(MappedStatement.java:94)
... 24 more
Caused by: java.net.SocketException: Broken pipe
at java.net.SocketOutputStream.socketWrite0(Native Method)
at
java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
at
java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:3227)
... 32 more
DEBUG DefaultExceptionPolicyStrategy - Finding best suited exception policy
for thrown exception com.ibatis.common.jdbc.exception.NestedSQLException
DEBUG DefaultExceptionPolicyStrategy - No candidate found to be used as
exception policy
DEBUG RedeliveryPolicy - Sleeping for: 1000 millis until
attempting redelivery
ERROR DeadLetterChannel - Failed delivery for exchangeId:
ID-localhost.localdomain/42721-1231625700365/0-2. On delivery attempt: 2
caught: com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred in com/yht/activemq/ibatis/resource/Event.xml.
--- The error occurred while applying a parameter map.
--- Check the agentPark-InlineParameterMap.
--- Check the statement (update failed).
--- Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:
Communications link failure
Last packet sent to the server was 2063 ms ago.
com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred in com/yht/activemq/ibatis/resource/Event.xml.
--- The error occurred while applying a parameter map.
--- Check the agentPark-InlineParameterMap.
--- Check the statement (update failed).
--- Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:
Communications link failure
Last packet sent to the server was 2063 ms ago.
at
com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeUpdate(MappedStatement.java:107)
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.impl.converter.AsyncProcessorTypeConverter$ProcessorToAsyncProcessorBridge.process(AsyncProcessorTypeConverter.java:43)
at
org.apache.camel.processor.SendProcessor.process(SendProcessor.java:75)
at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:63)
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.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:322)
at
org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:260)
at
org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:944)
at
org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:875)
at java.lang.Thread.run(Thread.java:619)
Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:
Communications link failure
Last packet sent to the server was 2063 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.send(MysqlIO.java:3246)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1917)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2060)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2542)
at
com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1734)
at
com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:995)
at
com.ibatis.sqlmap.engine.execution.SqlExecutor.executeUpdate(SqlExecutor.java:80)
at
com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.sqlExecuteUpdate(MappedStatement.java:216)
at
com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeUpdate(MappedStatement.java:94)
... 24 more
Caused by: java.net.SocketException: Broken pipe
at java.net.SocketOutputStream.socketWrite0(Native Method)
at
java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
at
java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:3227)
... 32 more
DEBUG DefaultExceptionPolicyStrategy - Finding best suited exception policy
for thrown exception com.ibatis.common.jdbc.exception.NestedSQLException
DEBUG DefaultExceptionPolicyStrategy - No candidate found to be used as
exception policy
DEBUG RedeliveryPolicy - Sleeping for: 1000 millis until
attempting redelivery
ERROR DeadLetterChannel - Failed delivery for exchangeId:
ID-localhost.localdomain/42721-1231625700365/0-2. On delivery attempt: 3
caught: com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred in com/yht/activemq/ibatis/resource/Event.xml.
--- The error occurred while applying a parameter map.
--- Check the agentPark-InlineParameterMap.
--- Check the statement (update failed).
--- Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:
Communications link failure
Last packet sent to the server was 3069 ms ago.
com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred in com/yht/activemq/ibatis/resource/Event.xml.
--- The error occurred while applying a parameter map.
--- Check the agentPark-InlineParameterMap.
--- Check the statement (update failed).
--- Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:
Communications link failure
Last packet sent to the server was 3069 ms ago.
at
com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeUpdate(MappedStatement.java:107)
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.impl.converter.AsyncProcessorTypeConverter$ProcessorToAsyncProcessorBridge.process(AsyncProcessorTypeConverter.java:43)
at
org.apache.camel.processor.SendProcessor.process(SendProcessor.java:75)
at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:63)
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.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:322)
at
org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:260)
at
org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:944)
at
org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:875)
at java.lang.Thread.run(Thread.java:619)
Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:
Communications link failure
Last packet sent to the server was 3069 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.send(MysqlIO.java:3246)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1917)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2060)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2542)
at
com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1734)
at
com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:995)
at
com.ibatis.sqlmap.engine.execution.SqlExecutor.executeUpdate(SqlExecutor.java:80)
at
com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.sqlExecuteUpdate(MappedStatement.java:216)
at
com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeUpdate(MappedStatement.java:94)
... 24 more
Caused by: java.net.SocketException: Broken pipe
at java.net.SocketOutputStream.socketWrite0(Native Method)
at
java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
at
java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:3227)
... 32 more
DEBUG DefaultExceptionPolicyStrategy - Finding best suited exception policy
for thrown exception com.ibatis.common.jdbc.exception.NestedSQLException
DEBUG DefaultExceptionPolicyStrategy - No candidate found to be used as
exception policy
DEBUG RedeliveryPolicy - Sleeping for: 1000 millis until
attempting redelivery
ERROR DeadLetterChannel - Failed delivery for exchangeId:
ID-localhost.localdomain/42721-1231625700365/0-2. On delivery attempt: 4
caught: com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred in com/yht/activemq/ibatis/resource/Event.xml.
--- The error occurred while applying a parameter map.
--- Check the agentPark-InlineParameterMap.
--- Check the statement (update failed).
--- Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:
Communications link failure
Last packet sent to the server was 4077 ms ago.
com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred in com/yht/activemq/ibatis/resource/Event.xml.
--- The error occurred while applying a parameter map.
--- Check the agentPark-InlineParameterMap.
--- Check the statement (update failed).
--- Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:
Communications link failure
Last packet sent to the server was 4077 ms ago.
at
com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeUpdate(MappedStatement.java:107)
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.impl.converter.AsyncProcessorTypeConverter$ProcessorToAsyncProcessorBridge.process(AsyncProcessorTypeConverter.java:43)
at
org.apache.camel.processor.SendProcessor.process(SendProcessor.java:75)
at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:63)
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.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:322)
at
org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:260)
at
org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:944)
at
org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:875)
at java.lang.Thread.run(Thread.java:619)
Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:
Communications link failure
Last packet sent to the server was 4077 ms ago.
at sun.reflect.GeneratedConstructorAccessor18.newInstance(Unknown
Source)
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.send(MysqlIO.java:3246)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1917)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2060)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2542)
at
com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1734)
at
com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:995)
at
com.ibatis.sqlmap.engine.execution.SqlExecutor.executeUpdate(SqlExecutor.java:80)
at
com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.sqlExecuteUpdate(MappedStatement.java:216)
at
com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeUpdate(MappedStatement.java:94)
... 24 more
Caused by: java.net.SocketException: Broken pipe
at java.net.SocketOutputStream.socketWrite0(Native Method)
at
java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
at
java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:3227)
... 32 more
DEBUG DefaultExceptionPolicyStrategy - Finding best suited exception policy
for thrown exception com.ibatis.common.jdbc.exception.NestedSQLException
DEBUG DefaultExceptionPolicyStrategy - No candidate found to be used as
exception policy
DEBUG RedeliveryPolicy - Sleeping for: 1000 millis until
attempting redelivery
ERROR DeadLetterChannel - Failed delivery for exchangeId:
ID-localhost.localdomain/42721-1231625700365/0-2. On delivery attempt: 5
caught: com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred in com/yht/activemq/ibatis/resource/Event.xml.
--- The error occurred while applying a parameter map.
--- Check the agentPark-InlineParameterMap.
--- Check the statement (update failed).
--- Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:
Communications link failure
Last packet sent to the server was 5083 ms ago.
com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred in com/yht/activemq/ibatis/resource/Event.xml.
--- The error occurred while applying a parameter map.
--- Check the agentPark-InlineParameterMap.
--- Check the statement (update failed).
--- Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:
Communications link failure
Last packet sent to the server was 5083 ms ago.
at
com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeUpdate(MappedStatement.java:107)
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.impl.converter.AsyncProcessorTypeConverter$ProcessorToAsyncProcessorBridge.process(AsyncProcessorTypeConverter.java:43)
at
org.apache.camel.processor.SendProcessor.process(SendProcessor.java:75)
at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:63)
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.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:322)
at
org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:260)
at
org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:944)
at
org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:875)
at java.lang.Thread.run(Thread.java:619)
Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:
Communications link failure
Last packet sent to the server was 5083 ms ago.
at sun.reflect.GeneratedConstructorAccessor18.newInstance(Unknown
Source)
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.send(MysqlIO.java:3246)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1917)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2060)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2542)
at
com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1734)
at
com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:995)
at
com.ibatis.sqlmap.engine.execution.SqlExecutor.executeUpdate(SqlExecutor.java:80)
at
com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.sqlExecuteUpdate(MappedStatement.java:216)
at
com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeUpdate(MappedStatement.java:94)
... 24 more
Caused by: java.net.SocketException: Broken pipe
at java.net.SocketOutputStream.socketWrite0(Native Method)
at
java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
at
java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:3227)
... 32 more
DEBUG DefaultExceptionPolicyStrategy - Finding best suited exception policy
for thrown exception com.ibatis.common.jdbc.exception.NestedSQLException
DEBUG DefaultExceptionPolicyStrategy - No candidate found to be used as
exception policy
ERROR DeadLetterChannel -
Exchange[BodyType:com.yht.activemq.ibatis.Event,
Body:com.yht.activemq.ibatis.Event@61562]
DEBUG DeadLetterChannel - This exchange is not handled so its
marked as failed: Exchange[JmsMessage: ActiveMQTextMessage {commandId = 7,
responseRequired = false, messageId =
ID:localhost.localdomain-40407-1231625696940-4:0:-1:1:5, originalDestination
= null, originalTransactionId = null, producerId =
ID:localhost.localdomain-40407-1231625696940-4:0:-1:1, destination =
topic://AgentLogin, transactionId = null, expiration = 0, timestamp =
1231625770024, arrival = 0, brokerInTime = 1231625770024, brokerOutTime =
1231625770024, 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 = 1024, properties = null, readOnlyProperties = true, readOnlyBody =
true, droppable = false, text =
<document><event><event-name>CUSTOM</event-na...ocument>
}]
ERROR DeadLetterChannel - Failed delivery for exchangeId:
ID-localhost.localdomain/42721-1231625700365/0-2. Handled by the failure
processor: RecipientList[log:org.apache.camel.DeadLetterChannel?level=error]
DEBUG Pipeline - Message exchange has failed so
breaking out of pipeline: Exchange[JmsMessage: ActiveMQTextMessage
{commandId = 7, responseRequired = false, messageId =
ID:localhost.localdomain-40407-1231625696940-4:0:-1:1:5, originalDestination
= null, originalTransactionId = null, producerId =
ID:localhost.localdomain-40407-1231625696940-4:0:-1:1, destination =
topic://AgentLogin, transactionId = null, expiration = 0, timestamp =
1231625770024, arrival = 0, brokerInTime = 1231625770024, brokerOutTime =
1231625770024, 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 = 1024, properties = null, readOnlyProperties = true, readOnlyBody =
true, droppable = false, text =
<document><event><event-name>CUSTOM</event-na...ocument>
}] exception: com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred in com/yht/activemq/ibatis/resource/Event.xml.
--- The error occurred while applying a parameter map.
--- Check the agentPark-InlineParameterMap.
--- Check the statement (update failed).
--- Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:
Communications link failure
Last packet sent to the server was 5083 ms ago. fault: null
WARN EndpointMessageListener - Endpoint[activemq:topic:AgentLogin]
consumer caught an exception while processing JMS message:
ActiveMQTextMessage {commandId = 7, responseRequired = false, messageId =
ID:localhost.localdomain-40407-1231625696940-4:0:-1:1:5, originalDestination
= null, originalTransactionId = null, producerId =
ID:localhost.localdomain-40407-1231625696940-4:0:-1:1, destination =
topic://AgentLogin, transactionId = null, expiration = 0, timestamp =
1231625770024, arrival = 0, brokerInTime = 1231625770024, brokerOutTime =
1231625770024, 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 = 1024, properties = null, readOnlyProperties = true, readOnlyBody =
true, droppable = false, text =
<document><event><event-name>CUSTOM</event-na...ocument>
}
org.apache.camel.RuntimeCamelException:
com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred in com/yht/activemq/ibatis/resource/Event.xml.
--- The error occurred while applying a parameter map.
--- Check the agentPark-InlineParameterMap.
--- Check the statement (update failed).
--- Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:
Communications link failure
Last packet sent to the server was 5083 ms ago.
at
org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:724)
at
org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:81)
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:322)
at
org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:260)
at
org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:944)
at
org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:875)
at java.lang.Thread.run(Thread.java:619)
Caused by: com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred in com/yht/activemq/ibatis/resource/Event.xml.
--- The error occurred while applying a parameter map.
--- Check the agentPark-InlineParameterMap.
--- Check the statement (update failed).
--- Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:
Communications link failure
Here is my SqlMapConfig:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE sqlMapConfig
PUBLIC "-//ibatis.apache.org//DTD SQL Map Config 2.0//EN"
"http://ibatis.apache.org/dtd/sql-map-config-2.dtd">
<sqlMapConfig>
<transactionManager type="JDBC" commitRequired="false">
<dataSource type="SIMPLE">
<property name="JDBC.Driver" value="com.mysql.jdbc.Driver"/>
<property name="JDBC.ConnectionURL" value="jdbc:mysql://
192.168.1.105/app"/>
<property name="JDBC.Username" value="root"/>
<property name="JDBC.Password" value="xxx"/>
</dataSource>
</transactionManager>
<sqlMap resource="Event.xml"/>
</sqlMapConfig>
Here is my Event.xml
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE sqlMap
PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN"
"http://ibatis.apache.org/dtd/sql-map-2.dtd">
<sqlMap namespace="EventHandler">
<typeAlias alias="Event" type="com.yht.activemq.ibatis.Event"/>
<typeAlias alias="Caller" type="com.yht.activemq.ibatis.Caller"/>
<resultMap id="nextCaller" class="Caller">
<result property="ip" column="host" />
<result property="uuid" column="uuid" />
</resultMap>
<!-- Insert example, using the Account parameter class -->
<insert id="agentPark" parameterClass="Event">
insert into agent_park_status (
agent_id, uuid, host, time)
Select agent_id, #uuid#,#host#, #time# from agent where sip_user =
#agentUsername#
</insert>
<delete id="agentUnpark" parameterClass="Event">
delete from agent_park_status where agent_id = (select agent_id from
agent where sip_user = #agentUsername#)
</delete>
<insert id="agentLogin" parameterClass="Event">
insert into agent_log ( agent_id,login_time, channel_uuid) select
agent_id ,
#time#,#uuid# from agent where sip_user = #agentUsername#
</insert>
<update id="agentLogout" parameterClass="Event">
update agent_log set logout_time = #time# where agent_id = (select
agent_id from agent where sip_user = #agentUsername#)
</update>
</sqlMap>
Here is my routing
<from uri="activemq:topic:AgentLogin"/>
<process ref="eventProcessor"/>
<to uri="ibatis:agentPark"/>
</route>
<route>
<from uri="activemq:topic:AgentLogout"/>
<process ref="eventProcessor"/>
</route>
<route>