Skip to Content
avatar image
Former Member

JMS Client Program

Hi,

I'm trying to run my JMS Client program to post a message to XI JMS Queue.

But I'm getting the following exception... java.lang.ClassCastException

at QueueConnectionFactory.

Also tried to catch the name of the returned class name...

com.sap.engine.services.jndi.persistent.UnsatisfiedReferenceImpl

Can anyone has an idea what could be the possible solution?

Any help is highly appreciated.

Here are the details...

SAP_NAMING_PROVIDER_URL = localhost:50204 (50200 being J2EE port)

SAP_INITIAL_CONTEXT_FACTORY_IMPL = "com.sap.engine.services.jndi.InitialContextFactoryImpl"

QueueConnectionFactory queueConnectionFactory =(QueueConnectionFactory) jndiContext.lookup("jmsfactory/default/QueueConnectionFactory")

Queue queue = (Queue) jndiContext.lookup(

"jmsqueues/default/MyTestQueue")

Thanks and Regards,

Vijay

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Jan 08, 2007 at 10:59 AM

    Can u check the JMS adapter section https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/5393.You [original link is broken] [original link is broken] [original link is broken] [original link is broken] will have very useful info there.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Sravya,

      I have already created the queue and related items through Visual Administrator, as specified in the blog.

      Now my problem is to access that queue by pushing a message into it.

      My JMS Client code is throwing ClassCastException.

      Please let me know if something needs to be done to eliminate this.

      Thanks and Regards,

      Vijay Kalyan

  • avatar image
    Former Member
    Jan 08, 2007 at 11:01 AM

    below is the link to sample jms client program given by SAP. try to run this to see if its ok or getting error.

    http://help.sap.com/search/highlightContent.jsp

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      I have solved it on my own and would like to share the solution.

      I found that there is a conflict whenever the referred class is in more than one JAR.

      Hence only included relevant JARs one by one.

      Also the ClassCastException disappeared and the program executed successfully, when sapjms.jar was included.

      Regards,

      Vijay Kalyan G.