我正在尝试将JMS服务器(OpenJMS)配置到Spring应用程序中,当我使用"jms/<>“符号引用资源时,我得到了一个”名称“未绑定的异常。
有什么线索没有了吗?
javax.naming.NameNotFoundException: Name jms is not bound in this Context
at org.apache.naming.NamingContext.lookup(NamingContext.java:768)
at org.apache.naming.NamingContext.lookup(NamingContext.java:138)
at org.apache.naming.NamingContext.lookup(NamingContext.java:779)
at org.apache.naming.NamingContext.lookup(NamingContext.java:138)bean的定义如下:
<bean id="connectionFactory" class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="jndiTemplate" ref="jmsProvider"/>
<property name="jndiName" value="jms/RefreshTopic_CF"/>
<property name="resourceRef" value="true" />
</bean>我在class path中有JMS lib,而且openjms服务器正在运行。
发布于 2009-09-30 13:22:33
在web.xml中,我们不能将其引用为接口(javax.jms.Topic),我们必须使用确切的类。这是OpenJMS的问题,而不是Websphere的问题。
不允许使用:
<resource-ref id="ResourceRef_125180">
<description>Topic</description>
<res-ref-name>jms/MyTopic</res-ref-name>
<res-type>javax.jms.Topic</res-type>
<res-auth>Container</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>允许的:
<resource-ref id="ResourceRef_125180">
<description>Topic</description>
<res-ref-name>jms/MyTopic</res-ref-name>
<res-type>org.exolab.jms.client.JmsTopic</res-type>
<res-auth>Container</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>发布于 2009-08-18 13:13:38
看起来你要么
发布于 2017-04-05 23:28:27
在我的例子中,我必须将资源,即jms/XXX从tomcat的server.xml移到context.xml,然后重新启动tomcat就可以了。
https://stackoverflow.com/questions/1293453
复制相似问题