You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by jrrosel <je...@landsend.com> on 2009/08/21 17:27:42 UTC

Servicemix JMS and Websphere MQ

I am doing some quick research on servicemix and one of our main requirement
is the ability to work with Websphere MQ. I am attempting to get the simple
eip/jms tutorial to use Websphere MQ instead of ActiverMQ. I am getting the
following error when I place an xml file in the poller directory:

ERROR - JmsComponent                   - Error processing exchange InOnly[
  id: ID:172.25.128.178-1233d039424-7:2
  status: Active
  role: provider
  service: {urn:servicemix:tutorial}jms
  endpoint: myQueue
  in: <?xml version="1.0" encoding="UTF-8"?><testMessage>Testing
Message</testMe
ssage>
]
java.lang.NullPointerException
        at
org.apache.servicemix.jms.standard.StandardProviderProcessor.process(
StandardProviderProcessor.java:71)
        at
org.apache.servicemix.soap.SoapEndpoint.process(SoapEndpoint.java:368
)
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLi
feCycle.java:627)
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(Async
BaseLifeCycle.java:581)
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.onMessageExchange(Asy
ncBaseLifeCycle.java:535)
        at
org.apache.servicemix.common.SyncLifeCycleWrapper.onMessageExchange(S
yncLifeCycleWrapper.java:60)
        at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBoun
d(DeliveryChannelImpl.java:623)
        at
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlo
w.java:172)
        at
org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.j
ava:168)
        at
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.jav
a:134)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
utor.java:650)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:675)
        at java.lang.Thread.run(Thread.java:595)
WARN  - SimpleEndpoint                 - SimpleEndpoint.fail called:
WARN  - FileComponent                  - Message in file
c:\servicemix_tutorial\
tutorial\poller\testing.xml could not be handled successfully: null
java.lang.NullPointerException
        at
org.apache.servicemix.jms.standard.StandardProviderProcessor.process(
StandardProviderProcessor.java:71)
        at
org.apache.servicemix.soap.SoapEndpoint.process(SoapEndpoint.java:368
)
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLi
feCycle.java:627)
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(Async
BaseLifeCycle.java:581)
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.onMessageExchange(Asy
ncBaseLifeCycle.java:535)
        at
org.apache.servicemix.common.SyncLifeCycleWrapper.onMessageExchange(S
yncLifeCycleWrapper.java:60)
        at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBoun
d(DeliveryChannelImpl.java:623)
        at
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlo
w.java:172)
        at
org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.j
ava:168)
        at
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.jav
a:134)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
utor.java:650)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:675)
        at java.lang.Thread.run(Thread.java:595)

My jms su xbean.xml is as follows:

<beans xmlns:jms="http://servicemix.apache.org/jms/1.0"
       xmlns:tut="urn:servicemix:tutorial"
       xmlns:util="http://www.springframework.org/schema/util">

    <jms:endpoint service="tut:jms"
                  endpoint="myQueue"
                  role="provider" 
                  processorName="standard"
                  destinationStyle="queue"
                  jmsProviderDestinationName="JRR.TESTIN.Q"
                  defaultMep="http://www.w3.org/2004/08/wsdl/in-out"
                  connectionFactory="#mqConnectionFactory"/>

  <bean id="mqConnectionFactory"
class="com.ibm.mq.jms.MQQueueConnectionFactory">
    <property name="transportType" value="1" />
    <property name="queueManager" value="LEUSEG05" />
    <property name="hostName" value="leuseg05.leinternal.com" />
    <property name="channel" value="java.channel" />
    <property name="port" value="1416" />
  </bean>
  
</beans>

Any suggestions? I do see that the defaultMEP property in my xbean is in-out
but the error message references inOnly.

Thanks,
Jeremy
-- 
View this message in context: http://www.nabble.com/Servicemix-JMS-and-Websphere-MQ-tp25082012p25082012.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Servicemix JMS and Websphere MQ

Posted by jrrosel <je...@landsend.com>.
Sorry, the testing.xml file is:

<testMessage>Testing Message</testMessage>

Thanks,
Jeremy


Jean-Baptiste Onofré wrote:
> 
> Hi Jeremy,
> 
> could you provide the content of the testing.xml file ?
> It seems that the content of the file is not compliant with the SOAP 
> endpoint.
> 
> Regards
> JB
> 
> jrrosel wrote:
>> I am doing some quick research on servicemix and one of our main
>> requirement
>> is the ability to work with Websphere MQ. I am attempting to get the
>> simple
>> eip/jms tutorial to use Websphere MQ instead of ActiverMQ. I am getting
>> the
>> following error when I place an xml file in the poller directory:
>> 
>> ERROR - JmsComponent                   - Error processing exchange
>> InOnly[
>>   id: ID:172.25.128.178-1233d039424-7:2
>>   status: Active
>>   role: provider
>>   service: {urn:servicemix:tutorial}jms
>>   endpoint: myQueue
>>   in: <?xml version="1.0" encoding="UTF-8"?><testMessage>Testing
>> Message</testMe
>> ssage>
>> ]
>> java.lang.NullPointerException
>>         at
>> org.apache.servicemix.jms.standard.StandardProviderProcessor.process(
>> StandardProviderProcessor.java:71)
>>         at
>> org.apache.servicemix.soap.SoapEndpoint.process(SoapEndpoint.java:368
>> )
>>         at
>> org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLi
>> feCycle.java:627)
>>         at
>> org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(Async
>> BaseLifeCycle.java:581)
>>         at
>> org.apache.servicemix.common.AsyncBaseLifeCycle.onMessageExchange(Asy
>> ncBaseLifeCycle.java:535)
>>         at
>> org.apache.servicemix.common.SyncLifeCycleWrapper.onMessageExchange(S
>> yncLifeCycleWrapper.java:60)
>>         at
>> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBoun
>> d(DeliveryChannelImpl.java:623)
>>         at
>> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlo
>> w.java:172)
>>         at
>> org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.j
>> ava:168)
>>         at
>> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.jav
>> a:134)
>>         at
>> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
>> utor.java:650)
>>         at
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
>> .java:675)
>>         at java.lang.Thread.run(Thread.java:595)
>> WARN  - SimpleEndpoint                 - SimpleEndpoint.fail called:
>> WARN  - FileComponent                  - Message in file
>> c:\servicemix_tutorial\
>> tutorial\poller\testing.xml could not be handled successfully: null
>> java.lang.NullPointerException
>>         at
>> org.apache.servicemix.jms.standard.StandardProviderProcessor.process(
>> StandardProviderProcessor.java:71)
>>         at
>> org.apache.servicemix.soap.SoapEndpoint.process(SoapEndpoint.java:368
>> )
>>         at
>> org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLi
>> feCycle.java:627)
>>         at
>> org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(Async
>> BaseLifeCycle.java:581)
>>         at
>> org.apache.servicemix.common.AsyncBaseLifeCycle.onMessageExchange(Asy
>> ncBaseLifeCycle.java:535)
>>         at
>> org.apache.servicemix.common.SyncLifeCycleWrapper.onMessageExchange(S
>> yncLifeCycleWrapper.java:60)
>>         at
>> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBoun
>> d(DeliveryChannelImpl.java:623)
>>         at
>> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlo
>> w.java:172)
>>         at
>> org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.j
>> ava:168)
>>         at
>> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.jav
>> a:134)
>>         at
>> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
>> utor.java:650)
>>         at
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
>> .java:675)
>>         at java.lang.Thread.run(Thread.java:595)
>> 
>> My jms su xbean.xml is as follows:
>> 
>> <beans xmlns:jms="http://servicemix.apache.org/jms/1.0"
>>        xmlns:tut="urn:servicemix:tutorial"
>>        xmlns:util="http://www.springframework.org/schema/util">
>> 
>>     <jms:endpoint service="tut:jms"
>>                   endpoint="myQueue"
>>                   role="provider" 
>>                   processorName="standard"
>>                   destinationStyle="queue"
>>                   jmsProviderDestinationName="JRR.TESTIN.Q"
>>                   defaultMep="http://www.w3.org/2004/08/wsdl/in-out"
>>                   connectionFactory="#mqConnectionFactory"/>
>> 
>>   <bean id="mqConnectionFactory"
>> class="com.ibm.mq.jms.MQQueueConnectionFactory">
>>     <property name="transportType" value="1" />
>>     <property name="queueManager" value="LEUSEG05" />
>>     <property name="hostName" value="leuseg05.leinternal.com" />
>>     <property name="channel" value="java.channel" />
>>     <property name="port" value="1416" />
>>   </bean>
>>   
>> </beans>
>> 
>> Any suggestions? I do see that the defaultMEP property in my xbean is
>> in-out
>> but the error message references inOnly.
>> 
>> Thanks,
>> Jeremy
> 
> 

-- 
View this message in context: http://www.nabble.com/Servicemix-JMS-and-Websphere-MQ-tp25082012p25082269.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Servicemix JMS and Websphere MQ

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Jeremy,

could you provide the content of the testing.xml file ?
It seems that the content of the file is not compliant with the SOAP 
endpoint.

Regards
JB

jrrosel wrote:
> I am doing some quick research on servicemix and one of our main requirement
> is the ability to work with Websphere MQ. I am attempting to get the simple
> eip/jms tutorial to use Websphere MQ instead of ActiverMQ. I am getting the
> following error when I place an xml file in the poller directory:
> 
> ERROR - JmsComponent                   - Error processing exchange InOnly[
>   id: ID:172.25.128.178-1233d039424-7:2
>   status: Active
>   role: provider
>   service: {urn:servicemix:tutorial}jms
>   endpoint: myQueue
>   in: <?xml version="1.0" encoding="UTF-8"?><testMessage>Testing
> Message</testMe
> ssage>
> ]
> java.lang.NullPointerException
>         at
> org.apache.servicemix.jms.standard.StandardProviderProcessor.process(
> StandardProviderProcessor.java:71)
>         at
> org.apache.servicemix.soap.SoapEndpoint.process(SoapEndpoint.java:368
> )
>         at
> org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLi
> feCycle.java:627)
>         at
> org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(Async
> BaseLifeCycle.java:581)
>         at
> org.apache.servicemix.common.AsyncBaseLifeCycle.onMessageExchange(Asy
> ncBaseLifeCycle.java:535)
>         at
> org.apache.servicemix.common.SyncLifeCycleWrapper.onMessageExchange(S
> yncLifeCycleWrapper.java:60)
>         at
> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBoun
> d(DeliveryChannelImpl.java:623)
>         at
> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlo
> w.java:172)
>         at
> org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.j
> ava:168)
>         at
> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.jav
> a:134)
>         at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
> utor.java:650)
>         at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
> .java:675)
>         at java.lang.Thread.run(Thread.java:595)
> WARN  - SimpleEndpoint                 - SimpleEndpoint.fail called:
> WARN  - FileComponent                  - Message in file
> c:\servicemix_tutorial\
> tutorial\poller\testing.xml could not be handled successfully: null
> java.lang.NullPointerException
>         at
> org.apache.servicemix.jms.standard.StandardProviderProcessor.process(
> StandardProviderProcessor.java:71)
>         at
> org.apache.servicemix.soap.SoapEndpoint.process(SoapEndpoint.java:368
> )
>         at
> org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLi
> feCycle.java:627)
>         at
> org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(Async
> BaseLifeCycle.java:581)
>         at
> org.apache.servicemix.common.AsyncBaseLifeCycle.onMessageExchange(Asy
> ncBaseLifeCycle.java:535)
>         at
> org.apache.servicemix.common.SyncLifeCycleWrapper.onMessageExchange(S
> yncLifeCycleWrapper.java:60)
>         at
> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBoun
> d(DeliveryChannelImpl.java:623)
>         at
> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlo
> w.java:172)
>         at
> org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.j
> ava:168)
>         at
> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.jav
> a:134)
>         at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
> utor.java:650)
>         at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
> .java:675)
>         at java.lang.Thread.run(Thread.java:595)
> 
> My jms su xbean.xml is as follows:
> 
> <beans xmlns:jms="http://servicemix.apache.org/jms/1.0"
>        xmlns:tut="urn:servicemix:tutorial"
>        xmlns:util="http://www.springframework.org/schema/util">
> 
>     <jms:endpoint service="tut:jms"
>                   endpoint="myQueue"
>                   role="provider" 
>                   processorName="standard"
>                   destinationStyle="queue"
>                   jmsProviderDestinationName="JRR.TESTIN.Q"
>                   defaultMep="http://www.w3.org/2004/08/wsdl/in-out"
>                   connectionFactory="#mqConnectionFactory"/>
> 
>   <bean id="mqConnectionFactory"
> class="com.ibm.mq.jms.MQQueueConnectionFactory">
>     <property name="transportType" value="1" />
>     <property name="queueManager" value="LEUSEG05" />
>     <property name="hostName" value="leuseg05.leinternal.com" />
>     <property name="channel" value="java.channel" />
>     <property name="port" value="1416" />
>   </bean>
>   
> </beans>
> 
> Any suggestions? I do see that the defaultMEP property in my xbean is in-out
> but the error message references inOnly.
> 
> Thanks,
> Jeremy

Re: Servicemix JMS and Websphere MQ

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

You need to set some additional property like clientTransport or
whatever the name was to a value of 1 AFAIR.

Search on Camel user forum as well as some people have used it with
Camel and posted their working configuration.


On Tue, Aug 25, 2009 at 4:40 PM, jrrosel<je...@landsend.com> wrote:
>
> Using the new endpoint style I was able to get a bit further. Unfortunately I
> am now getting an MQConnection error:
>
> org.springframework.jms.UncategorizedJmsException: Uncategorized exception
> occur
> ed during JMS processing; nested exception is javax.jms.JMSException:
> MQJMS2005:
>  failed to create MQQueueManager for 'leuseg05.leinternal.com:LEUSEG05';
> nested
> exception is com.ibm.mq.MQException: MQJE001: An MQException occurred:
> Completio
> n Code 2, Reason 2009
>
> My mq admin says that may be due to the application not connecting in client
> mode. Based on the connection factory bean properties I believe I am setting
> it up for tcpip client. The connection factory bean definition is below:
>
>  <bean id="mqConnectionFactory"
> class="com.ibm.mq.jms.MQQueueConnectionFactory">
>    <property name="transportType" >
>           <util:constant
> static-field="com.ibm.mq.jms.JMSC.MQJMS_TP_CLIENT_MQ_TCPIP" />
>    </property>
>   <property name="queueManager" value="LEUSEG05" />
>    <property name="hostName" value="leuseg05.leinternal.com" />
>    <property name="channel" value="java.channel" />
>    <property name="port" value="1414" />
>  </bean>
>
> Any thoughts on this one?
>
> Thanks Again!
>
> It also looks like you are using the old style JMS endpoints.  I would
> recommend using the new JMS endpoints as they are much more flexible.
> http://servicemix.apache.org/servicemix-jms-new-endpoints.html
>
> The syntax is slightly different but it should only take a few minutes to
> convert the endoint config you show below.
>
> Thanks,
> Chris
> --
> Chris Custine
> FUSESource :: http://fusesource.com
> My Blog :: http://blog.organicelement.com
> Apache ServiceMix :: http://servicemix.apache.org
> Apache Directory Server :: http://directory.apache.org
>
> --
> View this message in context: http://www.nabble.com/Servicemix-JMS-and-Websphere-MQ-tp25082012p25135649.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Re: Servicemix JMS and Websphere MQ

Posted by jrrosel <je...@landsend.com>.
Thanks again for the quick responses!!! That was it.  I added the marshaler
and all went fine. 

- Jeremy


Chris Custine wrote:
> 
> Hi Jeremy,
> My bad...  I just realized that the default behavior in the new JMS
> endpoints is to copy all properties without checking for valid Java
> identifier syntax.  This is switched on via the DefaultProviderMarshaler,
> which is used by default but you will have to manually create a bean in
> xbean.xml to override the needJavaIdentifiers value.
> 
> So using your example:
> 
> <jms:provider service="tut:jms"
>      endpoint="myQueue"
>      connectionFactory="#mqConnectionFactory"
>     ...
>      marshaler="#marshaler" />
> 
> 
> <bean id="marshaler"
> class="org.apache.servicemix.jms.endpoints.DefaultConsumerMarshaler">
> <property name="needJavaIdentifiers" value="true" />
> </bean>
> 
> HTH,
> Chris
> --
> Chris Custine
> FUSESource :: http://fusesource.com
> My Blog :: http://blog.organicelement.com
> Apache ServiceMix :: http://servicemix.apache.org
> Apache Directory Server :: http://directory.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Servicemix-JMS-and-Websphere-MQ-tp25082012p25158002.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Servicemix JMS and Websphere MQ

Posted by Chris Custine <ch...@gmail.com>.
Hi Jeremy,
My bad...  I just realized that the default behavior in the new JMS
endpoints is to copy all properties without checking for valid Java
identifier syntax.  This is switched on via the DefaultProviderMarshaler,
which is used by default but you will have to manually create a bean in
xbean.xml to override the needJavaIdentifiers value.

So using your example:

<jms:provider service="tut:jms"
     endpoint="myQueue"
     connectionFactory="#mqConnectionFactory"
    ...
     marshaler="#marshaler" />


<bean id="marshaler"
class="org.apache.servicemix.jms.endpoints.DefaultConsumerMarshaler">
<property name="needJavaIdentifiers" value="true" />
</bean>

HTH,
Chris
--
Chris Custine
FUSESource :: http://fusesource.com
My Blog :: http://blog.organicelement.com
Apache ServiceMix :: http://servicemix.apache.org
Apache Directory Server :: http://directory.apache.org


On Tue, Aug 25, 2009 at 3:22 PM, Chris Custine <ch...@gmail.com>wrote:

> This property comes from the file poller, but the jms endpoint should be
> stripping this property out because it is not a valid Java identifier
> (required by the JMS spec).  What version of SMX and the components are you
> using?
>
> Chris
> --
> Chris Custine
> FUSESource :: http://fusesource.com
> My Blog :: http://blog.organicelement.com
> Apache ServiceMix :: http://servicemix.apache.org
> Apache Directory Server :: http://directory.apache.org
>
>
> On Tue, Aug 25, 2009 at 1:22 PM, jrrosel <je...@landsend.com>wrote:
>
>>
>> My mq admin had me change the java channel I was using. I am once again
>> getting another error.
>>
>> org.springframework.jms.MessageFormatException: MQJMS1058: Invalid message
>> prope
>> rty name: org.apache.servicemix.file.name; nested exception is
>> javax.jms.Message
>> FormatException: MQJMS1058: Invalid message property name:
>> org.apache.servicemix
>> .file.name
>>
>> I don't have anything set for org.apache.servicemix.file.name so I am not
>> sure where that is coming from.
>>
>> Thanks,
>> Jeremy
>>
>>
>> Chris Custine wrote:
>> >
>> > Your config looks fine to me, so I don't see the problem being the
>> client
>> > connection properties since they look exactly like a config that I have
>> > which is known to work.  Do you have other client code attaching to this
>> > QM
>> > and SVRCONN?  If this is a new setup, I suspect firewall, nat issues, or
>> > even a bad channel def.
>> >
>> > HTH
>> >
>> > Chris
>> >
>> > --
>> > Chris Custine
>> > FUSESource :: http://fusesource.com
>> > My Blog :: http://blog.organicelement.com
>> > Apache ServiceMix :: http://servicemix.apache.org
>> > Apache Directory Server :: http://directory.apache.org
>> >
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Servicemix-JMS-and-Websphere-MQ-tp25082012p25140593.html
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
>>
>

Re: Servicemix JMS and Websphere MQ

Posted by Chris Custine <ch...@gmail.com>.
This property comes from the file poller, but the jms endpoint should be
stripping this property out because it is not a valid Java identifier
(required by the JMS spec).  What version of SMX and the components are you
using?

Chris
--
Chris Custine
FUSESource :: http://fusesource.com
My Blog :: http://blog.organicelement.com
Apache ServiceMix :: http://servicemix.apache.org
Apache Directory Server :: http://directory.apache.org


On Tue, Aug 25, 2009 at 1:22 PM, jrrosel <je...@landsend.com>wrote:

>
> My mq admin had me change the java channel I was using. I am once again
> getting another error.
>
> org.springframework.jms.MessageFormatException: MQJMS1058: Invalid message
> prope
> rty name: org.apache.servicemix.file.name; nested exception is
> javax.jms.Message
> FormatException: MQJMS1058: Invalid message property name:
> org.apache.servicemix
> .file.name
>
> I don't have anything set for org.apache.servicemix.file.name so I am not
> sure where that is coming from.
>
> Thanks,
> Jeremy
>
>
> Chris Custine wrote:
> >
> > Your config looks fine to me, so I don't see the problem being the client
> > connection properties since they look exactly like a config that I have
> > which is known to work.  Do you have other client code attaching to this
> > QM
> > and SVRCONN?  If this is a new setup, I suspect firewall, nat issues, or
> > even a bad channel def.
> >
> > HTH
> >
> > Chris
> >
> > --
> > Chris Custine
> > FUSESource :: http://fusesource.com
> > My Blog :: http://blog.organicelement.com
> > Apache ServiceMix :: http://servicemix.apache.org
> > Apache Directory Server :: http://directory.apache.org
> >
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Servicemix-JMS-and-Websphere-MQ-tp25082012p25140593.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>

Re: Servicemix JMS and Websphere MQ

Posted by jrrosel <je...@landsend.com>.
My mq admin had me change the java channel I was using. I am once again
getting another error.

org.springframework.jms.MessageFormatException: MQJMS1058: Invalid message
prope
rty name: org.apache.servicemix.file.name; nested exception is
javax.jms.Message
FormatException: MQJMS1058: Invalid message property name:
org.apache.servicemix
.file.name

I don't have anything set for org.apache.servicemix.file.name so I am not
sure where that is coming from.

Thanks,
Jeremy


Chris Custine wrote:
> 
> Your config looks fine to me, so I don't see the problem being the client
> connection properties since they look exactly like a config that I have
> which is known to work.  Do you have other client code attaching to this
> QM
> and SVRCONN?  If this is a new setup, I suspect firewall, nat issues, or
> even a bad channel def.
> 
> HTH
> 
> Chris
> 
> --
> Chris Custine
> FUSESource :: http://fusesource.com
> My Blog :: http://blog.organicelement.com
> Apache ServiceMix :: http://servicemix.apache.org
> Apache Directory Server :: http://directory.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Servicemix-JMS-and-Websphere-MQ-tp25082012p25140593.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Servicemix JMS and Websphere MQ

Posted by Chris Custine <ch...@gmail.com>.
Your config looks fine to me, so I don't see the problem being the client
connection properties since they look exactly like a config that I have
which is known to work.  Do you have other client code attaching to this QM
and SVRCONN?  If this is a new setup, I suspect firewall, nat issues, or
even a bad channel def.

HTH

Chris

--
Chris Custine
FUSESource :: http://fusesource.com
My Blog :: http://blog.organicelement.com
Apache ServiceMix :: http://servicemix.apache.org
Apache Directory Server :: http://directory.apache.org


On Tue, Aug 25, 2009 at 8:40 AM, jrrosel <je...@landsend.com>wrote:

>
> Using the new endpoint style I was able to get a bit further. Unfortunately
> I
> am now getting an MQConnection error:
>
> org.springframework.jms.UncategorizedJmsException: Uncategorized exception
> occur
> ed during JMS processing; nested exception is javax.jms.JMSException:
> MQJMS2005:
>  failed to create MQQueueManager for 'leuseg05.leinternal.com:LEUSEG05';
> nested
> exception is com.ibm.mq.MQException: MQJE001: An MQException occurred:
> Completio
> n Code 2, Reason 2009
>
> My mq admin says that may be due to the application not connecting in
> client
> mode. Based on the connection factory bean properties I believe I am
> setting
> it up for tcpip client. The connection factory bean definition is below:
>
>  <bean id="mqConnectionFactory"
> class="com.ibm.mq.jms.MQQueueConnectionFactory">
>    <property name="transportType" >
>            <util:constant
> static-field="com.ibm.mq.jms.JMSC.MQJMS_TP_CLIENT_MQ_TCPIP" />
>    </property>
>    <property name="queueManager" value="LEUSEG05" />
>    <property name="hostName" value="leuseg05.leinternal.com" />
>    <property name="channel" value="java.channel" />
>     <property name="port" value="1414" />
>  </bean>
>
> Any thoughts on this one?
>
> Thanks Again!
>
> It also looks like you are using the old style JMS endpoints.  I would
> recommend using the new JMS endpoints as they are much more flexible.
> http://servicemix.apache.org/servicemix-jms-new-endpoints.html
>
> The syntax is slightly different but it should only take a few minutes to
> convert the endoint config you show below.
>
> Thanks,
> Chris
> --
> Chris Custine
> FUSESource :: http://fusesource.com
> My Blog :: http://blog.organicelement.com
> Apache ServiceMix :: http://servicemix.apache.org
> Apache Directory Server :: http://directory.apache.org
>
> --
> View this message in context:
> http://www.nabble.com/Servicemix-JMS-and-Websphere-MQ-tp25082012p25135649.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>

Re: Servicemix JMS and Websphere MQ

Posted by jrrosel <je...@landsend.com>.
Using the new endpoint style I was able to get a bit further. Unfortunately I
am now getting an MQConnection error:

org.springframework.jms.UncategorizedJmsException: Uncategorized exception
occur
ed during JMS processing; nested exception is javax.jms.JMSException:
MQJMS2005:
 failed to create MQQueueManager for 'leuseg05.leinternal.com:LEUSEG05';
nested
exception is com.ibm.mq.MQException: MQJE001: An MQException occurred:
Completio
n Code 2, Reason 2009

My mq admin says that may be due to the application not connecting in client
mode. Based on the connection factory bean properties I believe I am setting
it up for tcpip client. The connection factory bean definition is below: 

  <bean id="mqConnectionFactory"
class="com.ibm.mq.jms.MQQueueConnectionFactory">
    <property name="transportType" >
	   <util:constant
static-field="com.ibm.mq.jms.JMSC.MQJMS_TP_CLIENT_MQ_TCPIP" />
    </property>
   <property name="queueManager" value="LEUSEG05" />
    <property name="hostName" value="leuseg05.leinternal.com" />
    <property name="channel" value="java.channel" />
    <property name="port" value="1414" />
  </bean>

Any thoughts on this one? 

Thanks Again!

It also looks like you are using the old style JMS endpoints.  I would
recommend using the new JMS endpoints as they are much more flexible.
http://servicemix.apache.org/servicemix-jms-new-endpoints.html

The syntax is slightly different but it should only take a few minutes to
convert the endoint config you show below.

Thanks,
Chris
--
Chris Custine
FUSESource :: http://fusesource.com
My Blog :: http://blog.organicelement.com
Apache ServiceMix :: http://servicemix.apache.org
Apache Directory Server :: http://directory.apache.org

-- 
View this message in context: http://www.nabble.com/Servicemix-JMS-and-Websphere-MQ-tp25082012p25135649.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Servicemix JMS and Websphere MQ

Posted by jrrosel <je...@landsend.com>.
Thanks much. I tried the new style JMS endpoints and at least attempted to
make a connection. Looks like firewall issues not related to servicemix
right now. 



Chris Custine wrote:
> 
> It also looks like you are using the old style JMS endpoints.  I would
> recommend using the new JMS endpoints as they are much more flexible.
> http://servicemix.apache.org/servicemix-jms-new-endpoints.html
> 
> The syntax is slightly different but it should only take a few minutes to
> convert the endoint config you show below.
> 
> Thanks,
> Chris
> --
> Chris Custine
> FUSESource :: http://fusesource.com
> My Blog :: http://blog.organicelement.com
> Apache ServiceMix :: http://servicemix.apache.org
> Apache Directory Server :: http://directory.apache.org
> 
> 
> On Fri, Aug 21, 2009 at 9:27 AM, jrrosel
> <je...@landsend.com>wrote:
> 
>>
>> I am doing some quick research on servicemix and one of our main
>> requirement
>> is the ability to work with Websphere MQ. I am attempting to get the
>> simple
>> eip/jms tutorial to use Websphere MQ instead of ActiverMQ. I am getting
>> the
>> following error when I place an xml file in the poller directory:
>>
>> ERROR - JmsComponent                   - Error processing exchange
>> InOnly[
>>  id: ID:172.25.128.178-1233d039424-7:2
>>  status: Active
>>  role: provider
>>  service: {urn:servicemix:tutorial}jms
>>  endpoint: myQueue
>>  in: <?xml version="1.0" encoding="UTF-8"?><testMessage>Testing
>> Message</testMe
>> ssage>
>> ]
>> java.lang.NullPointerException
>>        at
>> org.apache.servicemix.jms.standard.StandardProviderProcessor.process(
>> StandardProviderProcessor.java:71)
>>        at
>> org.apache.servicemix.soap.SoapEndpoint.process(SoapEndpoint.java:368
>> )
>>        at
>> org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLi
>> feCycle.java:627)
>>        at
>> org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(Async
>> BaseLifeCycle.java:581)
>>        at
>> org.apache.servicemix.common.AsyncBaseLifeCycle.onMessageExchange(Asy
>> ncBaseLifeCycle.java:535)
>>        at
>> org.apache.servicemix.common.SyncLifeCycleWrapper.onMessageExchange(S
>> yncLifeCycleWrapper.java:60)
>>        at
>> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBoun
>> d(DeliveryChannelImpl.java:623)
>>        at
>> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlo
>> w.java:172)
>>        at
>> org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.j
>> ava:168)
>>        at
>> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.jav
>> a:134)
>>        at
>> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
>> utor.java:650)
>>        at
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
>> .java:675)
>>        at java.lang.Thread.run(Thread.java:595)
>> WARN  - SimpleEndpoint                 - SimpleEndpoint.fail called:
>> WARN  - FileComponent                  - Message in file
>> c:\servicemix_tutorial\
>> tutorial\poller\testing.xml could not be handled successfully: null
>> java.lang.NullPointerException
>>        at
>> org.apache.servicemix.jms.standard.StandardProviderProcessor.process(
>> StandardProviderProcessor.java:71)
>>        at
>> org.apache.servicemix.soap.SoapEndpoint.process(SoapEndpoint.java:368
>> )
>>        at
>> org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLi
>> feCycle.java:627)
>>        at
>> org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(Async
>> BaseLifeCycle.java:581)
>>        at
>> org.apache.servicemix.common.AsyncBaseLifeCycle.onMessageExchange(Asy
>> ncBaseLifeCycle.java:535)
>>        at
>> org.apache.servicemix.common.SyncLifeCycleWrapper.onMessageExchange(S
>> yncLifeCycleWrapper.java:60)
>>        at
>> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBoun
>> d(DeliveryChannelImpl.java:623)
>>        at
>> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlo
>> w.java:172)
>>        at
>> org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.j
>> ava:168)
>>        at
>> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.jav
>> a:134)
>>        at
>> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
>> utor.java:650)
>>        at
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
>> .java:675)
>>        at java.lang.Thread.run(Thread.java:595)
>>
>> My jms su xbean.xml is as follows:
>>
>> <beans xmlns:jms="http://servicemix.apache.org/jms/1.0"
>>       xmlns:tut="urn:servicemix:tutorial"
>>       xmlns:util="http://www.springframework.org/schema/util">
>>
>>    <jms:endpoint service="tut:jms"
>>                  endpoint="myQueue"
>>                  role="provider"
>>                  processorName="standard"
>>                  destinationStyle="queue"
>>                  jmsProviderDestinationName="JRR.TESTIN.Q"
>>                  defaultMep="http://www.w3.org/2004/08/wsdl/in-out"
>>                  connectionFactory="#mqConnectionFactory"/>
>>
>>  <bean id="mqConnectionFactory"
>> class="com.ibm.mq.jms.MQQueueConnectionFactory">
>>    <property name="transportType" value="1" />
>>    <property name="queueManager" value="LEUSEG05" />
>>    <property name="hostName" value="leuseg05.leinternal.com" />
>>    <property name="channel" value="java.channel" />
>>    <property name="port" value="1416" />
>>  </bean>
>>
>> </beans>
>>
>> Any suggestions? I do see that the defaultMEP property in my xbean is
>> in-out
>> but the error message references inOnly.
>>
>> Thanks,
>> Jeremy
>> --
>> View this message in context:
>> http://www.nabble.com/Servicemix-JMS-and-Websphere-MQ-tp25082012p25082012.html
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/Servicemix-JMS-and-Websphere-MQ-tp25082012p25117746.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.