Hi, 

I having problems in sending messages to queue based on JNDI template. I
tried to use EIP example as well as basic Camel example but could not
succeed. I request to please help me. Iam using servicemix 3.3, jetty,
windows xpsp2 

The Basic EIP example Config that I have:

JMS SU xbean.xml
<beans xmlns:jms="http://servicemix.apache.org/jms/1.0";
       xmlns:tut="http://intra.agfanet";
       xmlns:amq="http://activemq.org/config/1.0";>
    <jms:endpoint service="tut:jms"
                  endpoint="myQueue"
                  role="provider" 
                  destinationStyle="queue"
                  jmsProviderDestinationName="queue/DLQ"
                  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>

file su xbean.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:file="http://servicemix.apache.org/file/1.0";
        xmlns:tut="http://intra.agfanet";>
        <!-- add the poller endpoint here -->
        <file:poller service="tut:file" endpoint="poller"
                file="file:C:/BPEFileReader" targetService="tut:wiretap">
                <property name="filter">
                        <bean 
class="org.apache.commons.io.filefilter.WildcardFilter">
                                <constructor-arg value="sample.xml" />
                        </bean>
                </property>
        </file:poller>
        <!-- add the sender endpoint here -->
        <file:sender service="tut:file" endpoint="sender"
                directory="file:C:/BPEFileWriter" />
</beans>

EIP SU xbean.xml

<beans xmlns:eip="http://servicemix.apache.org/eip/1.0";
       xmlns:tut="http://intra.agfanet";>

  <eip:wire-tap service="tut:wiretap" endpoint="endpoint">
    <eip:target>
      <eip:exchange-target service="tut:jms" endpoint="myQueue"/>
    </eip:target>

    <eip:inListener>
      <eip:exchange-target service="tut:file" endpoint="sender" />
    </eip:inListener>
  </eip:wire-tap>
</beans>

When running mvn install for creating SA, I am not getting any errors or
exceptions. But when I copy the SA to hotdeploy on servicemix, Iam getting
the following errors and exceptions.

ERROR - JmsComponent                   - Error processing exchange InOnly[
  id: ID:172.25.35.156-11ea5d4672a-7:0
  status: Active
  role: provider
  service: {http://intra.agfanet}jms
  endpoint: myQueue
  in: <?xml version="1.0" encoding="UTF-8"?><note>
  <to>Tove</to>
  <from>Jani</from>
  <heading>Reminder</heading>
  <body>Don't forget me this weekend!</body>
</note>
]
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)
WARN  - FileComponent                  - Message in file
C:\BPEFileReader\sample.xml could not be handled successfully: null
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)

Iam also having almost same problem on another example as well which I want
to post it as new message to avoid confusions. 

please let me know, how I can get rid of this exceptions. 

Thanking you. 

Best Regards,
Ajay
-- 
View this message in context: 
http://www.nabble.com/Error-on-JMS-component-tp21287196p21287196.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to