Hello Gert, Finally, my pray for using JNDi template to create and use queues are answered. ConnectionFactory is also fine. The problem is , Iam using queue/myqueue in xbean.xml. Instead of that, I have to just mention myqueue. The JNDI template will concatinate Queue.myqueue. In standalone client, I used to mention queue/myQueue to send messages to myqueue.
The new <jms:provider/> has helped me to find this error. Thank you, so much. My first day in New year is fruitful :jumping: Best Regards, Ajay Gert Vanthienen wrote: > > Ajay, > > I suspect you don't actually get a JMS ConnectionFactory with the JNDI > configuration you have there. Could you check the JNDI configuration > and especially the name for the your ConnectionFactory? Also, could you > try using the new <jms:provider/> endpoint to see what exception that > gives you? > > Regards, > > Gert > > Ajaykumar wrote: >> hi, >> >> Iam having the same problem again and again. I really dont know how I can >> get rid of this problem when I use JNDI template. Iam using camel basic >> example. >> >> JMS SU xbean.xml >> >> <beans xmlns:jms="http://servicemix.apache.org/jms/1.0" >> xmlns:tut="http://intra.agfanet" >> xmlns:tutorial="urn:org:apache:servicemix:tutorial:camel" >> xmlns:amq="http://activemq.org/config/1.0" >> xmlns="http://www.springframework.org/schema/beans" >> xmlns:xsi="http://http://www.w3.org/2001/XMLSchema-instance" >> xsi:schemaLocation="http://servicemix.apache.org/jms/1.0 >> http://servicemix.apache.org/schema/servicemix-jms-3.2.2.xsd >> http://activemq.org/config/1.0 >> http://activemq.apache.org/schema/core/activemq-core-4.1.1.xsd >> http://www.springframework.org/schema/beans >> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd"> >> >> <!-- START SNIPPET: provider --> >> >> <jms:endpoint service="tut:jms" endpoint="myProvider1" >> role="provider" destinationStyle="queue" >> jmsProviderDestinationName="queue/testQueue" >> connectionFactory="#connectionFactory" >> defaultMep="http://www.w3.org/2004/08/wsdl/in-only" /> >> <bean id="jbossJndiTemplate" >> class="org.springframework.jndi.JndiTemplate"> >> <property name="environment"> >> <props> >> <prop key="java.naming.factory.initial"> >> org.jnp.interfaces.NamingContextFactory >> </prop> >> <prop key="java.naming.provider.url"> >> jnp://localhost:1099 >> </prop> >> <prop key="java.naming.factory.url.pkgs"> >> org.jboss.naming:org.jnp.interfaces >> </prop> >> </props> >> </property> >> </bean> >> >> <bean id="connectionFactory" >> class="org.springframework.jndi.JndiObjectFactoryBean"> >> <property name="jndiTemplate"> >> <ref bean="jbossJndiTemplate" /> >> </property> >> <property name="jndiName"> >> <value>java:QueueConnectionFactory</value> >> </property> >> <property name="resourceRef" value="true"/> >> >> </bean> >> </beans> >> >> Camel MyRouteBuilder.java >> >> public class MyRouteBuilder extends RouteBuilder { >> >> public void configure() { >> //send a message to a JBI endpoint... >> >> from("timer://tutorial?fixedRate=true&delay=3000&period=30000") >> >> // 1 >> .setBody(constant("<message>Hello world</message>")) >> >> // 2 >> .to("jbi:endpoint:http://intra.agfanet/jms/myProvider1"); >> } >> } >> >> My intension is to write on a queue name queue/testQueue. So that the >> messageDrivenBean deployed on Jboss gets this message. But, Iam having >> the >> following errors and exceptions. >> >> INFO - AutoDeploymentService - Directory: hotdeploy: Finished >> installation of archive: tutorial-camel-sa-1.0-SNAPSHOT.jar >> ERROR - JmsComponent - Error processing exchange >> InOnly[ >> id: ID:172.25.35.156-11ea5d4672a-3:0 >> status: Active >> role: provider >> endpoint: myProvider1 >> in: <?xml version="1.0" encoding="UTF-8"?><message>Hello >> world</message> >> ] >> java.lang.NullPointerException >> at >> org.apache.servicemix.jms.DefaultJmsMarshaler.toJMS(DefaultJmsMarshaler.java:83) >> at >> org.apache.servicemix.jms.DefaultJmsMarshaler.toJMS(DefaultJmsMarshaler.java:107) >> at >> org.apache.servicemix.jms.AbstractJmsProcessor.fromNMS(AbstractJmsProcessor.java:216) >> at >> org.apache.servicemix.jms.AbstractJmsProcessor.createMessageFromExchange(AbstractJmsProcessor.java:263) >> at >> org.apache.servicemix.jms.multiplexing.MultiplexingProviderProcessor.process(MultiplexingProviderProcessor.java:110) >> at >> org.apache.servicemix.soap.SoapEndpoint.process(SoapEndpoint.java:367) >> at >> org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:600) >> at >> org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:554) >> at >> org.apache.servicemix.common.AsyncBaseLifeCycle.onMessageExchange(AsyncBaseLifeCycle.java:510) >> at >> org.apache.servicemix.common.SyncLifeCycleWrapper.onMessageExchange(SyncLifeCycleWrapper.java:60) >> at >> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:620) >> at >> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:172) >> at >> org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:168) >> at >> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134) >> at >> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885) >> at >> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907) >> at java.lang.Thread.run(Thread.java:619) >> ERROR - DeadLetterChannel - Failed delivery for exchangeId: >> ID-trrw0104/1111-1231150374250/0-0. On delivery attempt: 0 caught: >> java.lang.NullPointerException >> java.lang.NullPointerException >> at >> org.apache.servicemix.jms.DefaultJmsMarshaler.toJMS(DefaultJmsMarshaler.java:83) >> at >> org.apache.servicemix.jms.DefaultJmsMarshaler.toJMS(DefaultJmsMarshaler.java:107) >> at >> org.apache.servicemix.jms.AbstractJmsProcessor.fromNMS(AbstractJmsProcessor.java:216) >> at >> org.apache.servicemix.jms.AbstractJmsProcessor.createMessageFromExchange(AbstractJmsProcessor.java:263) >> at >> org.apache.servicemix.jms.multiplexing.MultiplexingProviderProcessor.process(MultiplexingProviderProcessor.java:110) >> at >> org.apache.servicemix.soap.SoapEndpoint.process(SoapEndpoint.java:367) >> at >> org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:600) >> at >> org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:554) >> at >> org.apache.servicemix.common.AsyncBaseLifeCycle.onMessageExchange(AsyncBaseLifeCycle.java:510) >> at >> org.apache.servicemix.common.SyncLifeCycleWrapper.onMessageExchange(SyncLifeCycleWrapper.java:60) >> at >> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:620) >> at >> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:172) >> at >> org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:168) >> at >> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134) >> at >> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885) >> at >> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907) >> at java.lang.Thread.run(Thread.java:619) >> >> Please give some hints, how I can get rid of this exceptions. >> >> Thanking you very much. >> >> Best Regards, >> Ajay >> > > > > ----- > --- > Gert Vanthienen > http://gertvanthienen.blogspot.com > -- View this message in context: http://www.nabble.com/ERROR---DeadLetterChannel-%28basic-Camel-example%29-tp21289664p21291711.html Sent from the ServiceMix - User mailing list archive at Nabble.com.
