You should try with servicemix-jms instead.  You need to set
the needJavaIdentifiers="true" attribute.
For the lightweight components, you can also set this property
on the JmsMarshaler for your component:
 <bean class="org.apache.servicemix.components.jms.JmsReceiverComponent">
   <property name="marshaler">
     <bean class="org.apache.servicemix.components.jms.JmsMarshaler">
       <property name="needJavaIdentifiers" value="true" />
     </bean>
   </property>

On 10/17/06, Sharon Yin <[EMAIL PROTECTED]> wrote:
Hi,

When I use JmsSenderComponent to send out a message to a external Websphere
MQ queue,
the org.apache.servicemix.components.jms.JmsMarshaler got a exception:
====================================================================================

Caused by:
javax.jms.MessageFormatException: MQJMS1058:Invalid message property name:
Content-Length
        at 
com.ibm.jms.JMSMessage.newMessageFormatException(JMSMessage.java:4674)
        at com.ibm.jms.JMSMessage.setObjectProperty(JMSMessage.java:5564)
        at
org.apache.servicemix.components.jms.JmsMarshaler.addJmsProperties(JmsMarshaler.java:105)

        at
org.apache.servicemix.components.jms.JmsMarshaler.createMessage(JmsMarshaler.java:73)

        at
org.apache.servicemix.components.jms.JmsSenderComponent$1.createMessage(JmsSenderComponent.java:84)

        at org.springframework.jms.core.JmsTemplate.doSend(JmsTemplate.java:508)
        at
org.springframework.jms.core.JmsTemplate$3.doInJms(JmsTemplate.java:488)
        at 
org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:429)
        at org.springframework.jms.core.JmsTemplate.send(JmsTemplate.java:485)
        at org.springframework.jms.core.JmsTemplate.send(JmsTemplate.java:471)
        at
org.apache.servicemix.components.jms.JmsSenderComponent.process(JmsSenderComponent.java:81)

        at
org.apache.servicemix.components.util.OutBinding.onMessageExchange(OutBinding.java:49)

        at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:624)

===================================================================================


The property "Content-Length" may be set by HttpConnector when receiving
http request.
If I use quartz to send message, this exception won't be created, I tested.

I read the code of JmsMarshaler, it already use the method " boolean
isJavaIdentifier(String s)" to filter the invalid property name, but the
"Content-Length" still go to the line "message.setObjectProperty(name,
value);" [JmsMarshaler:105]
I really got confused!
Is it a bug?

Thanks,
Sharon.

_________________________________________________________________
免费下载 MSN Explorer:   http://explorer.msn.com/lccn/




--
Cheers,
Guillaume Nodet

Reply via email to