axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Chappell <chapp...@sonicsoftware.com>
Subject Re: JMS sample can not run
Date Mon, 18 Nov 2002 22:35:56 GMT
Kevin,
Per Jaime's suggestion to try the alternate approach using the vendor
adapter directly, here is the specific command line - 

java
-Dorg.apache.axis.components.jms.JMSVendorAdapter=org.apache.axis.components.jms.SonicMQVendorAdapter


samples.jms.JMSTest -c sonic-connection-factory.properties -d "SampleQ1"
XXX

Note the use of "SampleQ1" directly instead of its JNDI indirection,
"MyQ".  "SampleQ1" happens to be one of the preconfigured queues that
comes with a basic install of SonicMQ.

We still encourage you to take another look at the JNDI instructions as
well.
Dave

Jaime Meritt wrote:
> 
> Kevin,
> 
> It looks like the Connection Factory you are pulling out of JNDI is not
> configured correctly.  Did you follow the steps in the document to setup
> your connection factory in the JNDI repository?  Which JNDI
> implementation are you using?
> 
> Since you are using SonicMQ, another option exists instead of JNDI.  You
> can use the SonicMQVendorAdapter to automatically create your connection
> factory upon startup as opposed to looking it up from the JNDI
> repository.  This gives you the added benefit of zero-administration (no
> JNDI setup).  You can try using this mechanism if the JNDI way doesn't
> work.  To use the Sonic vendor adapter you need to set the system
> property org.apache.axis.components.jms to the fully qualified classname
> of the SonicMQVendorAdapter.  Instead of
> jndi-connection-factory.properties, you should use
> sonic-connection-factory.properties in the sample directory.  Let me
> know how this works for you.
> 
> Thanks,
> Jaime
> Sonic Software Corporation
> 
> -----Original Message-----
> From: Kevin Wang [mailto:kwang@farelogix.com]
> Sent: Monday, November 18, 2002 5:09 PM
> To: axis-user@xml.apache.org
> Subject: JMS sample can not run
> 
> Hi,
> 
> I'm new to Axis, now I'm trying to run the JMS sample with SonicMQ.
> 
> But I got an exception like this:
> 
> C:\xml-axis-10\samples\jms>java samples.jms.JMSTest -c
> jndi-connection-factory.p
> roperties -d "MyQ" IBM PRGS
> Nov 18, 2002 4:57:57 PM 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)
> 
> Can anybody help out?
> 
> Thanks in advance.
> 
> Kevin

-- 
Sonic Software - Backbone of the Extended Enterprise
--
David Chappell <chappell@sonicsoftware.com> Office: (781)999-7099
Mobile: (617)510-6566
Vice President and Chief Technology Evangelist, Sonic Software
co-author,"Java Web Services", (O'Reilly 2002)
"The Java Message Service", (O'Reilly 2000)
"Professional ebXML Foundations", (Wrox 2001)
--

Mime
View raw message