Hi All, I've created sample project to connect to mongodb. while performing osgi:install of bundle, below exception is thrown. Could someone help here.
Error:
Error executing command: Error installing bundles: Unable to start bundle file:C:/Tech/Workspaces/jws8_1/external-mq-fabric-client-jboss-fuse-6.2/camel-consumer/target/camel-consumer-2.1.0-SNAPSHOT.jar: Unresolved constraint in bundle org.fusebyexample.mq-fabric.camel-consumer [291]: Unable to resolve 291.0: missing requirement [291.0] osgi.wiring.package; (&(osgi.wiring.package=com.mongodb)(version>=3.0.0)(!(version>=4.0.0)))
camel-context.xml:
<camelContext id="ConsumerContext" xmlns="http://camel.apache.org/schema/spring"> |
<route id="ConsumerRoute">
<from uri="activemq:queue:queue/simple"/> | |
<log message="Got Now... ${bean:counter?method=getAndIncrement}. message: ${body}"/> | |
<to uri="mongodb:myDb?collection=tickets&operation=save&database=flights"/> |
</route>
</camelContext>
<bean id="myDb" class="com.mongodb.Mongo">
<constructor-arg index="0" value="localhost"/>
</bean>
POM.XML (Camel part):
<dependency> | |
<groupId>org.apache.camel</groupId> | |
<artifactId>camel-mongodb</artifactId> | |
<version>2.15.1.redhat-620133</version> |
</dependency>
<dependency>
<groupId>org.mongodb</groupId> | |
<artifactId>mongo-java-driver</artifactId> | |
<version>3.0.3</version> |
</dependency>