1 Reply Latest reply on Jun 27, 2013 4:26 AM by dako_t

    EAP 6.1 and Camel with Snowdrop

    dako_t

      Hi all,

       

      for now we are working with JBoss 4 and 6. But or next project should run on EAP 6.1.

      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 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.

       

      Maybe someone has bring camel to work in JBoss 7/EAP 6 ?

       

      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>