activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vineetc <vinicha...@gmail.com>
Subject Problems Recv. Messages on MDB
Date Mon, 09 Apr 2007 21:11:53 GMT

Hello, I am trying to use AMQ as a JMS provider and running into problems.
Need some help understanding the reason(s). 

My Env. is 
AMQ 4.1.1 
Geronimo 1.1.1 
Spring 1.2.8 
MySQL 5.0.24 

I have built an EAR with Spring EJB support classes for MDB and i persist
messages to MySQL DB. I am using AMQ RA and i have configured the broker
config with pretty much usual options. (Nothing fancy) Theres only one TCP
transport connector confugred with JournaledJDBC. I configure the Queue
using Activation Spec on EAR side of the application. I have also set the
following properties on ActivationSpec 
maxSessions = 1 
maxMessagesPerSession = 1 
enableBatch = false
 
NOTE: If i keep higher values of seesions and messages per session, the Perm
Gen runs out of memory. 
When i run my test, say for 3600 messages, the recv. side starts failing
after recv. some messages (about a 1000). 

Following is the stack trace i get. 
2007-04-09 13:00:20,671 [/127.0.0.1:1804] DEBUG Service - Error occured
while processing sync command: java.lang.IllegalArgumentException: Invalid
location: [B@fdda6c java.lang.IllegalArgumentException: Invalid location:
[B@fdda6c at
org.apache.activemq.store.journal.QuickJournalMessageStore.toRecordLocation(QuickJournalMessageStore.java:146)
at
org.apache.activemq.store.journal.QuickJournalMessageStore.getMessage(QuickJournalMessageStore.java:342)
at
org.apache.activemq.broker.region.IndirectMessageReference.incrementReferenceCount(IndirectMessageReference.java:95)
at
org.apache.activemq.broker.region.QueueSubscription.dispatch(QueueSubscription.java:170)
at
org.apache.activemq.broker.region.PrefetchSubscription.add(PrefetchSubscription.java:129)
at org.apache.activemq.broker.region.Queue.addSubscription(Queue.java:191)
at
org.apache.activemq.broker.region.AbstractRegion.addConsumer(AbstractRegion.java:233)
at
org.apache.activemq.broker.region.RegionBroker.addConsumer(RegionBroker.java:337)
at org.apache.activemq.broker.BrokerFilter.addConsumer(BrokerFilter.java:86)
at
org.apache.activemq.advisory.AdvisoryBroker.addConsumer(AdvisoryBroker.java:78)
at org.apache.activemq.broker.BrokerFilter.addConsumer(BrokerFilter.java:86)
at
org.apache.activemq.broker.MutableBrokerFilter.addConsumer(MutableBrokerFilter.java:96)
at
org.apache.activemq.broker.MutableBrokerFilter.addConsumer(MutableBrokerFilter.java:96)
at
org.apache.activemq.broker.TransportConnection.processAddConsumer(TransportConnection.java:586)
at org.apache.activemq.command.ConsumerInfo.visit(ConsumerInfo.java:313) at
org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:294)
at
org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:185)
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)
at java.lang.Thread.run(Thread.java:595) 2007-04-09 13:00:20,671
[orThreadPool 41] DEBUG ActiveMQEndpointWorker - Fail to to connect:
javax.jms.JMSException: Invalid location: [B@fdda6c javax.jms.JMSException:
Invalid location: [B@fdda6c at
org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:46)
at
org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1181)
at
org.apache.activemq.ActiveMQConnectionConsumer.(ActiveMQConnectionConsumer.java:86)
at
org.apache.activemq.ActiveMQConnection.createConnectionConsumer(ActiveMQConnection.java:1085)
at
org.apache.activemq.ra.ActiveMQEndpointWorker$1.run(ActiveMQEndpointWorker.java:164)
at
org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.java:291)
at org.apache.geronimo.pool.ThreadPool$1.run(ThreadPool.java:172) at
org.apache.geronimo.pool.ThreadPool$ContextClassLoaderRunnable.run(ThreadPool.java:289)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown
Source) at java.lang.Thread.run(Thread.java:595) Caused by:
java.lang.IllegalArgumentException: Invalid location: [B@fdda6c at
org.apache.activemq.store.journal.QuickJournalMessageStore.toRecordLocation(QuickJournalMessageStore.java:146)
at
org.apache.activemq.store.journal.QuickJournalMessageStore.getMessage(QuickJournalMessageStore.java:342)
at
org.apache.activemq.broker.region.IndirectMessageReference.incrementReferenceCount(IndirectMessageReference.java:95)
at
org.apache.activemq.broker.region.QueueSubscription.dispatch(QueueSubscription.java:170)
at
org.apache.activemq.broker.region.PrefetchSubscription.add(PrefetchSubscription.java:129)
at org.apache.activemq.broker.region.Queue.addSubscription(Queue.java:191)
at
org.apache.activemq.broker.region.AbstractRegion.addConsumer(AbstractRegion.java:233)
at
org.apache.activemq.broker.region.RegionBroker.addConsumer(RegionBroker.java:337)
at org.apache.activemq.broker.BrokerFilter.addConsumer(BrokerFilter.java:86)
at
org.apache.activemq.advisory.AdvisoryBroker.addConsumer(AdvisoryBroker.java:78)
at org.apache.activemq.broker.BrokerFilter.addConsumer(BrokerFilter.java:86)
at
org.apache.activemq.broker.MutableBrokerFilter.addConsumer(MutableBrokerFilter.java:96)
at
org.apache.activemq.broker.MutableBrokerFilter.addConsumer(MutableBrokerFilter.java:96)
at
org.apache.activemq.broker.TransportConnection.processAddConsumer(TransportConnection.java:586)
at org.apache.activemq.command.ConsumerInfo.visit(ConsumerInfo.java:313) at
org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:294)
at
org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:185)
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 

I have looked through the forum but without any luck. 
Can someone shed some light on what going haywire? 
I also observed that if i keep maxSessions and maxMessagesPerSession to
default values of 10 each, the Perm Gen space keeps going up and eventually
runs out. 
My hunch is that, spring creates and loads AppContext in the MDB for every
MDB instance that is created and destroyed and this is causing the behavior
but i am not sure yet. Any help is appreciated. 

Thanks, Vineet
-- 
View this message in context: http://www.nabble.com/Problems-Recv.-Messages-on-MDB-tf3549628s2354.html#a9909670
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message