• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

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

 
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
 
Do the next thing next. That’s a pretty good rule. Read the tiny ad, that’s a pretty good rule, too.
how do I do my own kindle-like thing - without amazon
https://coderanch.com/t/711421/engineering/kindle-amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!