Service Virtualization

Expand all | Collapse all

JMS Send Receive Step Error

Jump to Best Answer
  • 1.  JMS Send Receive Step Error

    Posted 04-05-2016 02:08 PM

    I'm trying to create a TestCase where I can send/receive messages to/from an Apache ActiveMQ queue.  (wanting to make sure my assets are good before trying to record)

     

    I've setup all of my assets (JNDI Initial Context, Connection Factory, Destination, Session, Consumer, Producer) and verified the assets function.

     

    I've configured my JMS Send Receive step as ::

    JMS_SendReceive_Error.png

     

    Whenever I click the "green" arrow to execute the step, I get the following output and error ::

    Executing step
    Autopopulated JMS Producer with MyProducer (JMS Message Producer)
    Autopopulated JMS Producer.JMS Session with MySession (JMS Session)
    Autopopulated JMS Producer.JMS Session.Connection with MyConnectionFactory (JMS Connection)
    Adjusting Runtime Scopes
    Autopopulated JMS Consumer with consumer:MyQueue@MyConnectionFactory (JMS Message Consumer)
    Adjusting Runtime Scopes
    Adjusting Runtime Scopes
    Opening JNDI context with URL: tcp://localhost:61616
    Performing JNDI lookup with name: ConnectionFactory
    Creating JMS Connection
    Starting JMS Connection
    Creating JMS Session
    Performing JNDI lookup with name: dynamicQueues/example.MyQueue
    Creating JMS Consumer on Queue example.MyQueue
    Creating JMS Producer
    Creating JMS Text Message
    Writing JMS Message Headers
    Writing JMS Message Properties
    Closing JMS Producer
    Closing JMS Consumer
    Closing JMS Session
    Stopping JMS Connection
    Closing JMS Connection
    Unexpected error: org/fusesource/hawtbuf/UTF8Buffer
    java.lang.NoClassDefFoundError: org/fusesource/hawtbuf/UTF8Buffer
      at org.apache.activemq.command.ActiveMQMessage.setObjectProperty(ActiveMQMessage.java:500)
      at org.apache.activemq.command.ActiveMQMessage.setObjectProperty(ActiveMQMessage.java:488)
      at org.apache.activemq.command.ActiveMQMessage.setStringProperty(ActiveMQMessage.java:735)
      at com.itko.lisa.messaging.asset.payload.AbstractJmsMessagePayload.setHeadersAndProperties(AbstractJmsMessagePayload.java:494)
      at com.itko.lisa.messaging.asset.payload.AbstractJmsMessagePayload.createInstance(AbstractJmsMessagePayload.java:423)
      at com.itko.lisa.messaging.asset.payload.AbstractJmsMessagePayload.createInstance(AbstractJmsMessagePayload.java:67)
      at com.itko.lisa.messaging.jms.JmsSendOperation.doExecute(JmsSendOperation.java:197)
      at com.itko.lisa.messaging.jms.JmsSendOperation.doExecute(JmsSendOperation.java:68)
      at com.itko.lisa.asset.operation.AbstractRuntimeOperation.execute(AbstractRuntimeOperation.java:167)
      at com.itko.lisa.messaging.builder.AbstractSendReceiveOperation.doExecute(AbstractSendReceiveOperation.java:152)
      at com.itko.lisa.asset.operation.AbstractRuntimeOperation.execute(AbstractRuntimeOperation.java:167)
      at com.itko.lisa.asset.operation.AbstractOperationStep.execute(AbstractOperationStep.java:176)
      at com.itko.lisa.asset.operation.AbstractOperationStep.execute(AbstractOperationStep.java:125)
      at com.itko.lisa.asset.operation.AbstractOperationStepEditor$ExecuteTask.run(AbstractOperationStepEditor.java:575)
      at com.itko.lisa.asset.ui.ProgressLog$Worker.doInBackground(ProgressLog.java:116)
      at com.itko.lisa.asset.ui.ProgressLog$Worker.doInBackground(ProgressLog.java:98)
      at javax.swing.SwingWorker$1.call(Unknown Source)
      at java.util.concurrent.FutureTask.run(Unknown Source)
      at javax.swing.SwingWorker.run(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)
    

     

     

    Has anyone else ever seen this error before when trying to run the JMS Send Receive step against an ActiveMQ queue?



  • 2.  Re: JMS Send Receive Step Error

    Posted 04-05-2016 02:27 PM

    Unfortunately, activemq-client-5.8.0.jar does not actually include everything you need to connect and communicate with ActiveMQ.  You need another jar, it should be called something like 'hawtbuf-1.11.jar'.  Alternatively, you can replace 'activemq-client-5.8.0.jar' with 'activemq-all-5.8.0.jar', which *does* include everything. 



  • 3.  Re: JMS Send Receive Step Error
    Best Answer

    Posted 04-05-2016 02:29 PM

    I'm not sure, but there might be other jar requirements in addition to hawtbuf-1.11.jar.  You're better off just using activemq-all-5.8.0.jar.



  • 4.  Re: JMS Send Receive Step Error

    Posted 04-05-2016 02:32 PM

    You are awesome!
    I shutdown the Workstation, replaced activemq-client jar with the activemq-all jar and restarted the Workstation.  Now my test case works without any problems.

     

    Thanks a ton!