开发者

Does anyone know exactly what javax.jms.InvalidDestinationException: Not allowed to create destination means?

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="JndiTem开发者_StackOverflow社区plate" 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?


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)

(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.


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:

  1. Start TIBCO EMS Server.

  2. Login to TIBCO EMS Administrator Tool using admin user.

  3. Once connected then run below command to check available topics.

    show topics

  4. You can see that there is no topic available with the name '>'

  5. Create one topic with below command.

    create topic >

  6. 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


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.


Look for the queues.conf file in ems folder under tibco and enable dynamic queue creation using '>'. This solved the error for me.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜