Hi Ajay,

It seems that the JNDI Name you are using is set to QueueConnectionFactory.
I wonder whether this has been created in JBOSS as
java:comp/env/QueueConnectionFactory. Note that the setter will
automatically append java:comp/env only if resourceRef is set to "true".

If so then the lookup will fail...

Can you please verify whether this is the case. Note that the reason this
may be working in your ActiveMQ connectionfactory is that there is no JNDI
related activity.

Cheers,

Ashwin... 


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
> 


-----
--- 
Ashwin Karpe, Principal Consultant, PS - Opensource Center of Competence 
Progress Software Corporation
14 Oak Park Drive
Bedford, MA 01730
--- 
+1-972-304-9084 (Office) 
+1-972-971-1700 (Mobile) 
---- 
Blog: http://opensourceknowledge.blogspot.com/


-- 
View this message in context: 
http://www.nabble.com/Problems-with-EIP-when-using-Jboss-JMS-queue-tp21215924p21218556.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to