-
1. Re: Caused by: java.lang.ClassCastException: org.hornetq.jms.client.HornetQQueue cannot be cast to javax.jms.Queue
clebert.suconic May 24, 2011 1:26 PM (in response to tbossini)org.hornetq.jms.client.HornetQQueue clearly implements javax.jms.Queue.
If you're having classCastExceptions it means you have a mess with JARs, maybe having an additional jar with jms the jms api.
Try looking at your deployment package. Maybe you have included extra stuff you don't need.
-
2. Re: Caused by: java.lang.ClassCastException: org.hornetq.jms.client.HornetQQueue cannot be cast to javax.jms.Queue
tbossini May 25, 2011 4:22 AM (in response to clebert.suconic)That was the problem, I had overloaded my classpath.
Thanks a lot!
-
3. Re: Caused by: java.lang.ClassCastException: org.hornetq.jms.client.HornetQQueue cannot be cast to javax.jms.Queue
murthy516 Oct 29, 2012 5:34 AM (in response to clebert.suconic)Hi Clebert/TBossini,
I'm facing the same problem now.Can you please suggest me what the Overloading of classpath really means?How to do that.
Thanks
Krishna
-
4. Re: Caused by: java.lang.ClassCastException: org.hornetq.jms.client.HornetQQueue cannot be cast to javax.jms.Queue
tbossini Oct 29, 2012 9:55 AM (in response to murthy516)Hi Krishna,
As I told in my previous mail, it was a problem with the classpath. I have added two jar libraries with the same class and then java fails to load any class.
Let me know if this help you.
Thanks
-
5. Re: Caused by: java.lang.ClassCastException: org.hornetq.jms.client.HornetQQueue cannot be cast to javax.jms.Queue
codeturner Oct 8, 2014 1:50 PM (in response to tbossini)Since this is the first response in Google to this problem, I thought I'd share another scenario in which you'd get this error.
I was attempting enable EclipseLink cache coordination via hornetq, which explicitly expects a topic to be created. However, I had accidentally specified it as a "jms-queue" in my configuration file. Changing it to "jms-topic" did the trick.