有谁确切知道 javax.jms.InvalidDestinationException: 不允许创建目的地是什么意思?
当我收到此错误时,我尝试使用 Spring 连接到 Tibco Ems 主题。
这是配置:
<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>
这到底是什么意思?我的详细信息或配置是否错误?
I am try to connect to a Tibco Ems Topic using Spring when I recieve this error.
Here is the config:
<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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
JMS 规范将其定义为
通常,这意味着目标的名称无效,例如传递给
(编辑:或在 JNDI 中定义)的参数不符合提供者命名约定或不存在,偶尔它可以用于其他原因(例如尝试使用已关闭的临时队列)。我会仔细检查您的配置以确保您指定了正确的名称,很可能某个地方存在错误和/或您正在尝试与 EMS 约定不匹配的内容。
The JMS specification defines it as
Typically it means that the name of the Destination is invalid, e.g. the parameter passed to
(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.
我也在寻找解决方案,因为我面临着同样的问题。
我的 EMS 环境存在问题,并且我的 EMS 环境没有一个主题。
我搜索了很多答案,以下是我得到的步骤。
步骤如下:
启动 TIBCO EMS 服务器。
使用管理员用户登录 TIBCO EMS 管理员工具。
连接后,运行以下命令来检查可用主题。
显示主题
您可以看到没有名称为“>”的主题
使用以下命令创建一个主题。
创建主题 >
现在尝试使用您的代码连接动态主题,您应该能够连接到 EMS 环境并可以创建动态主题。
也许这也可以帮助你。
信息来源:
http://aajsearch.com/556/connecting -environment-allowed-destination-anyone-please?show=557#a557
I was also looking for the solution for this as I was facing same problem.
There were problem with my EMS environment and My EMS environment doesn't have one topic.
I searched for the answer a lot and below are the steps I got.
Below are the steps:
Start TIBCO EMS Server.
Login to TIBCO EMS Administrator Tool using admin user.
Once connected then run below command to check available topics.
show topics
You can see that there is no topic available with the name '>'
Create one topic with below command.
create topic >
Now Try to connect your dynamic topic using your code you should be able to connect to EMS Environment and can create dynamic topic.
May be this can help you too.
Source of the Information:
http://aajsearch.com/556/connecting-environment-allowed-destination-anyone-please?show=557#a557
您似乎引用了一个不存在的目的地。也就是说,名称错误。也许 JNDI 名称前缀错误?或者使用 JNDI 名称而不是 EMS 队列名称?或者反之亦然。抱歉,我已经有一段时间没有与 EMS 合作了。
It seems like you're referencing a Destination which doesn't exist. That is, a name error. Perhaps the wrong JNDI name prefix? Or using the JNDI name instead of the EMS Queue name? Or vice versa. Sorry, it's been a while since I worked with EMS.
在 tibco 下的 ems 文件夹中查找queues.conf 文件,并使用“>”启用动态队列创建。这为我解决了错误。
Look for the queues.conf file in ems folder under tibco and enable dynamic queue creation using '>'. This solved the error for me.