You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by lekkie <le...@gmail.com> on 2009/11/19 15:19:39 UTC

unexpected element (uri:"http://activemq.apache.org/camel/schema/osgi", local:"camelContext")

I found the ffg err after deployin an OSGI bundle below

<osgi:camelContext xmlns="http://activemq.apache.org/camel/schema/spring">
		<route>
			<from uri="jms:queue:RequestQueue" />
			<bean ref="RecipientList" method="route" /> 
		</route>
	</osgi:camelContext>

It seems servicemix didnt like the namespace.

org.springframework.beans.factory.BeanDefinitionStoreException: Failed to
parse JAXB element: javax.xml.bind.UnmarshalException: unexpected element
(uri:"http://activemq.apache.org/camel/schema/osgi", local:"camelContext").
Expected elements are
<{http://camel.apache.org/schema/spring}aggregate>,<{http://camel.apache.org/schema/spring}aop>,<{http://camel.apache.org/schema/spring}batchResequencerConfig>,<{http://camel.apache.org/schema/spring}bean>,<{http://camel.apache.org/schema/spring}beanPostProcessor>,<{http://camel.apache.org/schema/spring}bindy>,<{http://camel.apache.org/schema/osgi}camelContext>,<{http://camel.apache.org/schema/spring}camelContext>,<{http://camel.apache.org/schema/spring}castor>,<{http://camel.apache.org/schema/spring}choice>,<{http://camel.apache.org/schema/spring}constant>,<{http://camel.apache.org/schema/spring}consumerTemplate>,<{http://camel.apache.org/schema/spring}convertBodyTo>,<{http://camel.apache.org/schema/spring}csv>,<{http://camel.apache.org/schema/spring}dataFormats>,<{http://camel.apache.org/schema/spring}delay>,<{http://camel.apache.org/schema/spring}description>,<{http://camel.apache.org/schema/spring}doCatch>,<{http://camel.apache.org/schema/spring}doFinally>,<{http://camel.apache.org/schema/spring}doTry>,<{http://camel.apache.org/schema/spring}el>,<{http://camel.apache.org/schema/spring}endpoint>,<{http://camel.apache.org/schema/spring}enrich>,<{http://camel.apache.org/schema/spring}export>,<{http://camel.apache.org/schema/spring}expression>,<{http://camel.apache.org/schema/spring}expressionDefinition>,<{http://camel.apache.org/schema/spring}failover>,<{http://camel.apache.org/schema/spring}filter>,<{http://camel.apache.org/schema/spring}flatpack>,<{http://camel.apache.org/schema/spring}from>,<{http://camel.apache.org/schema/spring}groovy>,<{http://camel.apache.org/schema/spring}gzip>,<{http://camel.apache.org/schema/spring}header>,<{http://camel.apache.org/schema/spring}hl7>,<{http://camel.apache.org/schema/spring}idempotentConsumer>,<{http://camel.apache.org/schema/spring}inOnly>,<{http://camel.apache.org/schema/spring}inOut>,<{http://camel.apache.org/schema/spring}intercept>,<{http://camel.apache.org/schema/spring}interceptFrom>,<{http://camel.apache.org/schema/spring}interceptToEndpoint>,<{http://camel.apache.org/schema/spring}javaScript>,<{http://camel.apache.org/schema/spring}jaxb>,<{http://camel.apache.org/schema/spring}jmxAgent>,<{http://camel.apache.org/schema/spring}json>,<{http://camel.apache.org/schema/spring}jxpath>,<{http://camel.apache.org/schema/spring}language>,<{http://camel.apache.org/schema/spring}loadBalance>,<{http://camel.apache.org/schema/spring}loop>,<{http://camel.apache.org/schema/spring}marshal>,<{http://camel.apache.org/schema/spring}method>,<{http://camel.apache.org/schema/spring}multicast>,<{http://camel.apache.org/schema/spring}mvel>,<{http://camel.apache.org/schema/spring}ognl>,<{http://camel.apache.org/schema/spring}onCompletion>,<{http://camel.apache.org/schema/spring}onException>,<{http://camel.apache.org/schema/spring}otherwise>,<{http://camel.apache.org/schema/spring}packageScan>,<{http://camel.apache.org/schema/spring}php>,<{http://camel.apache.org/schema/spring}pipeline>,<{http://camel.apache.org/schema/spring}policy>,<{http://camel.apache.org/schema/spring}pollEnrich>,<{http://camel.apache.org/schema/spring}process>,<{http://camel.apache.org/schema/spring}properties>,<{http://camel.apache.org/schema/spring}property>,<{http://camel.apache.org/schema/spring}proxy>,<{http://camel.apache.org/schema/spring}python>,<{http://camel.apache.org/schema/spring}random>,<{http://camel.apache.org/schema/spring}recipientList>,<{http://camel.apache.org/schema/spring}redeliveryPolicy>,<{http://camel.apache.org/schema/spring}removeHeader>,<{http://camel.apache.org/schema/spring}removeProperty>,<{http://camel.apache.org/schema/spring}resequence>,<{http://camel.apache.org/schema/spring}rollback>,<{http://camel.apache.org/schema/spring}roundRobin>,<{http://camel.apache.org/schema/spring}route>,<{http://camel.apache.org/schema/spring}routeBuilder>,<{http://camel.apache.org/schema/spring}routes>,<{http://camel.apache.org/schema/spring}routingSlip>,<{http://camel.apache.org/schema/spring}rss>,<{http://camel.apache.org/schema/spring}ruby>,<{http://camel.apache.org/schema/spring}secureXML>,<{http://camel.apache.org/schema/spring}serialization>,<{http://camel.apache.org/schema/spring}setBody>,<{http://camel.apache.org/schema/spring}setExchangePattern>,<{http://camel.apache.org/schema/spring}setHeader>,<{http://camel.apache.org/schema/spring}setOutHeader>,<{http://camel.apache.org/schema/spring}setProperty>,<{http://camel.apache.org/schema/spring}simple>,<{http://camel.apache.org/schema/spring}sort>,<{http://camel.apache.org/schema/spring}split>,<{http://camel.apache.org/schema/spring}sql>,<{http://camel.apache.org/schema/spring}sticky>,<{http://camel.apache.org/schema/spring}stop>,<{http://camel.apache.org/schema/spring}streamResequencerConfig>,<{http://camel.apache.org/schema/spring}string>,<{http://camel.apache.org/schema/spring}template>,<{http://camel.apache.org/schema/spring}threads>,<{http://camel.apache.org/schema/spring}throttle>,<{http://camel.apache.org/schema/spring}throwException>,<{http://camel.apache.org/schema/spring}tidyMarkup>,<{http://camel.apache.org/schema/spring}to>,<{http://camel.apache.org/schema/spring}tokenize>,<{http://camel.apache.org/schema/spring}topic>,<{http://camel.apache.org/schema/spring}transacted>,<{http://camel.apache.org/schema/spring}transform>,<{http://camel.apache.org/schema/spring}unmarshal>,<{http://camel.apache.org/schema/spring}when>,<{http://camel.apache.org/schema/spring}wireTap>,<{http://camel.apache.org/schema/spring}xmlBeans>,<{http://camel.apache.org/schema/spring}xpath>,<{http://camel.apache.org/schema/spring}xquery>,<{http://camel.apache.org/schema/spring}xstream>,<{http://camel.apache.org/schema/spring}zip>;
nested exception is javax.xml.bind.UnmarshalException: unexpected element
(uri:"http://activemq.apache.org/camel/schema/osgi", local:"camelContext").
Expected elements are
<{http://camel.apache.org/schema/spring}aggregate>,<{http://camel.apache.org/schema/spring}aop>,<{http://camel.apache.org/schema/spring}batchResequencerConfig>,<{http://camel.apache.org/schema/spring}bean>,<{http://camel.apache.org/schema/spring}beanPostProcessor>,<{http://camel.apache.org/schema/spring}bindy>,<{http://camel.apache.org/schema/osgi}camelContext>,<{http://camel.apache.org/schema/spring}camelContext>,<{http://camel.apache.org/schema/spring}castor>,<{http://camel.apache.org/schema/spring}choice>,<{http://camel.apache.org/schema/spring}constant>,<{http://camel.apache.org/schema/spring}consumerTemplate>,<{http://camel.apache.org/schema/spring}convertBodyTo>,<{http://camel.apache.org/schema/spring}csv>,<{http://camel.apache.org/schema/spring}dataFormats>,<{http://camel.apache.org/schema/spring}delay>,<{http://camel.apache.org/schema/spring}description>,<{http://camel.apache.org/schema/spring}doCatch>,<{http://camel.apache.org/schema/spring}doFinally>,<{http://camel.apache.org/schema/spring}doTry>,<{http://camel.apache.org/schema/spring}el>,<{http://camel.apache.org/schema/spring}endpoint>,<{http://camel.apache.org/schema/spring}enrich>,<{http://camel.apache.org/schema/spring}export>,<{http://camel.apache.org/schema/spring}expression>,<{http://camel.apache.org/schema/spring}expressionDefinition>,<{http://camel.apache.org/schema/spring}failover>,<{http://camel.apache.org/schema/spring}filter>,<{http://camel.apache.org/schema/spring}flatpack>,<{http://camel.apache.org/schema/spring}from>,<{http://camel.apache.org/schema/spring}groovy>,<{http://camel.apache.org/schema/spring}gzip>,<{http://camel.apache.org/schema/spring}header>,<{http://camel.apache.org/schema/spring}hl7>,<{http://camel.apache.org/schema/spring}idempotentConsumer>,<{http://camel.apache.org/schema/spring}inOnly>,<{http://camel.apache.org/schema/spring}inOut>,<{http://camel.apache.org/schema/spring}intercept>,<{http://camel.apache.org/schema/spring}interceptFrom>,<{http://camel.apache.org/schema/spring}interceptToEndpoint>,<{http://camel.apache.org/schema/spring}javaScript>,<{http://camel.apache.org/schema/spring}jaxb>,<{http://camel.apache.org/schema/spring}jmxAgent>,<{http://camel.apache.org/schema/spring}json>,<{http://camel.apache.org/schema/spring}jxpath>,<{http://camel.apache.org/schema/spring}language>,<{http://camel.apache.org/schema/spring}loadBalance>,<{http://camel.apache.org/schema/spring}loop>,<{http://camel.apache.org/schema/spring}marshal>,<{http://camel.apache.org/schema/spring}method>,<{http://camel.apache.org/schema/spring}multicast>,<{http://camel.apache.org/schema/spring}mvel>,<{http://camel.apache.org/schema/spring}ognl>,<{http://camel.apache.org/schema/spring}onCompletion>,<{http://camel.apache.org/schema/spring}onException>,<{http://camel.apache.org/schema/spring}otherwise>,<{http://camel.apache.org/schema/spring}packageScan>,<{http://camel.apache.org/schema/spring}php>,<{http://camel.apache.org/schema/spring}pipeline>,<{http://camel.apache.org/schema/spring}policy>,<{http://camel.apache.org/schema/spring}pollEnrich>,<{http://camel.apache.org/schema/spring}process>,<{http://camel.apache.org/schema/spring}properties>,<{http://camel.apache.org/schema/spring}property>,<{http://camel.apache.org/schema/spring}proxy>,<{http://camel.apache.org/schema/spring}python>,<{http://camel.apache.org/schema/spring}random>,<{http://camel.apache.org/schema/spring}recipientList>,<{http://camel.apache.org/schema/spring}redeliveryPolicy>,<{http://camel.apache.org/schema/spring}removeHeader>,<{http://camel.apache.org/schema/spring}removeProperty>,<{http://camel.apache.org/schema/spring}resequence>,<{http://camel.apache.org/schema/spring}rollback>,<{http://camel.apache.org/schema/spring}roundRobin>,<{http://camel.apache.org/schema/spring}route>,<{http://camel.apache.org/schema/spring}routeBuilder>,<{http://camel.apache.org/schema/spring}routes>,<{http://camel.apache.org/schema/spring}routingSlip>,<{http://camel.apache.org/schema/spring}rss>,<{http://camel.apache.org/schema/spring}ruby>,<{http://camel.apache.org/schema/spring}secureXML>,<{http://camel.apache.org/schema/spring}serialization>,<{http://camel.apache.org/schema/spring}setBody>,<{http://camel.apache.org/schema/spring}setExchangePattern>,<{http://camel.apache.org/schema/spring}setHeader>,<{http://camel.apache.org/schema/spring}setOutHeader>,<{http://camel.apache.org/schema/spring}setProperty>,<{http://camel.apache.org/schema/spring}simple>,<{http://camel.apache.org/schema/spring}sort>,<{http://camel.apache.org/schema/spring}split>,<{http://camel.apache.org/schema/spring}sql>,<{http://camel.apache.org/schema/spring}sticky>,<{http://camel.apache.org/schema/spring}stop>,<{http://camel.apache.org/schema/spring}streamResequencerConfig>,<{http://camel.apache.org/schema/spring}string>,<{http://camel.apache.org/schema/spring}template>,<{http://camel.apache.org/schema/spring}threads>,<{http://camel.apache.org/schema/spring}throttle>,<{http://camel.apache.org/schema/spring}throwException>,<{http://camel.apache.org/schema/spring}tidyMarkup>,<{http://camel.apache.org/schema/spring}to>,<{http://camel.apache.org/schema/spring}tokenize>,<{http://camel.apache.org/schema/spring}topic>,<{http://camel.apache.org/schema/spring}transacted>,<{http://camel.apache.org/schema/spring}transform>,<{http://camel.apache.org/schema/spring}unmarshal>,<{http://camel.apache.org/schema/spring}when>,<{http://camel.apache.org/schema/spring}wireTap>,<{http://camel.apache.org/schema/spring}xmlBeans>,<{http://camel.apache.org/schema/spring}xpath>,<{http://camel.apache.org/schema/spring}xquery>,<{http://camel.apache.org/schema/spring}xstream>,<{http://camel.apache.org/schema/spring}zip>
	at
org.apache.camel.spring.handler.CamelNamespaceHandler.parseUsingJaxb(CamelNamespaceHandler.java:152)
	at
org.apache.camel.spring.handler.CamelNamespaceHandler$CamelContextBeanDefinitionParser.doParse(CamelNamespaceHandler.java:211)
	at
org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser.parseInternal(AbstractSingleBeanDefinitionParser.java:84)
	at
org.springframework.beans.factory.xml.AbstractBeanDefinitionParser.parse(AbstractBeanDefinitionParser.java:56)
	at
org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:69)
	at
org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1297)
	at 
-- 
View this message in context: http://old.nabble.com/unexpected-element-%28uri%3A%22http%3A--activemq.apache.org-camel-schema-osgi%22%2C-local%3A%22camelContext%22%29-tp26421351p26421351.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: unexpected element (uri:"http://activemq.apache.org/camel/schema/osgi", local:"camelContext")

Posted by Gert Vanthienen <ge...@gmail.com>.
L.S.,

It looks like you're mixing up the namespace uri for Camel:
- Camel 1.x uses http://activemq.apache.org/camel/schema
- Camel 2.x uses http://camel.apache.org/schema

Depending on which version of Camel you're using, you should make sure
that your XML file only contains the right namespace for it.  This
also goes for the osgi: namespace btw
(http://activemq.apache.org/camel/schema versus
http://camel.apache.org/schema/osgi)

Regards,

Gert Vanthienen
------------------------
Open Source SOA: http://fusesource.com
Blog: http://gertvanthienen.blogspot.com/



2009/11/19 Freeman Fang <fr...@gmail.com>:
> Hi,
>
> Do you already install camel-osgi?
>
> Freeman
> On 2009-11-19, at 下午10:19, lekkie wrote:
>
>>
>> I found the ffg err after deployin an OSGI bundle below
>>
>> <osgi:camelContext xmlns="http://activemq.apache.org/camel/schema/spring">
>>                <route>
>>                        <from uri="jms:queue:RequestQueue" />
>>                        <bean ref="RecipientList" method="route" />
>>                </route>
>>        </osgi:camelContext>
>>
>> It seems servicemix didnt like the namespace.
>>
>> org.springframework.beans.factory.BeanDefinitionStoreException: Failed to
>> parse JAXB element: javax.xml.bind.UnmarshalException: unexpected element
>> (uri:"http://activemq.apache.org/camel/schema/osgi",
>> local:"camelContext").
>> Expected elements are
>>
>> <{http://camel.apache.org/schema/spring}aggregate>,<{http://camel.apache.org/schema/spring}aop>,<{http://camel.apache.org/schema/spring}batchResequencerConfig>,<{http://camel.apache.org/schema/spring}bean>,<{http://camel.apache.org/schema/spring}beanPostProcessor>,<{http://camel.apache.org/schema/spring}bindy>,<{http://camel.apache.org/schema/osgi}camelContext>,<{http://camel.apache.org/schema/spring}camelContext>,<{http://camel.apache.org/schema/spring}castor>,<{http://camel.apache.org/schema/spring}choice>,<{http://camel.apache.org/schema/spring}constant>,<{http://camel.apache.org/schema/spring}consumerTemplate>,<{http://camel.apache.org/schema/spring}convertBodyTo>,<{http://camel.apache.org/schema/spring}csv>,<{http://camel.apache.org/schema/spring}dataFormats>,<{http://camel.apache.org/schema/spring}delay>,<{http://camel.apache.org/schema/spring}description>,<{http://camel.apache.org/schema/spring}doCatch>,<{http://camel.apache.org/schema/spring}doFinally>,<{http://camel.apache.org/schema/spring}doTry>,<{http://camel.apache.org/schema/spring}el>,<{http://camel.apache.org/schema/spring}endpoint>,<{http://camel.apache.org/schema/spring}enrich>,<{http://camel.apache.org/schema/spring}export>,<{http://camel.apache.org/schema/spring}expression>,<{http://camel.apache.org/schema/spring}expressionDefinition>,<{http://camel.apache.org/schema/spring}failover>,<{http://camel.apache.org/schema/spring}filter>,<{http://camel.apache.org/schema/spring}flatpack>,<{http://camel.apache.org/schema/spring}from>,<{http://camel.apache.org/schema/spring}groovy>,<{http://camel.apache.org/schema/spring}gzip>,<{http://camel.apache.org/schema/spring}header>,<{http://camel.apache.org/schema/spring}hl7>,<{http://camel.apache.org/schema/spring}idempotentConsumer>,<{http://camel.apache.org/schema/spring}inOnly>,<{http://camel.apache.org/schema/spring}inOut>,<{http://camel.apache.org/schema/spring}intercept>,<{http://camel.apache.org/schema/spring}interceptFrom>,<{http://camel.apache.org/schema/spring}interceptToEndpoint>,<{http://camel.apache.org/schema/spring}javaScript>,<{http://camel.apache.org/schema/spring}jaxb>,<{http://camel.apache.org/schema/spring}jmxAgent>,<{http://camel.apache.org/schema/spring}json>,<{http://camel.apache.org/schema/spring}jxpath>,<{http://camel.apache.org/schema/spring}language>,<{http://camel.apache.org/schema/spring}loadBalance>,<{http://camel.apache.org/schema/spring}loop>,<{http://camel.apache.org/schema/spring}marshal>,<{http://camel.apache.org/schema/spring}method>,<{http://camel.apache.org/schema/spring}multicast>,<{http://camel.apache.org/schema/spring}mvel>,<{http://camel.apache.org/schema/spring}ognl>,<{http://camel.apache.org/schema/spring}onCompletion>,<{http://camel.apache.org/schema/spring}onException>,<{http://camel.apache.org/schema/spring}otherwise>,<{http://camel.apache.org/schema/spring}packageScan>,<{http://camel.apache.org/schema/spring}php>,<{http://camel.apache.org/schema/spring}pipeline>,<{http://camel.apache.org/schema/spring}policy>,<{http://camel.apache.org/schema/spring}pollEnrich>,<{http://camel.apache.org/schema/spring}process>,<{http://camel.apache.org/schema/spring}properties>,<{http://camel.apache.org/schema/spring}property>,<{http://camel.apache.org/schema/spring}proxy>,<{http://camel.apache.org/schema/spring}python>,<{http://camel.apache.org/schema/spring}random>,<{http://camel.apache.org/schema/spring}recipientList>,<{http://camel.apache.org/schema/spring}redeliveryPolicy>,<{http://camel.apache.org/schema/spring}removeHeader>,<{http://camel.apache.org/schema/spring}removeProperty>,<{http://camel.apache.org/schema/spring}resequence>,<{http://camel.apache.org/schema/spring}rollback>,<{http://camel.apache.org/schema/spring}roundRobin>,<{http://camel.apache.org/schema/spring}route>,<{http://camel.apache.org/schema/spring}routeBuilder>,<{http://camel.apache.org/schema/spring}routes>,<{http://camel.apache.org/schema/spring}routingSlip>,<{http://camel.apache.org/schema/spring}rss>,<{http://camel.apache.org/schema/spring}ruby>,<{http://camel.apache.org/schema/spring}secureXML>,<{http://camel.apache.org/schema/spring}serialization>,<{http://camel.apache.org/schema/spring}setBody>,<{http://camel.apache.org/schema/spring}setExchangePattern>,<{http://camel.apache.org/schema/spring}setHeader>,<{http://camel.apache.org/schema/spring}setOutHeader>,<{http://camel.apache.org/schema/spring}setProperty>,<{http://camel.apache.org/schema/spring}simple>,<{http://camel.apache.org/schema/spring}sort>,<{http://camel.apache.org/schema/spring}split>,<{http://camel.apache.org/schema/spring}sql>,<{http://camel.apache.org/schema/spring}sticky>,<{http://camel.apache.org/schema/spring}stop>,<{http://camel.apache.org/schema/spring}streamResequencerConfig>,<{http://camel.apache.org/schema/spring}string>,<{http://camel.apache.org/schema/spring}template>,<{http://camel.apache.org/schema/spring}threads>,<{http://camel.apache.org/schema/spring}throttle>,<{http://camel.apache.org/schema/spring}throwException>,<{http://camel.apache.org/schema/spring}tidyMarkup>,<{http://camel.apache.org/schema/spring}to>,<{http://camel.apache.org/schema/spring}tokenize>,<{http://camel.apache.org/schema/spring}topic>,<{http://camel.apache.org/schema/spring}transacted>,<{http://camel.apache.org/schema/spring}transform>,<{http://camel.apache.org/schema/spring}unmarshal>,<{http://camel.apache.org/schema/spring}when>,<{http://camel.apache.org/schema/spring}wireTap>,<{http://camel.apache.org/schema/spring}xmlBeans>,<{http://camel.apache.org/schema/spring}xpath>,<{http://camel.apache.org/schema/spring}xquery>,<{http://camel.apache.org/schema/spring}xstream>,<{http://camel.apache.org/schema/spring}zip>;
>> nested exception is javax.xml.bind.UnmarshalException: unexpected element
>> (uri:"http://activemq.apache.org/camel/schema/osgi",
>> local:"camelContext").
>> Expected elements are
>>
>> <{http://camel.apache.org/schema/spring}aggregate>,<{http://camel.apache.org/schema/spring}aop>,<{http://camel.apache.org/schema/spring}batchResequencerConfig>,<{http://camel.apache.org/schema/spring}bean>,<{http://camel.apache.org/schema/spring}beanPostProcessor>,<{http://camel.apache.org/schema/spring}bindy>,<{http://camel.apache.org/schema/osgi}camelContext>,<{http://camel.apache.org/schema/spring}camelContext>,<{http://camel.apache.org/schema/spring}castor>,<{http://camel.apache.org/schema/spring}choice>,<{http://camel.apache.org/schema/spring}constant>,<{http://camel.apache.org/schema/spring}consumerTemplate>,<{http://camel.apache.org/schema/spring}convertBodyTo>,<{http://camel.apache.org/schema/spring}csv>,<{http://camel.apache.org/schema/spring}dataFormats>,<{http://camel.apache.org/schema/spring}delay>,<{http://camel.apache.org/schema/spring}description>,<{http://camel.apache.org/schema/spring}doCatch>,<{http://camel.apache.org/schema/spring}doFinally>,<{http://camel.apache.org/schema/spring}doTry>,<{http://camel.apache.org/schema/spring}el>,<{http://camel.apache.org/schema/spring}endpoint>,<{http://camel.apache.org/schema/spring}enrich>,<{http://camel.apache.org/schema/spring}export>,<{http://camel.apache.org/schema/spring}expression>,<{http://camel.apache.org/schema/spring}expressionDefinition>,<{http://camel.apache.org/schema/spring}failover>,<{http://camel.apache.org/schema/spring}filter>,<{http://camel.apache.org/schema/spring}flatpack>,<{http://camel.apache.org/schema/spring}from>,<{http://camel.apache.org/schema/spring}groovy>,<{http://camel.apache.org/schema/spring}gzip>,<{http://camel.apache.org/schema/spring}header>,<{http://camel.apache.org/schema/spring}hl7>,<{http://camel.apache.org/schema/spring}idempotentConsumer>,<{http://camel.apache.org/schema/spring}inOnly>,<{http://camel.apache.org/schema/spring}inOut>,<{http://camel.apache.org/schema/spring}intercept>,<{http://camel.apache.org/schema/spring}interceptFrom>,<{http://camel.apache.org/schema/spring}interceptToEndpoint>,<{http://camel.apache.org/schema/spring}javaScript>,<{http://camel.apache.org/schema/spring}jaxb>,<{http://camel.apache.org/schema/spring}jmxAgent>,<{http://camel.apache.org/schema/spring}json>,<{http://camel.apache.org/schema/spring}jxpath>,<{http://camel.apache.org/schema/spring}language>,<{http://camel.apache.org/schema/spring}loadBalance>,<{http://camel.apache.org/schema/spring}loop>,<{http://camel.apache.org/schema/spring}marshal>,<{http://camel.apache.org/schema/spring}method>,<{http://camel.apache.org/schema/spring}multicast>,<{http://camel.apache.org/schema/spring}mvel>,<{http://camel.apache.org/schema/spring}ognl>,<{http://camel.apache.org/schema/spring}onCompletion>,<{http://camel.apache.org/schema/spring}onException>,<{http://camel.apache.org/schema/spring}otherwise>,<{http://camel.apache.org/schema/spring}packageScan>,<{http://camel.apache.org/schema/spring}php>,<{http://camel.apache.org/schema/spring}pipeline>,<{http://camel.apache.org/schema/spring}policy>,<{http://camel.apache.org/schema/spring}pollEnrich>,<{http://camel.apache.org/schema/spring}process>,<{http://camel.apache.org/schema/spring}properties>,<{http://camel.apache.org/schema/spring}property>,<{http://camel.apache.org/schema/spring}proxy>,<{http://camel.apache.org/schema/spring}python>,<{http://camel.apache.org/schema/spring}random>,<{http://camel.apache.org/schema/spring}recipientList>,<{http://camel.apache.org/schema/spring}redeliveryPolicy>,<{http://camel.apache.org/schema/spring}removeHeader>,<{http://camel.apache.org/schema/spring}removeProperty>,<{http://camel.apache.org/schema/spring}resequence>,<{http://camel.apache.org/schema/spring}rollback>,<{http://camel.apache.org/schema/spring}roundRobin>,<{http://camel.apache.org/schema/spring}route>,<{http://camel.apache.org/schema/spring}routeBuilder>,<{http://camel.apache.org/schema/spring}routes>,<{http://camel.apache.org/schema/spring}routingSlip>,<{http://camel.apache.org/schema/spring}rss>,<{http://camel.apache.org/schema/spring}ruby>,<{http://camel.apache.org/schema/spring}secureXML>,<{http://camel.apache.org/schema/spring}serialization>,<{http://camel.apache.org/schema/spring}setBody>,<{http://camel.apache.org/schema/spring}setExchangePattern>,<{http://camel.apache.org/schema/spring}setHeader>,<{http://camel.apache.org/schema/spring}setOutHeader>,<{http://camel.apache.org/schema/spring}setProperty>,<{http://camel.apache.org/schema/spring}simple>,<{http://camel.apache.org/schema/spring}sort>,<{http://camel.apache.org/schema/spring}split>,<{http://camel.apache.org/schema/spring}sql>,<{http://camel.apache.org/schema/spring}sticky>,<{http://camel.apache.org/schema/spring}stop>,<{http://camel.apache.org/schema/spring}streamResequencerConfig>,<{http://camel.apache.org/schema/spring}string>,<{http://camel.apache.org/schema/spring}template>,<{http://camel.apache.org/schema/spring}threads>,<{http://camel.apache.org/schema/spring}throttle>,<{http://camel.apache.org/schema/spring}throwException>,<{http://camel.apache.org/schema/spring}tidyMarkup>,<{http://camel.apache.org/schema/spring}to>,<{http://camel.apache.org/schema/spring}tokenize>,<{http://camel.apache.org/schema/spring}topic>,<{http://camel.apache.org/schema/spring}transacted>,<{http://camel.apache.org/schema/spring}transform>,<{http://camel.apache.org/schema/spring}unmarshal>,<{http://camel.apache.org/schema/spring}when>,<{http://camel.apache.org/schema/spring}wireTap>,<{http://camel.apache.org/schema/spring}xmlBeans>,<{http://camel.apache.org/schema/spring}xpath>,<{http://camel.apache.org/schema/spring}xquery>,<{http://camel.apache.org/schema/spring}xstream>,<{http://camel.apache.org/schema/spring}zip>
>>        at
>>
>> org.apache.camel.spring.handler.CamelNamespaceHandler.parseUsingJaxb(CamelNamespaceHandler.java:152)
>>        at
>>
>> org.apache.camel.spring.handler.CamelNamespaceHandler$CamelContextBeanDefinitionParser.doParse(CamelNamespaceHandler.java:211)
>>        at
>>
>> org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser.parseInternal(AbstractSingleBeanDefinitionParser.java:84)
>>        at
>>
>> org.springframework.beans.factory.xml.AbstractBeanDefinitionParser.parse(AbstractBeanDefinitionParser.java:56)
>>        at
>>
>> org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:69)
>>        at
>>
>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1297)
>>        at
>> --
>> View this message in context:
>> http://old.nabble.com/unexpected-element-%28uri%3A%22http%3A--activemq.apache.org-camel-schema-osgi%22%2C-local%3A%22camelContext%22%29-tp26421351p26421351.html
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
>
>
> --
> Freeman Fang
> ------------------------
> Open Source SOA: http://fusesource.com
>
>

Re: unexpected element (uri:"http://activemq.apache.org/camel/schema/osgi", local:"camelContext")

Posted by Freeman Fang <fr...@gmail.com>.
Hi,

Do you already install camel-osgi?

Freeman
On 2009-11-19, at 下午10:19, lekkie wrote:

>
> I found the ffg err after deployin an OSGI bundle below
>
> <osgi:camelContext xmlns="http://activemq.apache.org/camel/schema/spring 
> ">
> 		<route>
> 			<from uri="jms:queue:RequestQueue" />
> 			<bean ref="RecipientList" method="route" />
> 		</route>
> 	</osgi:camelContext>
>
> It seems servicemix didnt like the namespace.
>
> org.springframework.beans.factory.BeanDefinitionStoreException:  
> Failed to
> parse JAXB element: javax.xml.bind.UnmarshalException: unexpected  
> element
> (uri:"http://activemq.apache.org/camel/schema/osgi",  
> local:"camelContext").
> Expected elements are
> <{http://camel.apache.org/schema/spring}aggregate>,<{http://camel.apache.org/schema/spring 
> }aop>,<{http://camel.apache.org/schema/ 
> spring}batchResequencerConfig>,<{http://camel.apache.org/schema/ 
> spring}bean>,<{http://camel.apache.org/schema/ 
> spring}beanPostProcessor>,<{http://camel.apache.org/schema/ 
> spring}bindy>,<{http://camel.apache.org/schema/osgi}camelContext>,<{http://camel.apache.org/schema/spring 
> }camelContext>,<{http://camel.apache.org/schema/spring}castor>,<{http://camel.apache.org/schema/spring 
> }choice>,<{http://camel.apache.org/schema/spring}constant>,<{http://camel.apache.org/schema/spring 
> }consumerTemplate>,<{http://camel.apache.org/schema/ 
> spring}convertBodyTo>,<{http://camel.apache.org/schema/spring}csv>,<{http://camel.apache.org/schema/spring 
> }dataFormats>,<{http://camel.apache.org/schema/spring}delay>,<{http://camel.apache.org/schema/spring 
> }description>,<{http://camel.apache.org/schema/spring}doCatch>,<{http://camel.apache.org/schema/spring 
> }doFinally>,<{http://camel.apache.org/schema/spring}doTry>,<{http://camel.apache.org/schema/spring 
> }el>,<{http://camel.apache.org/schema/spring}endpoint>,<{http://camel.apache.org/schema/spring 
> }enrich>,<{http://camel.apache.org/schema/spring}export>,<{http://camel.apache.org/schema/spring 
> }expression>,<{http://camel.apache.org/schema/ 
> spring}expressionDefinition>,<{http://camel.apache.org/schema/ 
> spring}failover>,<{http://camel.apache.org/schema/spring}filter>,<{http://camel.apache.org/schema/spring 
> }flatpack>,<{http://camel.apache.org/schema/spring}from>,<{http://camel.apache.org/schema/spring 
> }groovy>,<{http://camel.apache.org/schema/spring}gzip>,<{http://camel.apache.org/schema/spring 
> }header>,<{http://camel.apache.org/schema/spring}hl7>,<{http://camel.apache.org/schema/spring 
> }idempotentConsumer>,<{http://camel.apache.org/schema/ 
> spring}inOnly>,<{http://camel.apache.org/schema/spring}inOut>,<{http://camel.apache.org/schema/spring 
> }intercept>,<{http://camel.apache.org/schema/spring}interceptFrom>,<{http://camel.apache.org/schema/spring 
> }interceptToEndpoint>,<{http://camel.apache.org/schema/ 
> spring}javaScript>,<{http://camel.apache.org/schema/spring}jaxb>,<{http://camel.apache.org/schema/spring 
> }jmxAgent>,<{http://camel.apache.org/schema/spring}json>,<{http://camel.apache.org/schema/spring 
> }jxpath>,<{http://camel.apache.org/schema/spring}language>,<{http://camel.apache.org/schema/spring 
> }loadBalance>,<{http://camel.apache.org/schema/spring}loop>,<{http://camel.apache.org/schema/spring 
> }marshal>,<{http://camel.apache.org/schema/spring}method>,<{http://camel.apache.org/schema/spring 
> }multicast>,<{http://camel.apache.org/schema/spring}mvel>,<{http://camel.apache.org/schema/spring 
> }ognl>,<{http://camel.apache.org/schema/spring}onCompletion>,<{http://camel.apache.org/schema/spring 
> }onException>,<{http://camel.apache.org/schema/spring}otherwise>,<{http://camel.apache.org/schema/spring 
> }packageScan>,<{http://camel.apache.org/schema/spring}php>,<{http://camel.apache.org/schema/spring 
> }pipeline>,<{http://camel.apache.org/schema/spring}policy>,<{http://camel.apache.org/schema/spring 
> }pollEnrich>,<{http://camel.apache.org/schema/spring}process>,<{http://camel.apache.org/schema/spring 
> }properties>,<{http://camel.apache.org/schema/spring}property>,<{http://camel.apache.org/schema/spring 
> }proxy>,<{http://camel.apache.org/schema/spring}python>,<{http://camel.apache.org/schema/spring 
> }random>,<{http://camel.apache.org/schema/spring}recipientList>,<{http://camel.apache.org/schema/spring 
> }redeliveryPolicy>,<{http://camel.apache.org/schema/ 
> spring}removeHeader>,<{http://camel.apache.org/schema/ 
> spring}removeProperty>,<{http://camel.apache.org/schema/ 
> spring}resequence>,<{http://camel.apache.org/schema/ 
> spring}rollback>,<{http://camel.apache.org/schema/ 
> spring}roundRobin>,<{http://camel.apache.org/schema/spring}route>,<{http://camel.apache.org/schema/spring 
> }routeBuilder>,<{http://camel.apache.org/schema/spring}routes>,<{http://camel.apache.org/schema/spring 
> }routingSlip>,<{http://camel.apache.org/schema/spring}rss>,<{http://camel.apache.org/schema/spring 
> }ruby>,<{http://camel.apache.org/schema/spring}secureXML>,<{http://camel.apache.org/schema/spring 
> }serialization>,<{http://camel.apache.org/schema/spring}setBody>,<{http://camel.apache.org/schema/spring 
> }setExchangePattern>,<{http://camel.apache.org/schema/ 
> spring}setHeader>,<{http://camel.apache.org/schema/ 
> spring}setOutHeader>,<{http://camel.apache.org/schema/ 
> spring}setProperty>,<{http://camel.apache.org/schema/ 
> spring}simple>,<{http://camel.apache.org/schema/spring}sort>,<{http://camel.apache.org/schema/spring 
> }split>,<{http://camel.apache.org/schema/spring}sql>,<{http://camel.apache.org/schema/spring 
> }sticky>,<{http://camel.apache.org/schema/spring}stop>,<{http://camel.apache.org/schema/spring 
> }streamResequencerConfig>,<{http://camel.apache.org/schema/ 
> spring}string>,<{http://camel.apache.org/schema/spring}template>,<{http://camel.apache.org/schema/spring 
> }threads>,<{http://camel.apache.org/schema/spring}throttle>,<{http://camel.apache.org/schema/spring 
> }throwException>,<{http://camel.apache.org/schema/ 
> spring}tidyMarkup>,<{http://camel.apache.org/schema/spring}to>,<{http://camel.apache.org/schema/spring 
> }tokenize>,<{http://camel.apache.org/schema/spring}topic>,<{http://camel.apache.org/schema/spring 
> }transacted>,<{http://camel.apache.org/schema/spring}transform>,<{http://camel.apache.org/schema/spring 
> }unmarshal>,<{http://camel.apache.org/schema/spring}when>,<{http://camel.apache.org/schema/spring 
> }wireTap>,<{http://camel.apache.org/schema/spring}xmlBeans>,<{http://camel.apache.org/schema/spring 
> }xpath>,<{http://camel.apache.org/schema/spring}xquery>,<{http://camel.apache.org/schema/spring 
> }xstream>,<{http://camel.apache.org/schema/spring}zip>;
> nested exception is javax.xml.bind.UnmarshalException: unexpected  
> element
> (uri:"http://activemq.apache.org/camel/schema/osgi",  
> local:"camelContext").
> Expected elements are
> <{http://camel.apache.org/schema/spring}aggregate>,<{http://camel.apache.org/schema/spring 
> }aop>,<{http://camel.apache.org/schema/ 
> spring}batchResequencerConfig>,<{http://camel.apache.org/schema/ 
> spring}bean>,<{http://camel.apache.org/schema/ 
> spring}beanPostProcessor>,<{http://camel.apache.org/schema/ 
> spring}bindy>,<{http://camel.apache.org/schema/osgi}camelContext>,<{http://camel.apache.org/schema/spring 
> }camelContext>,<{http://camel.apache.org/schema/spring}castor>,<{http://camel.apache.org/schema/spring 
> }choice>,<{http://camel.apache.org/schema/spring}constant>,<{http://camel.apache.org/schema/spring 
> }consumerTemplate>,<{http://camel.apache.org/schema/ 
> spring}convertBodyTo>,<{http://camel.apache.org/schema/spring}csv>,<{http://camel.apache.org/schema/spring 
> }dataFormats>,<{http://camel.apache.org/schema/spring}delay>,<{http://camel.apache.org/schema/spring 
> }description>,<{http://camel.apache.org/schema/spring}doCatch>,<{http://camel.apache.org/schema/spring 
> }doFinally>,<{http://camel.apache.org/schema/spring}doTry>,<{http://camel.apache.org/schema/spring 
> }el>,<{http://camel.apache.org/schema/spring}endpoint>,<{http://camel.apache.org/schema/spring 
> }enrich>,<{http://camel.apache.org/schema/spring}export>,<{http://camel.apache.org/schema/spring 
> }expression>,<{http://camel.apache.org/schema/ 
> spring}expressionDefinition>,<{http://camel.apache.org/schema/ 
> spring}failover>,<{http://camel.apache.org/schema/spring}filter>,<{http://camel.apache.org/schema/spring 
> }flatpack>,<{http://camel.apache.org/schema/spring}from>,<{http://camel.apache.org/schema/spring 
> }groovy>,<{http://camel.apache.org/schema/spring}gzip>,<{http://camel.apache.org/schema/spring 
> }header>,<{http://camel.apache.org/schema/spring}hl7>,<{http://camel.apache.org/schema/spring 
> }idempotentConsumer>,<{http://camel.apache.org/schema/ 
> spring}inOnly>,<{http://camel.apache.org/schema/spring}inOut>,<{http://camel.apache.org/schema/spring 
> }intercept>,<{http://camel.apache.org/schema/spring}interceptFrom>,<{http://camel.apache.org/schema/spring 
> }interceptToEndpoint>,<{http://camel.apache.org/schema/ 
> spring}javaScript>,<{http://camel.apache.org/schema/spring}jaxb>,<{http://camel.apache.org/schema/spring 
> }jmxAgent>,<{http://camel.apache.org/schema/spring}json>,<{http://camel.apache.org/schema/spring 
> }jxpath>,<{http://camel.apache.org/schema/spring}language>,<{http://camel.apache.org/schema/spring 
> }loadBalance>,<{http://camel.apache.org/schema/spring}loop>,<{http://camel.apache.org/schema/spring 
> }marshal>,<{http://camel.apache.org/schema/spring}method>,<{http://camel.apache.org/schema/spring 
> }multicast>,<{http://camel.apache.org/schema/spring}mvel>,<{http://camel.apache.org/schema/spring 
> }ognl>,<{http://camel.apache.org/schema/spring}onCompletion>,<{http://camel.apache.org/schema/spring 
> }onException>,<{http://camel.apache.org/schema/spring}otherwise>,<{http://camel.apache.org/schema/spring 
> }packageScan>,<{http://camel.apache.org/schema/spring}php>,<{http://camel.apache.org/schema/spring 
> }pipeline>,<{http://camel.apache.org/schema/spring}policy>,<{http://camel.apache.org/schema/spring 
> }pollEnrich>,<{http://camel.apache.org/schema/spring}process>,<{http://camel.apache.org/schema/spring 
> }properties>,<{http://camel.apache.org/schema/spring}property>,<{http://camel.apache.org/schema/spring 
> }proxy>,<{http://camel.apache.org/schema/spring}python>,<{http://camel.apache.org/schema/spring 
> }random>,<{http://camel.apache.org/schema/spring}recipientList>,<{http://camel.apache.org/schema/spring 
> }redeliveryPolicy>,<{http://camel.apache.org/schema/ 
> spring}removeHeader>,<{http://camel.apache.org/schema/ 
> spring}removeProperty>,<{http://camel.apache.org/schema/ 
> spring}resequence>,<{http://camel.apache.org/schema/ 
> spring}rollback>,<{http://camel.apache.org/schema/ 
> spring}roundRobin>,<{http://camel.apache.org/schema/spring}route>,<{http://camel.apache.org/schema/spring 
> }routeBuilder>,<{http://camel.apache.org/schema/spring}routes>,<{http://camel.apache.org/schema/spring 
> }routingSlip>,<{http://camel.apache.org/schema/spring}rss>,<{http://camel.apache.org/schema/spring 
> }ruby>,<{http://camel.apache.org/schema/spring}secureXML>,<{http://camel.apache.org/schema/spring 
> }serialization>,<{http://camel.apache.org/schema/spring}setBody>,<{http://camel.apache.org/schema/spring 
> }setExchangePattern>,<{http://camel.apache.org/schema/ 
> spring}setHeader>,<{http://camel.apache.org/schema/ 
> spring}setOutHeader>,<{http://camel.apache.org/schema/ 
> spring}setProperty>,<{http://camel.apache.org/schema/ 
> spring}simple>,<{http://camel.apache.org/schema/spring}sort>,<{http://camel.apache.org/schema/spring 
> }split>,<{http://camel.apache.org/schema/spring}sql>,<{http://camel.apache.org/schema/spring 
> }sticky>,<{http://camel.apache.org/schema/spring}stop>,<{http://camel.apache.org/schema/spring 
> }streamResequencerConfig>,<{http://camel.apache.org/schema/ 
> spring}string>,<{http://camel.apache.org/schema/spring}template>,<{http://camel.apache.org/schema/spring 
> }threads>,<{http://camel.apache.org/schema/spring}throttle>,<{http://camel.apache.org/schema/spring 
> }throwException>,<{http://camel.apache.org/schema/ 
> spring}tidyMarkup>,<{http://camel.apache.org/schema/spring}to>,<{http://camel.apache.org/schema/spring 
> }tokenize>,<{http://camel.apache.org/schema/spring}topic>,<{http://camel.apache.org/schema/spring 
> }transacted>,<{http://camel.apache.org/schema/spring}transform>,<{http://camel.apache.org/schema/spring 
> }unmarshal>,<{http://camel.apache.org/schema/spring}when>,<{http://camel.apache.org/schema/spring 
> }wireTap>,<{http://camel.apache.org/schema/spring}xmlBeans>,<{http://camel.apache.org/schema/spring 
> }xpath>,<{http://camel.apache.org/schema/spring}xquery>,<{http://camel.apache.org/schema/spring 
> }xstream>,<{http://camel.apache.org/schema/spring}zip>
> 	at
> org 
> .apache 
> .camel 
> .spring 
> .handler 
> .CamelNamespaceHandler.parseUsingJaxb(CamelNamespaceHandler.java:152)
> 	at
> org.apache.camel.spring.handler.CamelNamespaceHandler 
> $CamelContextBeanDefinitionParser.doParse(CamelNamespaceHandler.java: 
> 211)
> 	at
> org 
> .springframework 
> .beans 
> .factory 
> .xml 
> .AbstractSingleBeanDefinitionParser 
> .parseInternal(AbstractSingleBeanDefinitionParser.java:84)
> 	at
> org 
> .springframework 
> .beans 
> .factory 
> .xml 
> .AbstractBeanDefinitionParser 
> .parse(AbstractBeanDefinitionParser.java:56)
> 	at
> org 
> .springframework 
> .beans 
> .factory 
> .xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:69)
> 	at
> org 
> .springframework 
> .beans 
> .factory 
> .xml 
> .BeanDefinitionParserDelegate 
> .parseCustomElement(BeanDefinitionParserDelegate.java:1297)
> 	at
> -- 
> View this message in context: http://old.nabble.com/unexpected-element-%28uri%3A%22http%3A--activemq.apache.org-camel-schema-osgi%22%2C-local%3A%22camelContext%22%29-tp26421351p26421351.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>


-- 
Freeman Fang
------------------------
Open Source SOA: http://fusesource.com