activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nirav <nirav.n...@zensar.in>
Subject java.lang.NegativeArraySizeException @ ActiveMQ 5.3.2
Date Fri, 28 May 2010 09:08:19 GMT

Hi,

We are using ActiveMQ 5.3.2 in our project, Usage of multiple Queues and a
Topic is very high in our modules.

We have configured ActiveMQ to use MySQL as persistence store.

We are getting following error frequently,

java.lang.NegativeArraySizeException
        at
org.apache.activemq.openwire.v5.BaseDataStreamMarshaller.looseUnmarshalByteSequence(BaseDataStreamMarshaller.java:639)
        at
org.apache.activemq.openwire.v5.MessageMarshaller.looseUnmarshal(MessageMarshaller.java:229)
        at
org.apache.activemq.openwire.v5.ActiveMQMessageMarshaller.looseUnmarshal(ActiveMQMessageMarshaller.java:101)
        at
org.apache.activemq.openwire.v5.ActiveMQStreamMessageMarshaller.looseUnmarshal(ActiveMQStreamMessageMarshaller.java:101)
        at
org.apache.activemq.openwire.OpenWireFormat.doUnmarshal(OpenWireFormat.java:364)
        at
org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:204)
        at
org.apache.activemq.store.jdbc.JDBCMessageStore$2.recoverMessage(JDBCMessageStore.java:233)
        at
org.apache.activemq.store.jdbc.adapter.DefaultJDBCAdapter.doRecoverNextMessages(DefaultJDBCAdapter.java:777)
        at
org.apache.activemq.store.jdbc.JDBCMessageStore.recoverNextMessages(JDBCMessageStore.java:229)
        at
org.apache.activemq.store.ProxyMessageStore.recoverNextMessages(ProxyMessageStore.java:87)
        at
org.apache.activemq.broker.region.cursors.QueueStorePrefetch.doFillBatch(QueueStorePrefetch.java:97)
        at
org.apache.activemq.broker.region.cursors.AbstractStoreCursor.fillBatch(AbstractStoreCursor.java:251)
        at
org.apache.activemq.broker.region.cursors.AbstractStoreCursor.hasNext(AbstractStoreCursor.java:142)
        at
org.apache.activemq.broker.region.cursors.StoreQueueCursor.hasNext(StoreQueueCursor.java:131)
        at org.apache.activemq.broker.region.Queue.doPageIn(Queue.java:1447)
        at
org.apache.activemq.broker.region.Queue.pageInMessages(Queue.java:1585)
        at org.apache.activemq.broker.region.Queue.iterate(Queue.java:1219)
        at
org.apache.activemq.thread.DedicatedTaskRunner.runTask(DedicatedTaskRunner.java:98)
        at
org.apache.activemq.thread.DedicatedTaskRunner$1.run(DedicatedTaskRunner.java:36)

Below is our ActiveMQ configuration,

<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:amq="http://activemq.apache.org/schema/core"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://activemq.apache.org/schema/core
http://activemq.apache.org/schema/core/activemq-core.xsd">

<bean
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<value>file:${activemq.base}/conf/credentials.properties</value>
</property>      
</bean>

<broker xmlns="http://activemq.apache.org/schema/core"
brokerName="localhost" dataDirectory="${activemq.base}/data"
destroyApplicationContextOnStop="true">

<destinationPolicy>
<policyMap>
<policyEntries>
<policyEntry topic=">" producerFlowControl="false" memoryLimit="1mb">
<pendingSubscriberPolicy>
<vmCursor />
</pendingSubscriberPolicy>
</policyEntry>
<policyEntry queue=">" producerFlowControl="false" memoryLimit="1mb">
</policyEntry>
</policyEntries>
</policyMap>
</destinationPolicy> 

<managementContext>
<managementContext createConnector="false"/>
</managementContext>

<persistenceAdapter>
<jdbcPersistenceAdapter dataSource="#mysql-ds"/>
</persistenceAdapter>

<transportConnectors>
<transportConnector name="default" uri="tcp://0.0.0.0:61616"/>
</transportConnectors>

</broker>

<bean id="mysql-ds" class="org.apache.commons.dbcp.BasicDataSource"
destroy-method="close">
<property name="driverClassName" value="com.mysql.jdbc.Driver"/>
<property name="url"
value="jdbc:mysql://xyz/activemq?relaxAutoCommit=true"/>
<property name="username" value="xyz"/>
<property name="password" value="xyz"/>
<property name="maxActive" value="200"/>
<property name="poolPreparedStatements" value="true"/>
</bean>
<import resource="jetty.xml"/>
</beans>

This module is in development phase so all messages are produced and
consumed by same version of ActiveMQ.

Please help us in this issue.

Regards,
Nirav.
-- 
View this message in context: http://old.nabble.com/java.lang.NegativeArraySizeException-%40-ActiveMQ-5.3.2-tp28704472p28704472.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message