I'm trying to configure Apache Camel in Spring in the Java config way as detailed in this example. However I'm stuck at the dependency step because BundleContextAware and (transitively) BundleContext cannot be resolved. It seems that the necessary transitive dependencies are not downloaded. Here is my pom.xml:
<properties>
<apache.camel.version>2.9.0</apache.camel.version>
</properties>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-core</artifactId>
<version>${apache.camel.version}</version>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-spring</artifactId>
<version>${apache.camel.version}</version>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-spring-javaconfig</artifactId>
<version>${apache.camel.version}</version>
</dependency>
Here's a code snippet from the example:
/**
* Router from a file system to an ActiveMQ queue and then to a file system
*
* @version
*/
@Configuration
public class MyRouteConfig extends SingleRouteCamelConfiguration
implements InitializingBean, BundleContextAware {
private BundleContext bundleContext;
...
...
}
Ah this example was refactored to also be deployable in OSGi. And therefore there is some OSGi classes in the sample code.
You should just remove that if you do not use OSGi, eg remove the code about BundleContextAware and BundleContext
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With