0

Im getting following Error with Wildfly 8. Any one help me

java.lang.ClassCastException: org.hornetq.jms.client.HornetQTopic cannot be cast to javax.jms.TopicConnectionFactory at jms.JMS.testTopic(JMS.java:57) at jms.JMS.main(JMS.java:112)

Soner Gönül
  • 97,193
  • 102
  • 206
  • 364
Shankar S
  • 133
  • 1
  • 5
  • 15

1 Answers1

0

Cab you please share your "JMS.java" it looks like you are writing an incorrect type casting code at line 112 of your JMS.java.

I am assuming that by mistake you are doing a lookup for the Topic Connection Factory and then trying to cast it to Topic. So please check your JNDI names which you are using.

(I mean by mistake your code might be passing the ConnecitonFactory JNDI name during lookup and might be expecting it to return Topic)