Ajay,

Are there any exceptions prior to this one? It looks like there is a problem creating the JMS TextMessage object, but in order to be sure, I'd have to know which version of ServiceMix you are using.

Regards,

Gert

Ajaykumar wrote:
Hi,

Iam having problem using EIP example. I have the following SU's
configuration.
File SU xbean.xml

<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>

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/myQueue"
                  connectionFactory="#connectionFactory"/>
<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>QueueConnectionFactory</value>
                </property>
        </bean>   
</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" />
    </eip:target>
    <eip:inListener>
      <eip:exchange-target service="tut:file" endpoint="sender" />
    </eip:inListener>
  </eip:wire-tap>
</beans>

When I use mvn install I dont get any problems. But when I deploy the SA on
servicemix running on jetty, I have to following exceptions.
ERROR - JmsComponent                   - Error processing exchange InOnly[
  id: ID:172.25.35.156-11e876aa483-7:100
  status: Active
  role: provider
  service: {http://intra.agfanet}jms
  endpoint: myQueue
java.lang.NullPointerException
        at
org.apache.servicemix.jms.DefaultJmsMarshaler.toJMS(DefaultJmsMarshaler.java:83)
        at
org.apache.servicemix.jms.DefaultJmsMarshaler.toJMS(DefaultJmsMarshaler.java:107)
WARN  - FileComponent                  - Message in file
C:\BPEFileReader\sample.xml could not be handled successfully: null
java.lang.NullPointerException

Iam newbie for servicemix. Could some one please help me.
Thanking you.

Best Regards,
Ajay

Reply via email to