Re: InvalidDestinationException When Creating Durable Topic Subscriber
Greg Huber <[email protected]> Mon, 12 Nov 2012 13:32:49 +0000
| Newsgroups | gmane.comp.java.openjms.user |
|---|---|
| Message-ID | <CAJi=3dUsgTaakp7nihFKjE56LEYspos6fPx7bF-Rm9Dxhq6baQ@mail.gmail.com> |
--===============1203502111225598100== Content-Type: multipart/alternative; boundary=bcaec54ee1c06f57f404ce4c56ac --bcaec54ee1c06f57f404ce4c56ac Content-Type: text/plain; charset=ISO-8859-1 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 <[email protected]> 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 > ManagerImpl.java:756) > at > org.exolab.jms.messagemgr.ConsumerManagerImpl.createInactiveDurableCo > nsumer(ConsumerManagerImpl.java:571) > at > org.exolab.jms.messagemgr.ConsumerManagerImpl.createDurableConsumer(C > onsumerManagerImpl.java:345) > at > org.exolab.jms.server.ServerSessionImpl.createDurableConsumer(ServerS > essionImpl.java:343) > at > org.exolab.jms.server.net.RemoteServerSession.createDurableConsumer(R > emoteServerSession.java:245) > 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.net.orb.DefaultORB$Handler.invoke(DefaultORB.java:572) > > at org.exolab.jms.net.orb.DefaultORB$1.run(DefaultORB.java:530) > at > org.exolab.jms.common.threads.ThreadPool$NotifyingRunnable.run(Thread > Pool.java:211) > at > EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown So > urce) > at java.lang.Thread.run(Unknown 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 > ConsumerManagerImpl.java calls the getDestination() method, also located in > ConsumerManagerImpl.java. 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 ConsumerManagerImpl.java 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, > > Michael > > > > > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_d2d_nov > _______________________________________________ > openjms-user mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/openjms-user > --bcaec54ee1c06f57f404ce4c56ac Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Not sure this is supported any more, also, if its not too late I would swit= ch to activemq, which is. <br><br><div class=3D"gmail_quote">On 10 November= 2012 19:48, Michael O'Sullivan <span dir=3D"ltr"><<a href=3D"mailto= :[email protected]" target=3D"_blank">[email protected]</a>></span> wrote:= <br> <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p= x #ccc solid;padding-left:1ex">Hi there,<br> <br> I am using the latest release of openjms. In a small local program I am run= ning to demonstrate queues, I am trying to create a durable topic subscribe= r programmatically to subscribe to a topic I am also creating programmatica= lly.<br> However, whenever I call createDurableSubscriber(topic, "alastingsubsc= ription") on my TopicSession object, I always get the following except= ion:<br> <br> <br> Unfortunately, an error occured :javax.jms.InvalidDestinationException: No = destination with name=3DMobileComputing exists<br> javax.jms.InvalidDestinationException: No destination with name=3DMobileCom= puting exists<br> =A0 =A0 =A0 =A0 at org.exolab.jms.messagemgr.ConsumerManagerImpl.getDestina= tion(Consumer<br> ManagerImpl.java:756)<br> =A0 =A0 =A0 =A0 at org.exolab.jms.messagemgr.ConsumerManagerImpl.createInac= tiveDurableCo<br> nsumer(ConsumerManagerImpl.java:571)<br> =A0 =A0 =A0 =A0 at org.exolab.jms.messagemgr.ConsumerManagerImpl.createDura= bleConsumer(C<br> onsumerManagerImpl.java:345)<br> =A0 =A0 =A0 =A0 at org.exolab.jms.server.ServerSessionImpl.createDurableCon= sumer(ServerS<br> essionImpl.java:343)<br> =A0 =A0 =A0 =A0 at org.exolab.jms.server.net.RemoteServerSession.createDura= bleConsumer(R<br> emoteServerSession.java:245)<br> =A0 =A0 =A0 =A0 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Meth= od)<br> =A0 =A0 =A0 =A0 at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Sour= ce)<br> =A0 =A0 =A0 =A0 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown = Source)<br> =A0 =A0 =A0 =A0 at java.lang.reflect.Method.invoke(Unknown Source)<br> =A0 =A0 =A0 =A0 at org.exolab.jms.net.orb.DefaultORB$Handler.invoke(Default= ORB.java:572)<br> <br> =A0 =A0 =A0 =A0 at org.exolab.jms.net.orb.DefaultORB$1.run(DefaultORB.java:= 530)<br> =A0 =A0 =A0 =A0 at org.exolab.jms.common.threads.ThreadPool$NotifyingRunnab= le.run(Thread<br> Pool.java:211)<br> =A0 =A0 =A0 =A0 at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.r= un(Unknown So<br> urce)<br> =A0 =A0 =A0 =A0 at java.lang.Thread.run(Unknown Source)<br> <br> I have been trying different things for a while now with no luck. The stran= ge thing is, if I create a non-durable topic subscriber, it works perfectly= fine. I can also create a TopicPublisher programmatically for the programa= tically created topic with no problems. I could create the topic with the g= iven name in the config file manually and do a context lookup, and then cre= ate 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 to= pics programmatically on the fly.<br> <br> I was looking through the source code for openjms using the above stack tra= ce. The createInactiveDurablableSubscriber() method in ConsumerManagerImpl.= java calls the getDestination() method, also located in ConsumerManagerImpl= .java. It passes a boolean argument of false, called "create" in = the formal parameter list of getDestination(), to getDestination(). The jav= adoc for getDestination() says that "create" indicates if the des= tination should be created automatically or not if it does not already exis= t. This I believe leads to the exception being thrown. The createSubscriber= () method in ConsumerManagerImpl.java also calls getDestination(), but it p= asses a true boolean value instead, which leads to the destination being cr= eated in this case, which might explain why creating a non-durable subscrib= er above, actually works. So I am not sure how to approach this problem.<br= > <br> Any advice here would be very much appreciated.<br> <br> Thanks very much,<br> <br> Michael<br> <br> <br> <br> <br> ---------------------------------------------------------------------------= ---<br> Everyone hates slow websites. So do we.<br> Make your web apps faster with AppDynamics<br> Download AppDynamics Lite for free today:<br> <a href=3D"http://p.sf.net/sfu/appdyn_d2d_nov" target=3D"_blank">http://p.s= f.net/sfu/appdyn_d2d_nov</a><br> _______________________________________________<br> openjms-user mailing list<br> <a href=3D"mailto:[email protected]">[email protected]= urceforge.net</a><br> <a href=3D"https://lists.sourceforge.net/lists/listinfo/openjms-user" targe= t=3D"_blank">https://lists.sourceforge.net/lists/listinfo/openjms-user</a><= br> </blockquote></div><br> --bcaec54ee1c06f57f404ce4c56ac-- --===============1203502111225598100== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_nov --===============1203502111225598100== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ openjms-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openjms-user --===============1203502111225598100==--