I have just fixed that.
You can now add the needJavaIdentifiers="true" attribute so that all
non valid properties will be skipped.
Note that the Content-Type property has been renamed to MimeContentType
so that mime streams can still be sent.

On 8/21/06, Klaus Alfert <[EMAIL PROTECTED]> wrote:

Hi Folks,

I have a problem connecting service mix via the servicemix-jms component to
a WebSphereMQ Queue.

My provider configuration is as follows:
<!-- Reads a message from the NMR and writes them to XNEAIDV3.SMIX.TEST.2
-->
                <jms:endpoint service="dz:MyProviderService"
                endpoint="myProvider"
                role="provider"
                destinationStyle="queue"
                jmsProviderDestinationName="XNEAIDV3.SMIX.TEST.2"
                connectionFactory="#jmsFactory"
                />

The message sent is as follows:
<?xml version="1.0" encoding="UTF-8"?>
<sample id="0">
  here is some testdata
</sample>


I get the following exception:
javax.jms.MessageFormatException: MQJMS1058: Invalid message property name:
Content-Type
        at
com.ibm.jms.JMSMessage.newMessageFormatException(JMSMessage.java:4674)
        at com.ibm.jms.JMSMessage.setStringProperty(JMSMessage.java:5658)
        at
org.apache.servicemix.jms.multiplexing.MultiplexingProviderProcessor.process(MultiplexingProviderProcessor.java:182)
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:398)
        at
org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:43)
        at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:623)
        at
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:169)
        at
org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:177)
        at
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:227)
        at
org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.java:291)
        at
EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Thread.java:595)

As far as I understand the code, in line 182 of
MultiplexingProviderProcessor the property "Content-Type" is set to the
value defined in the normalized message (according to
http://issues.apache.org/activemq/browse/SM-502). But "Content-Type" is not
a proper name for a JMS property (at least according to SM-398 and SM-403, I
did not check the JMS spec myself) and WebSphereMQ chokes immediately.

The discussion of SM-502 indicates that the Content-Type property is
required for SOAP and SAAJ. However, my configuration does not use SOAP at
all (which shall be the default case according to the docs). I am also not
sure whether it is needed to set the content type property to the JMS
message. I would expect the content-type as a part of the message payload
itself but I am by no means an expert of the SOAP/JMS on the wire format.

A final remark: In contrast to the marshaler in the older lightweight jms
component, there is no checking of valid header names in the loop
immediately before line 182. This looks like an additionally potential error
source.

A simple workaround is to catch and silently ignore exceptions when setting
the message properties.

Cheers,
Klaus.

--
View this message in context: 
http://www.nabble.com/Exceptions-in-servicemix-jms-with-WebSphereMQ-tf2141329.html#a5910358
Sent from the ServiceMix - Dev forum at Nabble.com.




--
Cheers,
Guillaume Nodet

Reply via email to