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:[EMAIL PROTECTED]] > Sent: Monday, November 18, 2002 5:09 PM > To: [EMAIL PROTECTED] > 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 <[EMAIL PROTECTED]> 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) --
begin:vcard n:Chappell;Dave tel;cell:617-510-6566 tel;work:781-999-7099 x-mozilla-html:FALSE url:www.sonicsoftware.com org:Sonic Software Corp. <BR><BR><A HREF="http://www.sonicsoftware.com/products/sonicxq.htm">Read about SonicXQ</A> - the first product to deliver <br>on the promise of the enterprise service bus.<BR><BR><A HREF="http://www.sonicsoftware.com"><IMG BORDER="0" SRC="http://www.sonicsoftware.com/media/email_signatures/schulte_quote_logo2.gif"></A> adr:;;14 Oak Park;Bedford;MA;01730;USA version:2.1 email;internet:[EMAIL PROTECTED] title:vice president & chief technology evangelist<a href="http://www.oreillynet.com/weblogs/author/207">[weblog]</a> fn:Dave Chappell end:vcard
