*
The moose likes JBoss/WildFly and the fly likes javax.naming.Reference cannot be cast to javax.jms.TopicConnectionFactory Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "javax.naming.Reference cannot be cast to javax.jms.TopicConnectionFactory" Watch "javax.naming.Reference cannot be cast to javax.jms.TopicConnectionFactory" New topic
Author

javax.naming.Reference cannot be cast to javax.jms.TopicConnectionFactory

Harish Maridi
Ranch Hand

Joined: May 20, 2008
Posts: 60
Hi,

I am having the following issue, while I am trying to get TopicConnectionaFactory. I am not sure why my TopicConnectionFactory is getting as Reference. Any suggestion is welcome.

sampleorder.factory=cn=BrokerTopicConnectionFactory
Java Code that is causing the issue:


java.lang.ClassCastException: javax.naming.Reference cannot be cast to javax.jms.TopicConnectionFactory
at com.av.mobi.jca.esb.em.genesis.GenConnector$AsyncSampleOrderDelegate.publishRequest(GenConnector.java:915)
at com.av.mobi.jca.esb.em.genesis.GenConnector.doSampleOrder(GenConnector.java:734)

Difference I see when I print the Interface information if the factory lookup:

Working one is getting::
Object ref from factory lookup:
Interface: com.webmethods.jms.WmTopicConnectionFactory
Interface: javax.naming.Referenceable
Interface: java.io.Externalizable

Non Working one getting::
Object ref from factory lookup:
Interface: java.lang.Cloneable
Interface: java.io.Serializable

Dependencies added: (jboss-deployment-structure.xml)
<module name="com.av.json" export="true"/>
<module name="com.av.commons-httpclient" export="true"/>
<module name="com.av.axis2-adb" export="true"/>
<module name="com.av.geronimo-jms" export="true"/>
<module name="com.av.wmjmsclient" export="true"/>
<module name="sun.jdk" export="true"/>
<module name="com.av.AvMobileAxis2Services"/>
<module name="com.av.AvUtilities"/>

Thanks,
HM
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: javax.naming.Reference cannot be cast to javax.jms.TopicConnectionFactory
 
Similar Threads
JMS lookup in JBoss3.2.3
DefaultMessageListenerContainer not getting started
Need help on EJB2.0 Local interfaces
javax.naming.NamingException: Invalid reference. Error: invalid field type for server in class org.
JMS look up for JBoss 3.2.3