• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic