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

23,985

Solution 1

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.

Solution 2

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

Solution 3

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.

Share:
23,985
Michael W
Author by

Michael W

Updated on August 08, 2020

Comments

  • Michael W
    Michael W almost 4 years

    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?

  • OldTinfoil
    OldTinfoil over 9 years
    Hi Panky! Thanks for posting an answer and helping make StackOverflow great. Just a quick way to improve the quality of your answer, could you give a quick preview of the relevant information in the link? There might come a day where that link 404s and then your answer becomes less useful.
  • Admin
    Admin over 9 years
    Hi Mike! Good Suggestion :)