You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "Mills, Gary (GE Digital)" <ga...@ge.com> on 2018/05/01 00:57:39 UTC

dataFormats in blueprint xml dsl is not working don't know if a bug

Hello,  don’t know if this is a bug or I'm missing something?????

I'm trying to use 
    <dataFormats>
		<json id="Json2Pojo" library="Jackson" unmarshalTypeName="com.passthru.core.entities.TokenEntities"/>
	</dataFormats>

But it keeps throwing a Unable to start blueprint container for bundle passthrumt1.core and it doesn't matter where I put it in the blueprint xml under the camelContext ????

Caused by: org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'dataFormats'. One of '{"http://camel.apache.org/schema/blueprint":onException, "http://camel.apache.org/schema/blueprint":onCompletion, "http://camel.apache.org/schema/blueprint":intercept, "http://camel.apache.org/schema/blueprint":interceptFrom, "http://camel.apache.org/schema/blueprint":interceptSendToEndpoint, "http://camel.apache.org/schema/blueprint":restConfiguration, "http://camel.apache.org/schema/blueprint":rest, "http://camel.apache.org/schema/blueprint":route}' is expected.

   <camelContext     
      id="com.ge.digital.passthru.coreCamelContext"
      trace="true"
      xmlns="http://camel.apache.org/schema/blueprint"
      allowUseOriginalMessage="false"
      streamCache="true"
      errorHandlerRef="deadLetterErrorHandler" >

    <properties>
        <property key="http.proxyHost" value="PITC-Zscaler-Americas-Cincinnati3PR.proxy.corporate.gtm.ge.com"/>
        <property key="http.proxyPort" value="80"/>
    </properties>
					<!-- PITC-Zscaler-Americas-Cincinnati3PR.proxy.corporate.ge.com      
					canonical name = PITC-Zscaler-Americas-Cincinnati3PR.proxy.corporate.gtm.ge.com
					Name:   PITC-Zscaler-Americas-Cincinnati3PR.proxy.corporate.gtm.ge.com
					Address: 10.114.19.201  -->
 
 	<streamCaching 	id="CacheConfig" 
  					spoolUsedHeapMemoryThreshold="70" 
  					anySpoolRules="true"/>

    <dataFormats>
		<json id="Json2Pojo" library="Jackson" unmarshalTypeName="com.ge.digital.passthru.core.entities.TokenEntities"/>
	</dataFormats>
	  
  	<endpoint id="predixConsumer" uri="direct:predixConsumer" />
  	<endpoint id="predixProducer" uri="direct:predixProducer" />
  	<endpoint id="getToken" uri="direct:getToken" />


Gary Lee Mills
Work:  331-777-2318
Cell:     630-607-9639



Re: dataFormats in blueprint xml dsl is not working don't know if a bug

Posted by Jan Bednář <ma...@janbednar.eu>.
This is not a bug, your XML is not valid agains XSD 
https://camel.apache.org/schema/blueprint/camel-blueprint.xsd .

This question was already asked on 
https://stackoverflow.com/questions/50109617/camel-dataformat-jackson-using-blueprint-xml-dsl-throws-context-exception

Move your endpoind declarations right above dataformats. See sequence 
camelContextFactoryBean in XSD for more details