activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lassiege <hugo.lassi...@sungard.com>
Subject Unable to send message randomly : Unknown data type: -1
Date Wed, 01 Jul 2009 17:15:53 GMT

Hi,
I currently try the version activemq 5.2.0
We use activemq 4.1.1 currently.

However with a basic test with a producer and a consumer I always have an
issue when I insert.

I tried the same test in activemq4 and it works. 

The test is quite basic:  


        MQProducer remoteProducer = new
MQProducer(bindAddress,destinationName);
        remoteProducer.start(true);
        
        /* Envoi de message sur Bus */
        for (int i=0 ; i


the method start : 


	public void start(boolean _topicMode) throws JMSException
	{
		createMQConnectionFactory();
		setConnection(getConnectionFactory().createConnection());
		setSession(getConnection().createSession(false,
Session.AUTO_ACKNOWLEDGE));
		if(_topicMode)
			setDestination(getSession().createTopic(getDestinationName()));
		else
			setDestination(getSession().createQueue(getDestinationName()));
		
		setMsgProducer(getSession().createProducer(getDestination()));
		getMsgProducer().setDeliveryMode(DeliveryMode.PERSISTENT);
		getConnection().start();
		
	}


the method send 

	public void send(String message) throws JMSException
	{
		TextMessage txtMsg = getSession().createTextMessage(message);
		getMsgProducer().send(txtMsg);
	}


the configuration of my brokers (in master slave)


        &gt;broker xmlns="http://activemq.org/config/1.0"
                        useJmx="true"
                        persistent="true"
                        dataDirectory="/home/myApp/data/activemq1"
                        deleteAllMessagesOnStartup="false"&lt;

                &gt;managementContext&lt;
                        &gt;managementContext findTigerMbeanServer="true"
jmxDomainName="org.apache.activemq1" /&lt;
                &gt;/managementContext&lt;

                &gt;persistenceAdapter&lt;
                        &gt;journaledJDBC journalLogFiles="5"
dataDirectory="/home/myApp/data/activemq1"
                                       dataSource="#wi-ds"
createTablesOnStartup="false"
                                       useDatabaseLock="true"/&lt;
                &gt;/persistenceAdapter&lt;

                &gt;transportConnectors&lt;
                        &gt;transportConnector name="openwire"
uri="tcp://fidji:30541"/&lt;
                        &gt;transportConnector name="stomp"
uri="stomp://fidji:30551" /&lt;
                &gt;/transportConnectors&lt;
        &gt;/broker&lt;



the trace : 

javax.jms.JMSException: java.lang.RuntimeException: java.io.IOException:
Unknown data type: -1
	at
org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:49)
	at
org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1244)
	at org.apache.activemq.ActiveMQSession.send(ActiveMQSession.java:1664)
	at
org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:227)
	at
org.apache.activemq.ActiveMQMessageProducerSupport.send(ActiveMQMessageProducerSupport.java:241)
	at fr.sgf.compliance.wis.test.MQProducer.send(MQProducer.java:136)
	at
fr.sgf.compliance.wis.test.perf.TestsPerf.testFillQueue(TestsPerf.java:188)
	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:585)
	at junit.framework.TestCase.runTest(TestCase.java:164)
	at junit.framework.TestCase.runBare(TestCase.java:130)
	at junit.framework.TestResult$1.protect(TestResult.java:106)
	at junit.framework.TestResult.runProtected(TestResult.java:124)
	at junit.framework.TestResult.run(TestResult.java:109)
	at junit.framework.TestCase.run(TestCase.java:120)
	at
org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
	at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: java.lang.RuntimeException: java.lang.RuntimeException:
java.io.IOException: Unknown data type: -1
	at
org.apache.activemq.broker.region.cursors.AbstractStoreCursor.reset(AbstractStoreCursor.java:103)
	at
org.apache.activemq.broker.region.cursors.StoreDurableSubscriberCursor.reset(StoreDurableSubscriberCursor.java:233)
	at
org.apache.activemq.broker.region.PrefetchSubscription.dispatchPending(PrefetchSubscription.java:566)
	at
org.apache.activemq.broker.region.PrefetchSubscription.add(PrefetchSubscription.java:150)
	at
org.apache.activemq.broker.region.DurableTopicSubscription.add(DurableTopicSubscription.java:197)
	at
org.apache.activemq.broker.region.policy.SimpleDispatchPolicy.dispatch(SimpleDispatchPolicy.java:49)
	at org.apache.activemq.broker.region.Topic.dispatch(Topic.java:580)
	at org.apache.activemq.broker.region.Topic.doMessageSend(Topic.java:427)
	at org.apache.activemq.broker.region.Topic.send(Topic.java:365)
	at
org.apache.activemq.broker.region.AbstractRegion.send(AbstractRegion.java:350)
	at
org.apache.activemq.broker.region.RegionBroker.send(RegionBroker.java:437)
	at
org.apache.activemq.broker.TransactionBroker.send(TransactionBroker.java:224)
	at org.apache.activemq.broker.BrokerFilter.send(BrokerFilter.java:126)
	at
org.apache.activemq.broker.CompositeDestinationBroker.send(CompositeDestinationBroker.java:95)
	at
org.apache.activemq.broker.MutableBrokerFilter.send(MutableBrokerFilter.java:133)
	at
org.apache.activemq.broker.TransportConnection.processMessage(TransportConnection.java:450)
	at
org.apache.activemq.command.ActiveMQMessage.visit(ActiveMQMessage.java:639)
	at
org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:305)
	at
org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:179)
	at
org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:68)
	at
org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:143)
	at
org.apache.activemq.transport.InactivityMonitor.onCommand(InactivityMonitor.java:206)
	at
org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:84)
	at
org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:203)
	at
org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:185)
	at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.RuntimeException: java.io.IOException: Unknown data
type: -1
	at
org.apache.activemq.broker.region.cursors.AbstractStoreCursor.fillBatch(AbstractStoreCursor.java:230)
	at
org.apache.activemq.broker.region.cursors.AbstractStoreCursor.reset(AbstractStoreCursor.java:100)
	... 25 more
Caused by: java.io.IOException: Unknown data type: -1
	at
org.apache.activemq.openwire.OpenWireFormat.doUnmarshal(OpenWireFormat.java:356)
	at
org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:204)
	at
org.apache.activemq.store.jdbc.JDBCTopicMessageStore$2.recoverMessage(JDBCTopicMessageStore.java:104)
	at
org.apache.activemq.store.jdbc.adapter.DefaultJDBCAdapter.doRecoverNextMessages(DefaultJDBCAdapter.java:411)
	at
org.apache.activemq.store.jdbc.JDBCTopicMessageStore.recoverNextMessages(JDBCTopicMessageStore.java:100)
	at
org.apache.activemq.store.journal.JournalTopicMessageStore.recoverNextMessages(JournalTopicMessageStore.java:65)
	at
org.apache.activemq.broker.region.cursors.TopicStorePrefetch.doFillBatch(TopicStorePrefetch.java:94)
	at
org.apache.activemq.broker.region.cursors.AbstractStoreCursor.fillBatch(AbstractStoreCursor.java:227)
	... 26 more



Does anybody have an idea about this problem ?
-- 
View this message in context: http://www.nabble.com/Unable-to-send-message-randomly-%3A-Unknown-data-type%3A--1-tp24293718p24293718.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

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