camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Willem Jiang <willem.ji...@gmail.com>
Subject Re: Errors parsing camel-context.xml
Date Fri, 04 Dec 2009 01:25:51 GMT
Which version of ServiceMix are you using?
Can you past your camel-context file?

Maybe you are not using a right version of camel-spring schema ?

Willem

Pete Mueller wrote:
> Hello, 
> 
> I am receiving the following error trying to start up my camel routing
> bundle with a camel-context.xml in it. 
> 
> The error is:
> org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line
> 16 in XML document from URL
> [bundle://135.0:0/META-INF/spring/camel-context.xml] is invalid; nested
> exception is org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid
> content was found starting with element 'json'. One of
> '{"http://camel.apache.org/schema/spring":artixDS,
> "http://camel.apache.org/schema/spring":bindy,
> "http://camel.apache.org/schema/spring":csv,
> "http://camel.apache.org/schema/spring":flatpack,
> "http://camel.apache.org/schema/spring":gzip,
> "http://camel.apache.org/schema/spring":hl7,
> "http://camel.apache.org/schema/spring":jaxb,
> "http://camel.apache.org/schema/spring":json,
> "http://camel.apache.org/schema/spring":rss,
> "http://camel.apache.org/schema/spring":secureXML,
> "http://camel.apache.org/schema/spring":serialization,
> "http://camel.apache.org/schema/spring":string,
> "http://camel.apache.org/schema/spring":tidyMarkup,
> "http://camel.apache.org/schema/spring":xmlBeans,
> "http://camel.apache.org/schema/spring":xstream,
> "http://camel.apache.org/schema/spring":zip}' is expected.
> 
> Clearly from the error, it shows that "json" is an allowed element. but SAX
> says otherwise.  Any idea how to reconcile this?  I have a similar error
> with using the placeholderPrefix attribute inside a property-placeholder
> element.
> 
> Thanks,
> -p
> 
> Here are relevant portions of my camel-context.xml if it helps.  I thought
> perhaps I'm using the wrong schema. 
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <beans xmlns="http://www.springframework.org/schema/beans"
> 	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:context="http://www.springframework.org/schema/context"
> 	xmlns:osgi="http://www.springframework.org/schema/osgi"
> xmlns:osgix="http://www.springframework.org/schema/osgi-compendium"
> 	xmlns:camel="http://camel.apache.org/schema/spring"
> 
> 	xsi:schemaLocation="http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans.xsd
> 		http://www.springframework.org/schema/context
> http://www.springframework.org/schema/context/spring-context.xsd
> 		http://www.springframework.org/schema/osgi
> http://www.springframework.org/schema/osgi/spring-osgi.xsd
> 		http://www.springframework.org/schema/osgi-compendium
> http://www.springframework.org/schema/osgi-compendium/spring-osgi-compendium.xsd
> 		http://camel.apache.org/schema/spring
> http://camel.apache.org/schema/spring/camel-spring.xsd">
> 
> 	<context:property-placeholder properties-ref="camelProps"
> placeholderPrefix="#{" placeholderSuffix="}" />
> 	<camel:dataFormats> 
> 	  <json id="jsonMessage" library="Jackson"
> unmarshalTypeName="com.routecloud.bean.Message" /> 
> 	</camel:dataFormats>
> 	
> ...


Mime
View raw message