cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with default queue

Former Member
0 Kudos

I have 2004s preview version installed on my machine and am trying to connect the sample program on help.sap.com

to the default created JMS queues on the server.

If from the program , i try to view the contents of the JNDI registry, for the following code

NamingEnumeration nEnum = context.list("jmsfactory/default");
while(nEnum.hasMoreElements()){
System.out.println(nEnum.nextElement().toString());
}

i get output printed as

XAQueueConnectionFactory: com.sap.jms.client.xa.XAQueueConnectionFactory

TopicConnectionFactory: com.sap.jms.client.connection.TopicConnectionFactory

QueueConnectionFactory: com.sap.jms.client.connection.QueueConnectionFactory

XATopicConnectionFactory: com.sap.jms.client.xa.XATopicConnectionFactory

<b>Note the class for QueueConnectionFactory.</b>

if tried to execute the next statement in the code which is

queueConnectionFactory =
(QueueConnectionFactory) context.lookup("jmsfactory/default/QueueConnectionFactory");

I get a ClassCastException and the reason being, the class of the object recieved as a lookup result is

<b>com.sap.engine.services.jndi.persistent.UnsatisfiedReferenceImpl</b>

What is going wrong???

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Try putting the file sapjms.jar on your classpath.

It can be found at somewhere like :

\usr\sap\<sid>\<instance id>\j2ee\cluster\server0\bin\services\jms_provider

HTH

Peter

Former Member
0 Kudos

Thanks Peter...it worked.

Answers (0)