camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From TomStrummer <tomstrum...@gmail.com>
Subject Re: POJO services using Serializable objects as messages
Date Tue, 04 Nov 2008 16:23:02 GMT

Thanks  James!  I actually didn't see that data format page, but that's
incredibly helpful.  I haven't been able to find a good reference for the
routebuilder DSL (or the XML, for that matter).

Anyway, my routes now look like the following:

    	from("timer://tutorial?fixedRate=true&delay=3000&period=10000")
    		.to("bean:bidRetriever")
    		.marshal().serialization()
    	
.to("jbi:endpoint:urn:org:apache:servicemix:tutorial:camel:jms:provider");
    		
    
from("jbi:endpoint:urn:org:apache:servicemix:tutorial:camel:jms:consumer")
    		.unmarshal().serialization()
    		.to("bean:bidPersistence")
    		.to("log:tom-bidList");

and I get the following exception in the ServiceMix console:

[Fatal Error] :1:1: Content is not allowed in prolog.
ERROR - JmsComponent                   - Error processing exchange InOnly[
  id: ID:172.16.10.203-11d68451ce3-2:0
  status: Active
  role: provider
  endpoint: provider
  in: Unable to display: org.xml.sax.SAXParseException: Content is not
allowed in prolog.
]
org.springframework.jms.UncategorizedJmsException: Uncategorized exception
occured during JMS processing; nested exception is javax.jms.JMSException:
Failed to create JMS Message: javax.xml.transform.TransformerException:
org.xml.sax.SAXParseException: Content is not allowed in prolog.; nested
exception is javax.xml.transform.TransformerException:
org.xml.sax.SAXParseException: Content is not allowed in prolog.
Caused by:
javax.jms.JMSException: Failed to create JMS Message:
javax.xml.transform.TransformerException: org.xml.sax.SAXParseException:
Content is not allowed in prolog.
        at
org.apache.servicemix.jms.endpoints.JmsProviderEndpoint$1.createMessage(JmsProviderEndpoint.java:358)
        at
org.springframework.jms.core.JmsTemplate.doSend(JmsTemplate.java:507)
        at
org.springframework.jms.core.JmsTemplate$3.doInJms(JmsTemplate.java:487)
        at
org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:428)
        at
org.springframework.jms.core.JmsTemplate.send(JmsTemplate.java:484)
        at
org.springframework.jms.core.JmsTemplate.send(JmsTemplate.java:470)
        at
org.apache.servicemix.jms.endpoints.JmsProviderEndpoint.processInOnly(JmsProviderEndpoint.java:371)
        at
org.apache.servicemix.common.endpoints.ProviderEndpoint.process(ProviderEndpoint.java:100)
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:538)
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:490)
        at
org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46)
        at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:610)
        at
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:172)
        at
org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:167)
        at
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
        at java.lang.Thread.run(Thread.java:619)
Caused by: javax.xml.transform.TransformerException:
org.xml.sax.SAXParseException: Content is not allowed in prolog.
        at
org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:501)
        at
org.apache.servicemix.jbi.jaxp.SourceTransformer.toResult(SourceTransformer.java:125)
        at
org.apache.servicemix.jbi.jaxp.SourceTransformer.toResult(SourceTransformer.java:103)
        at
org.apache.servicemix.jbi.jaxp.SourceTransformer.toString(SourceTransformer.java:140)
        at
org.apache.servicemix.jbi.jaxp.SourceTransformer.contentToString(SourceTransformer.java:161)
        at
org.apache.servicemix.jms.endpoints.DefaultProviderMarshaler.createMessage(DefaultProviderMarshaler.java:52)
        at
org.apache.servicemix.jms.endpoints.JmsProviderEndpoint$1.createMessage(JmsProviderEndpoint.java:352)
        ... 17 more
Caused by: org.xml.sax.SAXParseException: Content is not allowed in prolog.
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
        at
org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:484)
        ... 23 more


Is that because JBI requires the message to be in XML?

Thanks again.
-- 
View this message in context: http://www.nabble.com/POJO-services-using-Serializable-objects-as-messages-tp20311335s22882p20325597.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Mime
View raw message