JBoss Community

EAP6.1/JBoss7 Snowdrop and Camel

created by dako ak in Snowdrop - View the full discussion

Hi all,

 

Currently I try to start with a camel spring project but I can't bring it to work.

I have realised a spring jar deployment with Snowdrop 2.0.5 on EAP 6.1 and for now, everything works fine.

But I can't start a camel route from my spring file. I have created a camel-core and a spring-camel module but I got the error message "Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://camel.apache.org/schema/spring]" when my spring jar starts deploying.

 

 

This are my spring files:

 

jboss-spring.xml to start the spring application (snowdrop):

 

<beans xmlns="http://www.springframework.org/schema/beans"

       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">

 

    <description>BeanFactory=(MyCamelSpring)</description>

 

    <import resource="/spring/camel-route.xml"/>

 

 

</beans>

 

 

camel-route.xml:

 

<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:context="http://www.springframework.org/schema/context"

    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd

       http://camel.apache.org/schema/spring classpath:META-INF/spring/camel-spring.xsd

       http://www.springframework.org/schema/context classpath:META-INF/spring/spring-context-3.0.xsd">

 

    <context:load-time-weaver weaver-class="org.jboss.instrument.classloading.JBossLoadTimeWeaver"/>

 

    <import resource="classpath:META-INF/spring/spring-bean.xml" />

 

     <camelContext xmlns="http://camel.apache.org/schema/spring">

        <route>

            <from uri="timer://myTimer?fixedRate=true&amp;period=5s" />

            <bean ref="myBean" method="print" />

        </route>

    </camelContext>

 

</beans>

 

 

 

 

 

spring-bean.xml

<beans xmlns="http://www.springframework.org/schema/beans"

    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">

 

    <bean id="myBean" class="de.mycompany.myspringcamel.MyBean">

    </bean>

</beans>

Reply to this message by going to Community

Start a new discussion in Snowdrop at Community