activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zr <zra...@hotmail.com>
Subject Re: Problem with mysql
Date Thu, 07 Dec 2006 18:41:00 GMT

In addition to my previous message:
I changed the following setting:
    <jdbcPersistenceAdapter dataSource="#derby-ds"/>	

   and used this data source 

  <bean id="derby-ds" class="org.apache.derby.jdbc.EmbeddedDataSource">
    <property name="databaseName" value="derbydb"/>
    <property name="createDatabase" value="create"/>
  </bean>

and everything worked fine.

It seems that I am missing some settings related to MySQL.




zr wrote:
> 
> Hi,
> 
> 1.
>    I get this message when try to send large message to a queue. Text is
> Base64 text.
>    When I say large I do not mean enormous. It is 59KB files stored as
> Base64 string.
>     Similar exception was thrown in ActiveMQ version 4.0.1.
> 2.
>   How can I set the limit of the message size?
> Thanx
> zr
> 
> here are some settings:
> 
>     <persistenceAdapter>
>       <!--   <journaledJDBC journalLogFiles="5"
> dataDirectory="${activemq.base}/activemq-data"/> -->
>       <!-- To use a different datasource, use the following syntax : -->
>       <!-- 
>       <journaledJDBC journalLogFiles="5" dataDirectory="../activemq-data"
> dataSource="#postgres-ds"/>
>        -->
>       <jdbcPersistenceAdapter dataSource="#mylocalhost-ds"/>			
>     </persistenceAdapter>
> 
> 
> 	<bean id="mylocalhost-ds" class="org.apache.commons.dbcp.BasicDataSource"
> destroy-method="close">
> 		<property name="driverClassName" value="com.mysql.jdbc.Driver"/>
> 		<property name="url"
> value="jdbc:mysql://localhost/activemq?relaxAutoCommit=true"/>
> 		<property name="username" value="root"/>
> 		<property name="password" value="rootpassword"/>
> 		<property name="poolPreparedStatements" value="true"/>
> 	</bean> 
> 
> 
> 
> 
> javax.jms.JMSException: Data truncation: Data too long for column 'MSG' at
> row 1
>         at
> org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:46)
>         at
> org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1177)
>         at
> org.apache.activemq.ActiveMQSession.send(ActiveMQSession.java:1548)
>         at
> org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:465)
>         at
> org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:356)
>         at
> com.immicom.mq.send.ZrActiveMQSender.sendMessage(ZrActiveMQSender.java:61)
>         at com.zr.articles.UploadArticles.doPost(UploadArticles.java:292)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>         at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
>         at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
>         at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
>         at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
>         at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>         at
> org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
>         at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
>         at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
>         at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>         at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
>         at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
>         at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
>         at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
>         at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>         at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>         at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
>         at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>         at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
>         at
> org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
>         at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
>         at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
>         at
> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
>         at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
>         at java.lang.Thread.run(Thread.java:595)
> Caused by: java.io.IOException: Data truncation: Data too long for column
> 'MSG' at row 1
>         at
> org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:43)
>         at
> org.apache.activemq.store.jdbc.TransactionContext.close(TransactionContext.java:128)
>         at
> org.apache.activemq.store.jdbc.JDBCMessageStore.addMessage(JDBCMessageStore.java:75)
>         at
> org.apache.activemq.store.memory.MemoryTransactionStore.addMessage(MemoryTransactionStore.java:224)
>         at
> org.apache.activemq.store.memory.MemoryTransactionStore$1.addMessage(MemoryTransactionStore.java:117)
>         at org.apache.activemq.broker.region.Queue.send(Queue.java:285)
>         at
> org.apache.activemq.broker.region.AbstractRegion.send(AbstractRegion.java:292)
>         at
> org.apache.activemq.broker.region.RegionBroker.send(RegionBroker.java:377)
>         at
> org.apache.activemq.broker.TransactionBroker.send(TransactionBroker.java:193)
>         at
> org.apache.activemq.broker.BrokerFilter.send(BrokerFilter.java:126)
>         at
> org.apache.activemq.broker.CompositeDestinationBroker.send(CompositeDestinationBroker.java:98)
>         at
> org.apache.activemq.broker.MutableBrokerFilter.send(MutableBrokerFilter.java:136)
>         at
> org.apache.activemq.broker.TransportConnection.processMessage(TransportConnection.java:480)
>         at
> org.apache.activemq.command.ActiveMQMessage.visit(ActiveMQMessage.java:604)
>         at
> org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:284)
>         at
> org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:177)
>         at
> org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:65)
>         at
> org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:133)
>         at
> org.apache.activemq.transport.InactivityMonitor.onCommand(InactivityMonitor.java:122)
>         at
> org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:84)
>         at
> org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:137)
>         ... 1 more
> Caused by: java.lang.Throwable: java.sql.BatchUpdateException: Data
> truncation: Data too long for column 'MSG' at row 1
>         at
> com.mysql.jdbc.ServerPreparedStatement.executeBatch(ServerPreparedStatement.java:665)
>         at
> org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:205)
>         at
> org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:205)
>         at
> org.apache.activemq.store.jdbc.TransactionContext.executeBatch(TransactionContext.java:96)
>         at
> org.apache.activemq.store.jdbc.TransactionContext.executeBatch(TransactionContext.java:75)
>         at
> org.apache.activemq.store.jdbc.TransactionContext.close(TransactionContext.java:119)
>         ... 20 more
> org.apache.activemq.ConnectionFailedException: The JMS connection has
> failed: Connection reset
>         at
> org.apache.activemq.ActiveMQConnection.checkClosedOrFailed(ActiveMQConnection.java:1230)
>         at
> org.apache.activemq.ActiveMQConnection.createSession(ActiveMQConnection.java:273)
>         at
> org.apache.activemq.ActiveMQConnection.createQueueSession(ActiveMQConnection.java:1121)
>         at
> com.immicom.mq.send.ZrActiveMQSender.sendMessage(ZrActiveMQSender.java:57)
>         at com.zr.articles.UploadArticles.doPost(UploadArticles.java:292)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>         at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
>         at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
>         at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
>         at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
>         at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>         at
> org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
>         at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
>         at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
>         at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>         at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
>         at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
>         at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
>         at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
>         at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>         at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>         at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
>         at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>         at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
>         at
> org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
>         at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
>         at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
>         at
> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
>         at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
>         at java.lang.Thread.run(Thread.java:595)
> Caused by: java.net.SocketException: Connection reset
>         at java.net.SocketInputStream.read(SocketInputStream.java:168)
>         at
> org.apache.activemq.transport.tcp.TcpBufferedInputStream.fill(TcpBufferedInputStream.java:49)
>         at
> org.apache.activemq.transport.tcp.TcpBufferedInputStream.read(TcpBufferedInputStream.java:56)
>         at java.io.DataInputStream.readInt(DataInputStream.java:353)
>         at
> org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:267)
>         at
> org.apache.activemq.transport.tcp.TcpTransport.readCommand(TcpTransport.java:156)
>         at
> org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:136)
>         ... 1 more
> 
> 

-- 
View this message in context: http://www.nabble.com/Problem-with-mysql-tf2774968.html#a7745070
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message