You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Sushmita chandra <fl...@gmail.com> on 2013/03/13 14:17:50 UTC
Issue in a camel route
In my processor class i am trying to create a jms connection
ApplicationContext context = new
ClassPathXmlApplicationContext("classpath:META-INF/spring/context.xml");
CamelContext testContext = (CamelContext)context.getBean("camelContext");
ConnectionFactory connectionFactory = new
ActiveMQConnectionFactory("vm://localhost?broker.persistent=false");
testContext.addComponent("test-jms",
JmsComponent.jmsComponentAutoAcknowledge(connectionFactory));
where my context file contains:-
<?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:camel="http://camel.apache.org/schema/spring"
xmlns:cxf="http://camel.apache.org/schema/cxf"
xsi:schemaLocation=" http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://camel.apache.org/schema/spring
http://camel.apache.org/schema/spring/camel-spring.xsd
http://camel.apache.org/schema/cxf
http://camel.apache.org/schema/cxf/camel-cxf.xsd">
<camel:camelContext id="camelContext">
<camel:routeBuilder ref="routeBuilder"/>
</camel:camelContext>
I am trying to deploy it in Karaf and getting below mentioned exception
*
Configuration problem: Unable to locate Spring NamespaceHandler for XML
schema namespace [http://camel.apache.org/schema/cxf]
Offending resource: class path resource [META-INF/spring/context.xml]*
Please let me know what is wrong here.
--
View this message in context: http://camel.465427.n5.nabble.com/Issue-in-a-camel-route-tp5729099.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Issue in a camel route
Posted by Claus Ibsen <cl...@gmail.com>.
Hi
In your xml file you have cxf namespace and whatnot. You should remove
that. Or install camel-cxf to have CXF deployed in Karaf.
On Wed, Mar 13, 2013 at 2:17 PM, Sushmita chandra
<fl...@gmail.com> wrote:
> In my processor class i am trying to create a jms connection
>
> ApplicationContext context = new
> ClassPathXmlApplicationContext("classpath:META-INF/spring/context.xml");
> CamelContext testContext = (CamelContext)context.getBean("camelContext");
> ConnectionFactory connectionFactory = new
> ActiveMQConnectionFactory("vm://localhost?broker.persistent=false");
> testContext.addComponent("test-jms",
> JmsComponent.jmsComponentAutoAcknowledge(connectionFactory));
>
> where my context file contains:-
> <?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:camel="http://camel.apache.org/schema/spring"
> xmlns:cxf="http://camel.apache.org/schema/cxf"
> xsi:schemaLocation=" http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans.xsd
> http://camel.apache.org/schema/spring
> http://camel.apache.org/schema/spring/camel-spring.xsd
> http://camel.apache.org/schema/cxf
> http://camel.apache.org/schema/cxf/camel-cxf.xsd">
> <camel:camelContext id="camelContext">
> <camel:routeBuilder ref="routeBuilder"/>
> </camel:camelContext>
>
> I am trying to deploy it in Karaf and getting below mentioned exception
> *
> Configuration problem: Unable to locate Spring NamespaceHandler for XML
> schema namespace [http://camel.apache.org/schema/cxf]
> Offending resource: class path resource [META-INF/spring/context.xml]*
>
> Please let me know what is wrong here.
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Issue-in-a-camel-route-tp5729099.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
--
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen