Quantcast
Channel: Apache Timeline
Viewing all articles
Browse latest Browse all 5648

packagescan is not working in Java Webapp web.xml

$
0
0
I'm trying to register Camel Routes (written in Java DSL) in a package
through web.xml. The routes were not registered when I used the package
scanning (e.g.1 below). As a side note, the route registered fine when I
added it at the class level in web.xml (see e.g.2 below).

Camel version used: 2.13.1
Documentation is available at:* Using package scanning
<http://camel.apache.org/servletlistener-component.htm> *

*e.g.1:* Below does not work.
<context-param>
<param-name>routeBuilder-MyRoute</param-name>
<param-value>packagescan:com.isone.oishe24.camel.routes</param-value>
</context-param>

*e.g.2: *Below works fine
<context-param>
<param-name>routeBuilder-MyRoute</param-name>

<param-value>com.isone.oishe24.camel.routes.CamelMyBatisRoute</param-value>
</context-param>

All classes in the package extends RouteBuilder

*I'm using Maven and I do haven the dependencies below:*
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-servletlistener</artifactId>
<version>${camel.version}</version>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-servlet</artifactId>
<version>${camel.version}</version>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-core</artifactId>
<version>${camel.version}</version>
</dependency>

Has anyone encountered the issue?

Viewing all articles
Browse latest Browse all 5648

Latest Images

Trending Articles



Latest Images