java.lang.NoSuchMethodException org.activemq.ra.ActiveMQResourceAdapter.setUseEmbeddedBroker

 常见问题解答 > 错误 > 异常 > java.lang.NoSuchMethodException org.activemq.ra.ActiveMQResourceAdapter.setUseEmbeddedBroker

如果您遇到类似的错误

2005-08-14 17:18:45,618 ERROR [org.jboss.resource.deployment.RARDeployment] Starting failed jboss.jca:service=RARDeployment,name='activemq-ra-3.0.rar' org.jboss.deployment.DeploymentException: Error for resource adapter class org.activemq.ra.ActiveMQResourceAdapter accessing property setter ConfigPropertyMetaData@e62121[name=UseEmbeddedBroker type=java.lang.Boolean value=false descriptions=[DescriptionMetaData@1ad093c[language=en description=Boolean to configure if the connector should create an embedded broker.]]]; - nested throwable: (java.lang.NoSuchMethodException: org.activemq.ra.ActiveMQResourceAdapter.setUseEmbeddedBroker(java.lang.Boolean))
        at org.jboss.deployment.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:39)
        at org.jboss.resource.deployment.ResourceAdapterFactory.createResourceAdapter(ResourceAdapterFactory.java:90)
        at org.jboss.resource.deployment.RARDeployment.startService(RARDeployment.java:101)
        at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:272)
        at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:222)
        at org.jboss.system.ServiceDynamicMBeanSupport.invoke(ServiceDynamicMBeanSupport.java:110)
        at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:150)
        at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
        at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:897)

解决方法

您正在使用 ActiveMQ Classic 的 3.0 版本。此错误在 3.1.x 版本中已修复,因此请使用 3.1-M6 或更高版本。

Apache、ActiveMQ、Apache ActiveMQ、Apache 羽毛标志和 Apache ActiveMQ 项目标志是 Apache 软件基金会的商标。版权所有 © 2024,Apache 软件基金会。根据 Apache 许可证 2.0 许可。