You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Christian Graf <ch...@knapp.com> on 2009/07/09 15:42:36 UTC

Missing Text in XML Message after sending it thru the jms component

Hi,

i just installed service mix 3.3.1 and deployed my components there.
I tried to send my messages thru the system but when they come out of the
jms queue all text nodes are removed.
The message first looks this way:

INFO  - OsrTcpConsumerMarshaler        - Putting message on bus: <?xml
version="1.0" encoding="UTF-8"?>                                                                       
<LCPROT route="WMS_LCP" service="SSSUBSYSTEM" version="1.1">                                                                                                                  
<REQUEST>MARRIAGE_CONTAINER</REQUEST>                                                                                                                                       
<REQUESTID>1247146808301</REQUESTID>                                                                                                                                        
<MARRIAGE_CONTAINER>                                                                                                                                                        
<DATAFORMAT>SSSUBSYSTEM.XML</DATAFORMAT>                                                                                                                                  
<DATATYPE>TEXT</DATATYPE>                                                                                                                                                 
    <DATA format="SSSUBSYSTEM.XML" name="osr2wms" type="TEXT">&lt;?xml
version="1.0" encoding="UTF-8"?&gt;                                                                    
&lt;osr2wms&gt;                                                                                                                                                               
  &lt;imp_event action="MARRIAGE" dcr="2009-07-09 15:40:08" errorid="0"
sub_action="CONTAINER" systemid="02"&gt;                                                              
    &lt;imp_container cntno="11222" conttypeid="605314" errorid="0"
licenceplate="11222" wpono="11"/&gt;                                                                      
&lt;/imp_event&gt;                                                                                                                                                          
&lt;/osr2wms&gt;                                                                                                                                                              
</DATA>                                                                                                                                                                       
</MARRIAGE_CONTAINER>                                                                                                                                                       
</LCPROT> 

after the JMS Qeue it looks this way:
Received from bus: <?xml version="1.0" encoding="UTF-8"?><LCPROT
route="WMS_LCP" service="SSSUBSYSTEM"
version="1.1"><REQUEST>MARRIAGE_CONTAINER</REQUEST><REQUESTID>1247146808301</REQUESTID><MARRIAGE_CONTAINER><DATAFORMAT>SSSUBSYSTEM.XML</DATAFORMAT><DATATYPE>TEXT</DATATYPE><DATA
format="SSSUBSYSTEM.XML" name="osr2wms"
type="TEXT"/></MARRIAGE_CONTAINER></LCPROT>

as you can see all text nodes are removed. This did not happen when i used
servicemix 3.3.

This is the way how i read the messages:
SourceTransformer transformer = new SourceTransformer();
String content = transformer.contentToString(in);
String msg = "Received from bus: " + content;

I also checked the database and when i look at the blob as ascii i can see
the complete message with the text nodes.

Regards,
Christian

-- 
View this message in context: http://www.nabble.com/Missing-Text-in-XML-Message-after-sending-it-thru-the-jms-component-tp24410355p24410355.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Missing Text in XML Message after sending it thru the jms component

Posted by Christian Graf <ch...@knapp.com>.
Hi,

i found the problem. I read the normalized in message 2 times and that
caused to problem :(
I guess in 3.3 that was okay, but in 3.3.1 it's not okay anymore. 

Regards,
Christian
-- 
View this message in context: http://www.nabble.com/Missing-Text-in-XML-Message-after-sending-it-thru-the-jms-component-tp24410355p24423869.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


RE: Missing Text in XML Message after sending it thru the jms component

Posted by Madesclair Vivian <vm...@sopragroup.com>.
You're welcome!
The weird thing is... I am using 3.3 ...  ^^

Regards,
Vivian
	

-----Message d'origine-----
De : Christian Graf [mailto:christian.graf@knapp.com] 
Envoyé : vendredi 10 juillet 2009 11:02
À : users@servicemix.apache.org
Objet : RE: Missing Text in XML Message after sending it thru the jms component


Thanks a lot,
i did read the normalized in message 2 times. That was the fault. That worked in 3.3 but not in 3.3.1.
I guess there was a default caching or so in the previous version.

Regards,
Christian
--
View this message in context: http://www.nabble.com/Missing-Text-in-XML-Message-after-sending-it-thru-the-jms-component-tp24410355p24423937.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


RE: Missing Text in XML Message after sending it thru the jms component

Posted by Christian Graf <ch...@knapp.com>.
Thanks a lot,
i did read the normalized in message 2 times. That was the fault. That
worked in 3.3 but not in 3.3.1.
I guess there was a default caching or so in the previous version.

Regards,
Christian 
-- 
View this message in context: http://www.nabble.com/Missing-Text-in-XML-Message-after-sending-it-thru-the-jms-component-tp24410355p24423937.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


RE: Missing Text in XML Message after sending it thru the jms component

Posted by Madesclair Vivian <vm...@sopragroup.com>.
Hi Christian,

I got a similar error before. I was extracting the content of a Source 2 times and apparently you can only do that once. You should check if, one way or another, your variable "in" that seems to be of type Source (I don't have enough of your code to be sure though), is not used twice to extract its content.

Regards,
Vivian



-----Message d'origine-----
De : Christian Graf [mailto:christian.graf@knapp.com] 
Envoyé : jeudi 9 juillet 2009 16:49
À : users@servicemix.apache.org
Objet : Re: Missing Text in XML Message after sending it thru the jms component


Hi again,

i manually added a "\n" after the "<![CDATA[" and now it works. My message is complete. I do not really understand why this works....

But now i get the following exception:
[Fatal Error] :-1:-1: Premature end of file.                                                                                                                                  
ERROR - LcpMessageHandler              - Error writing LCP-Message                                                                                                            
javax.xml.transform.TransformerException: org.xml.sax.SAXParseException:
Premature end of file.                                                                               
        at
org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:501)                                                                   
        at
com.knapp.bus.tcpbc.handler.lcp.LcpMessageHandler.writeLcpMessage(LcpMessageHandler.java:216)                                                                      
        at
com.knapp.bus.tcpbc.handler.lcp.LcpMessageHandler.writeMessage(LcpMessageHandler.java:198)                                                                         
        at
com.knapp.bus.tcpbc.marshaler.lcp.LcpTcpProviderMarshaler.createRequest(LcpTcpProviderMarshaler.java:64)                                                           
        at
com.knapp.bus.tcpbc.TcpProviderEndpoint.processInOnly(TcpProviderEndpoint.java:136)                                                                                
        at
org.apache.servicemix.common.endpoints.ProviderEndpoint.process(ProviderEndpoint.java:102)                                                                         
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:627)                                                                             
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:581)                                                                       
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.onMessageExchange(AsyncBaseLifeCycle.java:535)                                                                     
        at
org.apache.servicemix.common.SyncLifeCycleWrapper.onMessageExchange(SyncLifeCycleWrapper.java:60)                                                                  
        at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:623)                                                               
        at
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:172)                                                                                   
        at
org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:168)                                                                                      
        at
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)                                                                                        
        at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)                                                                                
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)                                                                                    
        at java.lang.Thread.run(Thread.java:619)                                                                                                                              
Caused by: org.xml.sax.SAXParseException: Premature end of file.                                                                                                              
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)                                                                                                  
        at
org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:484)                                                                   
        ... 16 more                                                                                                                                                           
---------                                                                                                                                                                     
org.xml.sax.SAXParseException: Premature end of file.                                                                                                                         
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)                                                                                                  
        at
org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:484)                                                                   
        at
com.knapp.bus.tcpbc.handler.lcp.LcpMessageHandler.writeLcpMessage(LcpMessageHandler.java:216)                                                                      
        at
com.knapp.bus.tcpbc.handler.lcp.LcpMessageHandler.writeMessage(LcpMessageHandler.java:198)                                                                         
        at
com.knapp.bus.tcpbc.marshaler.lcp.LcpTcpProviderMarshaler.createRequest(LcpTcpProviderMarshaler.java:64)                                                           
        at
com.knapp.bus.tcpbc.TcpProviderEndpoint.processInOnly(TcpProviderEndpoint.java:136)                                                                                
        at
org.apache.servicemix.common.endpoints.ProviderEndpoint.process(ProviderEndpoint.java:102)                                                                         
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:627)                                                                             
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:581)                                                                       
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.onMessageExchange(AsyncBaseLifeCycle.java:535)                                                                     
        at
org.apache.servicemix.common.SyncLifeCycleWrapper.onMessageExchange(SyncLifeCycleWrapper.java:60)                                                                  
        at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:623)                                                               
        at
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:172)                                                                                   
        at
org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:168)                                                                                      
        at
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)                                                                                        
        at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)                                                                                
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)                                                                                    
        at java.lang.Thread.run(Thread.java:619) 

Regards,
Christian
--
View this message in context: http://www.nabble.com/Missing-Text-in-XML-Message-after-sending-it-thru-the-jms-component-tp24410355p24410717.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Missing Text in XML Message after sending it thru the jms component

Posted by Christian Graf <ch...@knapp.com>.
Hi again,

i manually added a "\n" after the "<![CDATA[" and now it works. My message
is complete. I do not really understand why this works....

But now i get the following exception:
[Fatal Error] :-1:-1: Premature end of file.                                                                                                                                  
ERROR - LcpMessageHandler              - Error writing LCP-Message                                                                                                            
javax.xml.transform.TransformerException: org.xml.sax.SAXParseException:
Premature end of file.                                                                               
        at
org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:501)                                                                   
        at
com.knapp.bus.tcpbc.handler.lcp.LcpMessageHandler.writeLcpMessage(LcpMessageHandler.java:216)                                                                      
        at
com.knapp.bus.tcpbc.handler.lcp.LcpMessageHandler.writeMessage(LcpMessageHandler.java:198)                                                                         
        at
com.knapp.bus.tcpbc.marshaler.lcp.LcpTcpProviderMarshaler.createRequest(LcpTcpProviderMarshaler.java:64)                                                           
        at
com.knapp.bus.tcpbc.TcpProviderEndpoint.processInOnly(TcpProviderEndpoint.java:136)                                                                                
        at
org.apache.servicemix.common.endpoints.ProviderEndpoint.process(ProviderEndpoint.java:102)                                                                         
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:627)                                                                             
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:581)                                                                       
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.onMessageExchange(AsyncBaseLifeCycle.java:535)                                                                     
        at
org.apache.servicemix.common.SyncLifeCycleWrapper.onMessageExchange(SyncLifeCycleWrapper.java:60)                                                                  
        at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:623)                                                               
        at
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:172)                                                                                   
        at
org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:168)                                                                                      
        at
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)                                                                                        
        at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)                                                                                
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)                                                                                    
        at java.lang.Thread.run(Thread.java:619)                                                                                                                              
Caused by: org.xml.sax.SAXParseException: Premature end of file.                                                                                                              
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)                                                                                                  
        at
org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:484)                                                                   
        ... 16 more                                                                                                                                                           
---------                                                                                                                                                                     
org.xml.sax.SAXParseException: Premature end of file.                                                                                                                         
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)                                                                                                  
        at
org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:484)                                                                   
        at
com.knapp.bus.tcpbc.handler.lcp.LcpMessageHandler.writeLcpMessage(LcpMessageHandler.java:216)                                                                      
        at
com.knapp.bus.tcpbc.handler.lcp.LcpMessageHandler.writeMessage(LcpMessageHandler.java:198)                                                                         
        at
com.knapp.bus.tcpbc.marshaler.lcp.LcpTcpProviderMarshaler.createRequest(LcpTcpProviderMarshaler.java:64)                                                           
        at
com.knapp.bus.tcpbc.TcpProviderEndpoint.processInOnly(TcpProviderEndpoint.java:136)                                                                                
        at
org.apache.servicemix.common.endpoints.ProviderEndpoint.process(ProviderEndpoint.java:102)                                                                         
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:627)                                                                             
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:581)                                                                       
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.onMessageExchange(AsyncBaseLifeCycle.java:535)                                                                     
        at
org.apache.servicemix.common.SyncLifeCycleWrapper.onMessageExchange(SyncLifeCycleWrapper.java:60)                                                                  
        at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:623)                                                               
        at
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:172)                                                                                   
        at
org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:168)                                                                                      
        at
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)                                                                                        
        at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)                                                                                
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)                                                                                    
        at java.lang.Thread.run(Thread.java:619) 

Regards,
Christian
-- 
View this message in context: http://www.nabble.com/Missing-Text-in-XML-Message-after-sending-it-thru-the-jms-component-tp24410355p24410717.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.