2 years ago

#73526

test-img

Chennai Cheetah

How to refer external jar route from Camel context file

I have project A which has below simple route logrouteTest.xml

    <routeContext id="CommonLogRoutes" xmlns="http://camel.apache.org/schema/spring">
        <route id="logRoute">
            <from id="_NSDL_PAN" uri="seda:MyLogRoute"/>
            <convertBodyTo id="_convertBodyTo1" type="java.lang.String"/>
            <log message="my received body : ${body}"/>            
        </route>
  </routeContext>

I composed this project into JAR. In my project B I have imported the above jar and trying to refer the Project A route like this

<import resource="classpath:com/tcl/Testjar/logrouteTest.xml"/>

Error I am getting the below error java.io.FileNotFoundException: class path resource [com/tcl/Testjar/logrouteTest.xml] cannot be opened because it does not exist

Is there any way to refer the external project camel route from current project route without deploying project A.

Note : I am looking for option to use Project A as ESB library

apache-camel

spring-camel

0 Answers

Your Answer

Accepted video resources