Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Harish Maridi
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic