小编San*_*aju的帖子

无法刷新目标“queue://inventorydsDestination”的 JMS 连接 - 将在 5000 毫秒后重试。原因:AOP配置好像无效

当我在 Tomcat 管理器中重新部署应用程序战争时,出现以下异常。例如,在第一次部署时,它可以正确连接到外部 ActiveMQ,但是当我在 Tomcat 管理器中停止/启动战争时,会重复抛出以下错误。此后,JMS 不会连接到 ActiveMQ,但出现以下异常:

[2015-09-13T04:03:33.689] | [ERROR] | [inventorydsRequestListenerContainer-1] | [Could not refresh JMS Connection for destination 'queue://inventorydsDestination' - retrying in 5000 ms. Cause: AOP configuration seems to be invalid: tried calling method [public abstract javax.jms.Connection javax.jms.ConnectionFactory.createConnection() throws javax.jms.JMSException] on target [org.springframework.jms.connection.UserCredentialsConnectionFactoryAdapter@168d95c7]; nested exception is java.lang.IllegalArgumentException: java.lang.ClassCastException@2fb6f3c3]
Run Code Online (Sandbox Code Playgroud)

applicationContext-Jms.xml

<bean id="jmsJndiConnectionFactory" class="org.springframework.jndi.JndiObjectFactoryBean">
   <property name="jndiName" value="${inventory.mq.name}"/>
   <property name="lookupOnStartup" value="false"/>
   <property name="cache" value="true" />
   <property name="proxyInterface"  value="javax.jms.QueueConnectionFactory" />
</bean>

<bean id="jmsConnectionFactory" class="org.springframework.jms.connection.CachingConnectionFactory">
    <property name="targetConnectionFactory" ref="jmsJndiConnectionFactory" />
    <property name="sessionCacheSize" value="10" …
Run Code Online (Sandbox Code Playgroud)

activemq-classic spring-jms tomcat8

5
推荐指数
1
解决办法
4万
查看次数

标签 统计

activemq-classic ×1

spring-jms ×1

tomcat8 ×1