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.
That was the problem, I had overloaded my classpath.
Thanks a lot!
I'm facing the same problem now.Can you please suggest me what the Overloading of classpath really means?How to do that.
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.
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.