[jboss-user] [Messaging, JMS & JBossMQ] - ClassCastException when casting to SpyConnectionFactory

rtrauni do-not-reply at jboss.com
Mon Sep 4 09:49:57 EDT 2006


Using following cast


  | factory = (SpyConnectionFactory) ctx.lookup("ConnectionFactory");
  | 
if always get following classcastexception: 

  | Caused by: java.lang.ClassCastException: org.jboss.mq.SpyConnectionFactory
  | 	at at.maat.commons.remoting.jms.JMSGateway.start(JMSGateway.java:84)
  | 	... 20 more
  | 

The strange thing is that both, ctx.lookup("ConnectionFactory") and the cast (SpyConnectionFactory) are of type org.jboss.mq.SpyConnectionFactory

Any ideas?

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3969237#3969237

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3969237



More information about the jboss-user mailing list