Add $SONIC_HOME/lib/tools.jar to your classpath and try again.

I got the same error when I first try to run it.

Kevin


-----Original Message-----
From: Krishnakumar B [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 01, 2003 12:20 AM
To: [EMAIL PROTECTED]
Subject: RE: JMS Sample : ClassCastException


Hi

I get an error in creating the Listener. 

SimpleJMSListener listener = new SimpleJMSListener(connectorMap,
                                                           cfMap,
                                                           destination,
                                                           username,
                                                           password,
                                                           false);

This throws a ClassCastException.

The trace is as follows
Jan 1, 2003 10:46:26 AM org.apache.axis.transport.jms.SimpleJMSListener
<init>
SEVERE: Exception:
java.lang.ClassCastException: javax.naming.Reference
        at
org.apache.axis.components.jms.JNDIVendorAdapter.getConnectionFactory
(JNDIVendorAdapter.java:106)
        at
org.apache.axis.components.jms.JNDIVendorAdapter.getQueueConnectionFa
ctory(JNDIVendorAdapter.java:86)
        at
org.apache.axis.transport.jms.JMSConnectorFactory.createConnector(JMS
ConnectorFactory.java:168)
        at
org.apache.axis.transport.jms.JMSConnectorFactory.createServerConnect
or(JMSConnectorFactory.java:101)
        at
org.apache.axis.transport.jms.SimpleJMSListener.<init>(SimpleJMSListe
ner.java:120)
        at samples.jms.JMSTest.main(JMSTest.java:119)
Exception in thread "main" java.lang.ClassCastException:
javax.naming.Reference
        at
org.apache.axis.components.jms.JNDIVendorAdapter.getConnectionFactory
(JNDIVendorAdapter.java:106)
        at
org.apache.axis.components.jms.JNDIVendorAdapter.getQueueConnectionFa
ctory(JNDIVendorAdapter.java:86)
        at
org.apache.axis.transport.jms.JMSConnectorFactory.createConnector(JMS
ConnectorFactory.java:168)
        at
org.apache.axis.transport.jms.JMSConnectorFactory.createServerConnect
or(JMSConnectorFactory.java:101)
        at
org.apache.axis.transport.jms.SimpleJMSListener.<init>(SimpleJMSListe
ner.java:120)
        at samples.jms.JMSTest.main(JMSTest.java:119)

I have set the FileContext as given in the documentation.
Any ideas as to how i could solve this problem.

Regards
Krishnakumar B

-----Original Message-----
From: Jaime Meritt [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 31, 2002 7:19 PM
To: [EMAIL PROTECTED]
Subject: RE: JMS Sample : ClassCastException


Krishnakumar,

The ClassCastException is common when the jndi administered objects are
not set up correctly.  Have you followed the sample documentation for
setting up these elements?  Which JMS server are you using?  

If you are using SonicMQ the sample documentation describes the steps
necessary.  If not, you should follow your server's documentation to set
up a connection factory and a destination.  Then you must modify the
jndi-connection-factory.properties to use your server's jndi
implementation.  If you give some more information about your setup I
may be able to offer more advice.

Thanks,
Jaime 

-----Original Message-----
From: Krishnakumar B [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, December 31, 2002 7:55 AM
To: [EMAIL PROTECTED]
Subject: JMS Sample : ClassCastException

Hi

I am new to AXIS. I am trying out AXIS/JMS example. When i run the
JMSTest
client i get the following error.
( ClassCastException ) .

The command is 

java samples.jms.JMSTest -c
./samples/jms/jndi-connection-factory.properties
-d "MyQ" IBM PRGS

The response is

org.apache.axis.transport.jms.SimpleJMSListener <init>
SEVERE: Exception:
java.lang.ClassCastException: javax.naming.Reference
        at
org.apache.axis.components.jms.JNDIVendorAdapter.getConnectionFactory
(JNDIVendorAdapter.java:106)
        at
org.apache.axis.components.jms.JNDIVendorAdapter.getQueueConnectionFa
ctory(JNDIVendorAdapter.java:86)
        at
org.apache.axis.transport.jms.JMSConnectorFactory.createConnector(JMS
ConnectorFactory.java:168)
        at
org.apache.axis.transport.jms.JMSConnectorFactory.createServerConnect
or(JMSConnectorFactory.java:101)
        at
org.apache.axis.transport.jms.SimpleJMSListener.<init>(SimpleJMSListe
ner.java:120)
        at samples.jms.JMSTest.main(JMSTest.java:115)
Exception in thread "main" java.lang.ClassCastException:
javax.naming.Reference
        at
org.apache.axis.components.jms.JNDIVendorAdapter.getConnectionFactory
(JNDIVendorAdapter.java:106)
        at
org.apache.axis.components.jms.JNDIVendorAdapter.getQueueConnectionFa
ctory(JNDIVendorAdapter.java:86)
        at
org.apache.axis.transport.jms.JMSConnectorFactory.createConnector(JMS
ConnectorFactory.java:168)
        at
org.apache.axis.transport.jms.JMSConnectorFactory.createServerConnect
or(JMSConnectorFactory.java:101)
        at
org.apache.axis.transport.jms.SimpleJMSListener.<init>(SimpleJMSListe
ner.java:120)
        at samples.jms.JMSTest.main(JMSTest.java:115)



Reply via email to