1

I just have written one application using Java 11 (open-jdk 11.0.2), Spring framework 5.3.23, And Apache Camel 3.8.0; which is supposed to read an incoming file and do process it. For this I have written XML-DSL which defines the routes in it. I'm sharing part of it. The problem is the camel is not reading the file at all and no camelLock file is being created on incoming file. Can anyone help me in this issue to resolve this ?

XML-DSL : actionRoutes.xml -`

<beans  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:beans="http://www.springframework.org/schema/beans"
xmlns:aop="http://www.springframework.org/schema/aop" 
xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd  
   http://camel.apache.org/schema/spring https://camel.apache.org/schema/spring/camel-spring-3.8.0.xsd">

<!-- Only the routeContext is here -->
<routeContext id="actionRoutes" xmlns="http://camel.apache.org/schema/spring">

    <!-- INWARD/OUTWARD RETURN route defined - Set 01 -->
    <route id="route14">
        <from uri="file:E:\\ICICI\\reports?delete=true&amp;filter=#checkBankStatus" />
        <log message="INWARD / OUTWARD RETURN PROCESS : [${body}]" />

        <doTry>
            <process ref="inwardProcessorICI" />
            <doCatch>
                <!-- catch multiple exceptions -->
                <exception>java.io.IOException</exception>
                <exception>java.lang.IllegalStateException</exception>
                <exception>java.lang.Exception</exception>
            </doCatch>
        </doTry>
    </route>
`

The pom.xml has enlisted the required dependencies for Spring framework 5.3.23 and Apache camel 3.8.0 -

<!-- https://mvnrepository.com/artifact/org.apache.camel/camel-core -->
    <dependency>
        <groupId>org.apache.camel</groupId>
        <artifactId>camel-core</artifactId>
        <version>3.8.0</version>
    </dependency>

    <!-- https://mvnrepository.com/artifact/org.apache.camel/camel-core-osgi -->
    <dependency>
        <groupId>org.apache.camel</groupId>
        <artifactId>camel-core-osgi</artifactId>
        <version>3.1.0</version>
    </dependency>

    <!-- https://mvnrepository.com/artifact/org.apache.camel/camel-ftp -->
    <dependency>
        <groupId>org.apache.camel</groupId>
        <artifactId>camel-ftp</artifactId>
        <version>3.8.0</version>
    </dependency>

    <!-- https://mvnrepository.com/artifact/org.apache.camel/camel-http -->
    <dependency>
        <groupId>org.apache.camel</groupId>
        <artifactId>camel-http</artifactId>
        <version>3.8.0</version>
        <scope>test</scope>
    </dependency>

    <!-- https://mvnrepository.com/artifact/org.apache.camel/camel-jpa -->
    <dependency>
        <groupId>org.apache.camel</groupId>
        <artifactId>camel-jpa</artifactId>
        <version>3.8.0</version>
    </dependency>

    <!-- https://mvnrepository.com/artifact/org.apache.camel/camel-servlet -->
    <dependency>
        <groupId>org.apache.camel</groupId>
        <artifactId>camel-servlet</artifactId>
        <version>3.8.0</version>
    </dependency>

    <!-- https://mvnrepository.com/artifact/org.apache.camel/camel-spring -->
    <dependency>
        <groupId>org.apache.camel</groupId>
        <artifactId>camel-spring</artifactId>
        <version>3.8.0</version>
    </dependency>

    <!-- https://mvnrepository.com/artifact/org.apache.camel/camel-spring-integration -->
    <dependency>
        <groupId>org.apache.camel</groupId>
        <artifactId>camel-spring-integration</artifactId>
        <version>3.8.0</version>
    </dependency>

Thanks in advance.

Jayanta Pramanik

0 Answers0