0
votes

I am very new to mule and activemq. but am doing poc on mule activemq in my company. here my problem is i downloaded apache-activemq-5.13.3. and started and open admin gui of activemq also. so it is running. but when am doing simple example with queue sender and receiver in mule am getting error as noSuchmethod error. i added activemq-all-5.13.3.jar file in buildpath also. help me to solve this

here is my error log

ERROR 2016-05-26 12:19:05,786 [[queue_test].TCP.receiver.02] org.mule.exception.DefaultMessagingExceptionStrategy:


Message :

org.apache.activemq.ActiveMQMessageProducerSupport.getDestination()Ljavax/jms/Destination; (java.lang.NoSuchMethodError). Message payload is of type: ActiveMQBytesMessage Type : org.mule.api.MessagingException Code : MULE_ERROR--2 Payload : ActiveMQBytesMessage {commandId = 0, responseRequired = false, messageId = null, originalDestination = null, originalTransactionId = null, producerId = null, destination = null, transactionId = null, expiration = 0, timestamp = 0, arrival = 0, brokerInTime = 0, brokerOutTime = 0, correlationId = null, replyTo = null, persistent = false, type = null, priority = 0, groupID = null, groupSequence = 0, targetConsumerId = null, compressed = false, userID = null, content = null, marshalledProperties = null, dataStructure = null, redeliveryCounter = 0, size = 0, properties = {MULE_SESSION=rO0ABXNyACNvcmcubXVsZS5zZXNzaW9uLkRlZmF1bHRNdWxlU2Vzc2lvbi7rdtEW7GGKAwAFWgAFdmFsaWRMAA1mbG93Q29uc3RydWN0dAAmTG9yZy9tdWxlL2FwaS9jb25zdHJ1Y3QvRmxvd0NvbnN0cnVjdDtMAAJpZHQAEkxqYXZhL2xhbmcvU3RyaW5nO0wACnByb3BlcnRpZXN0AA9MamF2YS91dGlsL01hcDtMAA9zZWN1cml0eUNvbnRleHR0ACdMb3JnL211bGUvYXBpL3NlY3VyaXR5L1NlY3VyaXR5Q29udGV4dDt4cAFwdAAkZjA1MDI0ZjItMjMwZC0xMWU2LTlkOWUtZTY1ZTIwNTI0MTUzc3IAJWphdmEudXRpbC5Db2xsZWN0aW9ucyRTe... JavaDoc : http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/MessagingException.html


Exception stack is:

  1. org.apache.activemq.ActiveMQMessageProducerSupport.getDestination()Ljavax/jms/Destination; (java.lang.NoSuchMethodError) org.apache.activemq.ActiveMQMessageProducerSupport:269 (null)

  2. org.apache.activemq.ActiveMQMessageProducerSupport.getDestination()Ljavax/jms/Destination; (java.lang.NoSuchMethodError). Message payload is of type: ActiveMQBytesMessage (org.mule.api.MessagingException) org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor:32 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/MessagingException.html)


Root Exception stack trace:

java.lang.NoSuchMethodError: org.apache.activemq.ActiveMQMessageProducerSupport.getDestination()Ljavax/jms/Destination; at org.apache.activemq.ActiveMQMessageProducerSupport.send(ActiveMQMessageProducerSupport.java:269) at org.mule.transport.jms.Jms102bSupport.send(Jms102bSupport.java:266) at org.mule.transport.jms.JmsMessageDispatcher.dispatchMessage(JmsMessageDispatcher.java:185) at org.mule.transport.jms.JmsMessageDispatcher.doDispatch(JmsMessageDispatcher.java:77) at org.mule.transport.AbstractMessageDispatcher.process(AbstractMessageDispatcher.java:107

1
i found an answer by somewhere i read. i have added latest j2ee jar file in build path in mule anypoint studio.. i dont know how it works now.. can anyone explain, in which scenarios we will get this error..iam siva46
updated the answer for more clarificationAnupamBhusari

1 Answers

0
votes

It resolved the issue as you have updated the latest J2EE jar. This method getDestination() is defined in MessageProducer class of the javax.jms jar.

JMS jar before 1.1 don't have getDestination() method defined. Refer the source code for javax.jms 1.0 jar. Latest jar has this method defined.

package javax.jms;

public abstract interface MessageProducer
{
  public abstract void close()
    throws JMSException;

  public abstract int getDeliveryMode()
    throws JMSException;

  public abstract boolean getDisableMessageID()
    throws JMSException;

  public abstract boolean getDisableMessageTimestamp()
    throws JMSException;

  public abstract int getPriority()
    throws JMSException;

  public abstract long getTimeToLive()
    throws JMSException;

  public abstract void setDeliveryMode(int paramInt)
    throws JMSException;

  public abstract void setDisableMessageID(boolean paramBoolean)
    throws JMSException;

  public abstract void setDisableMessageTimestamp(boolean paramBoolean)
    throws JMSException;

  public abstract void setPriority(int paramInt)
    throws JMSException;

  public abstract void setTimeToLive(long paramLong)
    throws JMSException;
}

Hope this helps.