有谁确切知道javax.jms.InvalidDestinationException:不允许创建目标的意思是什么? [英] Does anyone know exactly what javax.jms.InvalidDestinationException: Not allowed to create destination means?
问题描述
当我收到此错误时,我尝试使用Spring连接到Tibco Ems主题.
I am try to connect to a Tibco Ems Topic using Spring when I recieve this error.
这是配置:
<jms:listener-container connection-factory="Tcf" acknowledge="auto" >
<jms:listener id="ListenerContainer" destination="######" ref="MessageListener" />
</jms:listener-container>
<bean id="MessageListener" class="com.dcc.jms.listeners.TestListener"></bean>
<!-- JNDI Template -->
<bean id="JndiTemplate" class="org.springframework.jndi.JndiTemplate">
<property name="environment">
<props>
<prop key="java.naming.provider.url">#</prop>
<prop key="java.naming.factory.url.pkgs">com.sun.jndi.ldap </prop>
<prop key="java.naming.factory.initial">com.sun.jndi.ldap.LdapCtxFactory</prop>
</props>
</property>
</bean>
<!-- CONNECTION FACTORY -->
<bean id="Tcf"
class="org.springframework.jms.connection.UserCredentialsConnectionFactoryAdapter">
<property name="username" value="" />
<property name="password" value="" />
<property name="targetConnectionFactory">
<bean class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="jndiTemplate" ref="JndiTemplate" />
<property name="jndiName" value="#" />
</bean>
</property>
</bean>
这到底是什么意思?我的详细信息或配置有误吗?
What exactly does this mean? Are my details or my config wrong?
推荐答案
JMS规范将其定义为
The JMS specification defines it as
当提供者不理解目的地或目的地不再有效时,必须引发此异常.
This exception must be thrown when a destination either is not understood by a provider or is no longer valid.
通常,这意味着目的地名称无效,例如传递给
Typically it means that the name of the Destination is invalid, e.g. the parameter passed to
Session.createQueue(String qName)
(或在JNDI中定义)不符合提供程序命名约定或不存在,有时可以出于其他原因使用它(例如,尝试使用已关闭的TemporaryQueue).我会仔细检查您的配置,以确保您指定了正确的名称,很可能是某个地方存在错误和/或您正在尝试的东西与EMS约定不符.
(edit: or defined in JNDI) does not meet provider naming conventions or does not exist, occasionally it can be used for other reasons (e.g. attempting to use a TemporaryQueue that has been closed off). I'd double-check your config to make sure you've specified the correct name, most likely there's an error in there somewhere and/or you're trying something that doesn't match EMS conventions.
这篇关于有谁确切知道javax.jms.InvalidDestinationException:不允许创建目标的意思是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!