Not sure this is supported any more, also, if its not too late I would switch to activemq, which is.

On 10 November 2012 19:48, Michael O'Sullivan <> wrote:
Hi there,

I am using the latest release of openjms. In a small local program I am running to demonstrate queues, I am trying to create a durable topic subscriber programmatically to subscribe to a topic I am also creating programmatically.
However, whenever I call createDurableSubscriber(topic, "alastingsubscription") on my TopicSession object, I always get the following exception:

Unfortunately, an error occured :javax.jms.InvalidDestinationException: No destination with name=MobileComputing exists
javax.jms.InvalidDestinationException: No destination with name=MobileComputing exists
        at org.exolab.jms.messagemgr.ConsumerManagerImpl.getDestination(Consumer
        at org.exolab.jms.messagemgr.ConsumerManagerImpl.createInactiveDurableCo
        at org.exolab.jms.messagemgr.ConsumerManagerImpl.createDurableConsumer(C
        at org.exolab.jms.server.ServerSessionImpl.createDurableConsumer(ServerS
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)

        at org.exolab.jms.common.threads.ThreadPool$
        at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$ So
        at Source)

I have been trying different things for a while now with no luck. The strange thing is, if I create a non-durable topic subscriber, it works perfectly fine. I can also create a TopicPublisher programmatically for the programatically created topic with no problems. I could create the topic with the given name in the config file manually and do a context lookup, and then create a durable subscriber to it, and that does work perfectly. However, for the purposes of the demonstration, I want the users to be able to create topics programmatically on the fly.

I was looking through the source code for openjms using the above stack trace. The createInactiveDurablableSubscriber() method in calls the getDestination() method, also located in It passes a boolean argument of false, called "create" in the formal parameter list of getDestination(), to getDestination(). The javadoc for getDestination() says that "create" indicates if the destination should be created automatically or not if it does not already exist. This I believe leads to the exception being thrown. The createSubscriber() method in also calls getDestination(), but it passes a true boolean value instead, which leads to the destination being created in this case, which might explain why creating a non-durable subscriber above, actually works. So I am not sure how to approach this problem.

Any advice here would be very much appreciated.

Thanks very much,


Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
openjms-user mailing list