mule 收到错误消息,因为 activemq 的 noSuchmethod 错误.. 也在构建路径中添加了 activemq-all-5.13.3.jar 文件。帮我解决这个问题

mule am getting error as noSuchmethod error for activemq.. addedactivemq-all-5.13.3.jar file in buildpath also. help me to solve this

我对 mule 和 activemq 很陌生。但是我在我公司的 mule activemq 上做 poc。我的问题是我下载了 apache-activemq-5.13.3。并启动并打开 activemq 的管理 gui。所以它是 运行。但是当我在 mule 中使用队列发送者和接收者做简单的例子时,我得到了 noSuchmethod 错误。我还在构建路径中添加了 activemq-all-5.13.3.jar 文件。帮我解决这个问题

这是我的错误日志

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


消息:

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


异常堆栈为:

  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)


根异常堆栈跟踪:

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

由于您更新了最新的 J2EE jar,问题已解决。此方法 getDestination() 在 javax.jms jar 的 MessageProducer class 中定义。

1.1 之前的 JMS jar 没有定义 getDestination() 方法。请参阅 javax.jms 1.0 jar 的源代码。最新的 jar 已经定义了这个方法。

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;
}

希望对您有所帮助。