You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Hasnain Muhammad Iqbal <ka...@gmail.com> on 2007/11/14 16:11:03 UTC

ActiveMQ - IBM Performance Harness

Hi,

I am running IBM Performance Harness with ActiveMQ 4.1.1 and it is giving me
bad string error (Caused by: java.io.UTFDataFormatException: bad string)
when it is unmashalling the data on correlationId  ... the database is Derby
and i am using jdbcPersistance adapter for persistence. Can someone pls
telling why this is happening.

O.S = Ubuntu
version=4.1.1 (ActiveMQ)
IBM Performance Harness address:
http://www.alphaworks.ibm.com/tech/perfharness

*
The command that i ran for testing is:*

java -cp ./apache-activemq-4.1.1.jar:./perfharness.jar JMSPerfHarness -tc
jms.r11.PutGet -nt 1 -pp -tx -pc JNDI -ii
org.apache.activemq.jndi.ActiveMQInitialContextFactory -iu
tcp://localhost:61616 -cf ConnectionFactory -d dynamicQueues/myqueue -rl 20
-mu true -rt 100 -mf message.txt

*ActiveMQ configuration:*

<beans>

  <!-- Allows us to use system properties as variables in this configuration
file -->
  <bean class="
org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>

  <broker brokerName="localhost" useJmx="true" xmlns="
http://activemq.org/config/1.0">

    <!-- In ActiveMQ 4, you can setup destination policies -->
    <destinationPolicy>
      <policyMap><policyEntries>

          <policyEntry topic="FOO.>">
            <dispatchPolicy>
              <strictOrderDispatchPolicy />
            </dispatchPolicy>
            <subscriptionRecoveryPolicy>
              <lastImageSubscriptionRecoveryPolicy />
            </subscriptionRecoveryPolicy>
          </policyEntry>

      </policyEntries></policyMap>
    </destinationPolicy>


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

    <transportConnectors>
       <transportConnector name="openwire" uri="tcp://localhost:61616"
discoveryUri="multicast://default"/>
       <transportConnector name="ssl"     uri="ssl://localhost:61617"/>
       <transportConnector name="stomp"   uri="stomp://localhost:61613"/>
    </transportConnectors>

    <networkConnectors>
      <networkConnector name="default-nc" uri="multicast://default"/>
    </networkConnectors>

  </broker>
  <!-- Embedded Derby DataSource Sample Setup -->
  <bean id="derby-ds" class="org.apache.derby.jdbc.EmbeddedDataSource">
    <property name="databaseName" value="derbydb"/>
    <property name="createDatabase" value="create"/>
  </bean>

</beans>


*Error:*
java.lang.RuntimeException: java.io.IOException: Failed to broker message:
ID:StarDust-47427-1195051460634-1:0:1:1:1 in container:
java.io.UTFDataFormatException: bad string
        at
org.apache.activemq.broker.region.IndirectMessageReference.incrementReferenceCount
(IndirectMessageReference.java:103)
        at org.apache.activemq.filter.MessageEvaluationContext.getMessage(
MessageEvaluationContext.java:55)
        at org.apache.activemq.filter.MessageEvaluationContext.isDropped(
MessageEvaluationContext.java:48)
        at org.apache.activemq.filter.PropertyExpression.evaluate(
PropertyExpression.java:152)
        at org.apache.activemq.filter.ComparisonExpression$1.evaluate(
ComparisonExpression.java:197)
        at org.apache.activemq.filter.ComparisonExpression.matches(
ComparisonExpression.java:455)
        at org.apache.activemq.broker.region.AbstractSubscription.matches(
AbstractSubscription.java:92)
        at
org.apache.activemq.broker.region.policy.RoundRobinDispatchPolicy.dispatch(
RoundRobinDispatchPolicy.java:52)
        at org.apache.activemq.broker.region.Queue.dispatch(Queue.java:520)
        at org.apache.activemq.broker.region.Queue.access$600(Queue.java:75)
        at org.apache.activemq.broker.region.Queue$3.afterCommit(Queue.java
:341)
        at org.apache.activemq.transaction.Transaction.fireAfterCommit(
Transaction.java:83)
        at org.apache.activemq.transaction.LocalTransaction.commit(
LocalTransaction.java:71)
        at org.apache.activemq.broker.TransactionBroker.commitTransaction(
TransactionBroker.java:154)
        at org.apache.activemq.broker.BrokerFilter.commitTransaction(
BrokerFilter.java:94)
        at org.apache.activemq.broker.BrokerFilter.commitTransaction(
BrokerFilter.java:94)
        at org.apache.activemq.broker.MutableBrokerFilter.commitTransaction(
MutableBrokerFilter.java:104)
        at
org.apache.activemq.broker.TransportConnection.processCommitTransactionOnePhase
(TransportConnection.java:424)
        at org.apache.activemq.command.TransactionInfo.visit(
TransactionInfo.java:99)
        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:619)
Caused by: java.io.IOException: Failed to broker message:
ID:StarDust-47427-1195051460634-1:0:1:1:1 in container:
java.io.UTFDataFormatException: bad string
        at org.apache.activemq.util.IOExceptionSupport.create(
IOExceptionSupport.java:31)
        at org.apache.activemq.store.jdbc.JDBCMessageStore.getMessage(
JDBCMessageStore.java:107)
        at org.apache.activemq.store.ProxyMessageStore.getMessage(
ProxyMessageStore.java:48)
        at
org.apache.activemq.broker.region.IndirectMessageReference.incrementReferenceCount
(IndirectMessageReference.java:95)
        ... 26 more
Caused by: java.io.UTFDataFormatException: bad string
        at org.apache.activemq.util.DataByteArrayInputStream.readUTF(
DataByteArrayInputStream.java:277)
        at
org.apache.activemq.openwire.v2.BaseDataStreamMarshaller.looseUnmarshalString
(BaseDataStreamMarshaller.java:536)
        at org.apache.activemq.openwire.v2.MessageMarshaller.looseUnmarshal(
MessageMarshaller.java:201)
        at
org.apache.activemq.openwire.v2.ActiveMQMessageMarshaller.looseUnmarshal(
ActiveMQMessageMarshaller.java:101)
        at
org.apache.activemq.openwire.v2.ActiveMQTextMessageMarshaller.looseUnmarshal
(ActiveMQTextMessageMarshaller.java:101)
        at org.apache.activemq.openwire.OpenWireFormat.doUnmarshal(
OpenWireFormat.java:349)
        at org.apache.activemq.openwire.OpenWireFormat.unmarshal(
OpenWireFormat.java:204)
        at org.apache.activemq.store.jdbc.JDBCMessageStore.getMessage(
JDBCMessageStore.java:104)
        ... 28 more


-- 
Regards,
Hasnain M Iqbal
M.Sc Software Engineering in Distributed System
KTH - Royal Institute of Technology

For what shall it profit a man, if he shall gain the whole world, and lose
his own soul?

Re: ActiveMQ - IBM Performance Harness

Posted by yolcuabbas <me...@gmail.com>.
Hi,

if you create a JMS Message with CorrellationID ( byte [] x = new byte
[]{0,0,0} ), then you receive such exceptions. I dont know whether it is a
bug or a feature ...




Hasnain Muhammad Iqbal wrote:
> 
> Hi,
> 
> I am running IBM Performance Harness with ActiveMQ 4.1.1 and it is giving
> me
> bad string error (Caused by: java.io.UTFDataFormatException: bad string)
> when it is unmashalling the data on correlationId  ... the database is
> Derby
> and i am using jdbcPersistance adapter for persistence. Can someone pls
> telling why this is happening.
> 
> O.S = Ubuntu
> version=4.1.1 (ActiveMQ)
> IBM Performance Harness address:
> http://www.alphaworks.ibm.com/tech/perfharness
> 
> *
> The command that i ran for testing is:*
> 
> java -cp ./apache-activemq-4.1.1.jar:./perfharness.jar JMSPerfHarness -tc
> jms.r11.PutGet -nt 1 -pp -tx -pc JNDI -ii
> org.apache.activemq.jndi.ActiveMQInitialContextFactory -iu
> tcp://localhost:61616 -cf ConnectionFactory -d dynamicQueues/myqueue -rl
> 20
> -mu true -rt 100 -mf message.txt
> 
> *ActiveMQ configuration:*
> 
> <beans>
> 
>   <!-- Allows us to use system properties as variables in this
> configuration
> file -->
>   <bean class="
> org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
> 
>   <broker brokerName="localhost" useJmx="true" xmlns="
> http://activemq.org/config/1.0">
> 
>     <!-- In ActiveMQ 4, you can setup destination policies -->
>     <destinationPolicy>
>       <policyMap><policyEntries>
> 
>           <policyEntry topic="FOO.>">
>             <dispatchPolicy>
>               <strictOrderDispatchPolicy />
>             </dispatchPolicy>
>             <subscriptionRecoveryPolicy>
>               <lastImageSubscriptionRecoveryPolicy />
>             </subscriptionRecoveryPolicy>
>           </policyEntry>
> 
>       </policyEntries></policyMap>
>     </destinationPolicy>
> 
> 
>     <persistenceAdapter>
>       <jdbcPersistenceAdapter  dataSource="#derby-ds"/>
>     </persistenceAdapter>
> 
>     <transportConnectors>
>        <transportConnector name="openwire" uri="tcp://localhost:61616"
> discoveryUri="multicast://default"/>
>        <transportConnector name="ssl"     uri="ssl://localhost:61617"/>
>        <transportConnector name="stomp"   uri="stomp://localhost:61613"/>
>     </transportConnectors>
> 
>     <networkConnectors>
>       <networkConnector name="default-nc" uri="multicast://default"/>
>     </networkConnectors>
> 
>   </broker>
>   <!-- Embedded Derby DataSource Sample Setup -->
>   <bean id="derby-ds" class="org.apache.derby.jdbc.EmbeddedDataSource">
>     <property name="databaseName" value="derbydb"/>
>     <property name="createDatabase" value="create"/>
>   </bean>
> 
> </beans>
> 
> 
> *Error:*
> java.lang.RuntimeException: java.io.IOException: Failed to broker message:
> ID:StarDust-47427-1195051460634-1:0:1:1:1 in container:
> java.io.UTFDataFormatException: bad string
>         at
> org.apache.activemq.broker.region.IndirectMessageReference.incrementReferenceCount
> (IndirectMessageReference.java:103)
>         at org.apache.activemq.filter.MessageEvaluationContext.getMessage(
> MessageEvaluationContext.java:55)
>         at org.apache.activemq.filter.MessageEvaluationContext.isDropped(
> MessageEvaluationContext.java:48)
>         at org.apache.activemq.filter.PropertyExpression.evaluate(
> PropertyExpression.java:152)
>         at org.apache.activemq.filter.ComparisonExpression$1.evaluate(
> ComparisonExpression.java:197)
>         at org.apache.activemq.filter.ComparisonExpression.matches(
> ComparisonExpression.java:455)
>         at org.apache.activemq.broker.region.AbstractSubscription.matches(
> AbstractSubscription.java:92)
>         at
> org.apache.activemq.broker.region.policy.RoundRobinDispatchPolicy.dispatch(
> RoundRobinDispatchPolicy.java:52)
>         at
> org.apache.activemq.broker.region.Queue.dispatch(Queue.java:520)
>         at
> org.apache.activemq.broker.region.Queue.access$600(Queue.java:75)
>         at
> org.apache.activemq.broker.region.Queue$3.afterCommit(Queue.java
> :341)
>         at org.apache.activemq.transaction.Transaction.fireAfterCommit(
> Transaction.java:83)
>         at org.apache.activemq.transaction.LocalTransaction.commit(
> LocalTransaction.java:71)
>         at org.apache.activemq.broker.TransactionBroker.commitTransaction(
> TransactionBroker.java:154)
>         at org.apache.activemq.broker.BrokerFilter.commitTransaction(
> BrokerFilter.java:94)
>         at org.apache.activemq.broker.BrokerFilter.commitTransaction(
> BrokerFilter.java:94)
>         at
> org.apache.activemq.broker.MutableBrokerFilter.commitTransaction(
> MutableBrokerFilter.java:104)
>         at
> org.apache.activemq.broker.TransportConnection.processCommitTransactionOnePhase
> (TransportConnection.java:424)
>         at org.apache.activemq.command.TransactionInfo.visit(
> TransactionInfo.java:99)
>         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:619)
> Caused by: java.io.IOException: Failed to broker message:
> ID:StarDust-47427-1195051460634-1:0:1:1:1 in container:
> java.io.UTFDataFormatException: bad string
>         at org.apache.activemq.util.IOExceptionSupport.create(
> IOExceptionSupport.java:31)
>         at org.apache.activemq.store.jdbc.JDBCMessageStore.getMessage(
> JDBCMessageStore.java:107)
>         at org.apache.activemq.store.ProxyMessageStore.getMessage(
> ProxyMessageStore.java:48)
>         at
> org.apache.activemq.broker.region.IndirectMessageReference.incrementReferenceCount
> (IndirectMessageReference.java:95)
>         ... 26 more
> Caused by: java.io.UTFDataFormatException: bad string
>         at org.apache.activemq.util.DataByteArrayInputStream.readUTF(
> DataByteArrayInputStream.java:277)
>         at
> org.apache.activemq.openwire.v2.BaseDataStreamMarshaller.looseUnmarshalString
> (BaseDataStreamMarshaller.java:536)
>         at
> org.apache.activemq.openwire.v2.MessageMarshaller.looseUnmarshal(
> MessageMarshaller.java:201)
>         at
> org.apache.activemq.openwire.v2.ActiveMQMessageMarshaller.looseUnmarshal(
> ActiveMQMessageMarshaller.java:101)
>         at
> org.apache.activemq.openwire.v2.ActiveMQTextMessageMarshaller.looseUnmarshal
> (ActiveMQTextMessageMarshaller.java:101)
>         at org.apache.activemq.openwire.OpenWireFormat.doUnmarshal(
> OpenWireFormat.java:349)
>         at org.apache.activemq.openwire.OpenWireFormat.unmarshal(
> OpenWireFormat.java:204)
>         at org.apache.activemq.store.jdbc.JDBCMessageStore.getMessage(
> JDBCMessageStore.java:104)
>         ... 28 more
> 
> 
> -- 
> Regards,
> Hasnain M Iqbal
> M.Sc Software Engineering in Distributed System
> KTH - Royal Institute of Technology
> 
> For what shall it profit a man, if he shall gain the whole world, and lose
> his own soul?
> 
> 

-- 
View this message in context: http://www.nabble.com/ActiveMQ---IBM-Performance-Harness-tf4806005s2354.html#a13756227
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: ActiveMQ - IBM Performance Harness

Posted by James Strachan <ja...@gmail.com>.
On 16/11/2007, Hasnain Muhammad Iqbal <ka...@gmail.com> wrote:
> What do you currently use for benchmarking activemq on linux ?

http://activemq.apache.org/activemq-performance-module-users-manual.html

-- 
James
-------
http://macstrac.blogspot.com/

Open Source SOA
http://open.iona.com

Re: ActiveMQ - IBM Performance Harness

Posted by Hasnain Muhammad Iqbal <ka...@gmail.com>.
What do you currently use for benchmarking activemq on linux ?

Hasnain M Iqbal

On Nov 15, 2007 4:31 PM, Albert Strasheim <fu...@gmail.com> wrote:

> For what it's worth, this same problem also occurs with the latest
> ActiveMQ
> 5.0 from trunk.
>
> It might be a good idea to create a JIRA issue for this so that it might
> get
> fixed before 5.0 is released.
>
> Regards,
>
> Albert
>
> ----- Original Message -----
> From: "Hasnain Muhammad Iqbal" <ka...@gmail.com>
> To: <us...@activemq.apache.org>
> Sent: Wednesday, November 14, 2007 5:11 PM
> Subject: ActiveMQ - IBM Performance Harness
>
>
> > Hi,
> >
> > I am running IBM Performance Harness with ActiveMQ 4.1.1 and it is
> giving
> > me
> > bad string error (Caused by: java.io.UTFDataFormatException: bad string)
> > when it is unmashalling the data on correlationId  ... the database is
> > Derby
> > and i am using jdbcPersistance adapter for persistence. Can someone pls
> > telling why this is happening.
>
>


-- 
Regards,
Hasnain M Iqbal
M.Sc Software Engineering in Distributed System
KTH - Royal Institute of Technology

For what shall it profit a man, if he shall gain the whole world, and lose
his own soul?

Re: ActiveMQ - IBM Performance Harness

Posted by Albert Strasheim <fu...@gmail.com>.
For what it's worth, this same problem also occurs with the latest ActiveMQ 
5.0 from trunk.

It might be a good idea to create a JIRA issue for this so that it might get 
fixed before 5.0 is released.

Regards,

Albert

----- Original Message ----- 
From: "Hasnain Muhammad Iqbal" <ka...@gmail.com>
To: <us...@activemq.apache.org>
Sent: Wednesday, November 14, 2007 5:11 PM
Subject: ActiveMQ - IBM Performance Harness


> Hi,
>
> I am running IBM Performance Harness with ActiveMQ 4.1.1 and it is giving 
> me
> bad string error (Caused by: java.io.UTFDataFormatException: bad string)
> when it is unmashalling the data on correlationId  ... the database is 
> Derby
> and i am using jdbcPersistance adapter for persistence. Can someone pls
> telling why this is happening.