Search code examples
jbossfuse

Unresolved constraint in bundle - osgi.wiring.package; (osgi.wiring.package=org.apache.camel.routepolicy.quartz)


I'am new with Jboss Fuse 6.3. I need to pull some files from a FTP server at a scheduled time. I found one solution that use 'CronScheduledRoutePolicy' (http://camel.apache.org/cronscheduledroutepolicy.html). I tried to use this solution in my bundle in this way:

    <bean id="startPolicy" class="org.apache.camel.routepolicy.quartz.CronScheduledRoutePolicy">
        <property name="routeStartTime" value="{{epayment.authorization.timer.cron}}"/>
    </bean>

    <camelContext id="epayment-batch" autoStartup="{{batch.authorization.autoStartup}}" trace="false" xmlns="http://camel.apache.org/schema/blueprint">

        <route id="pullFileFromFtp" routePolicyRef="startPolicy" autoStartup="false">
            <from uri="ftp://{{epayment.batch.username}}@{{epayment.batch.host}}{{epayment.batch.remotePath}}?password={{epayment.batch.password}}&amp;move={{epayment.batch.remotePath.bkp}}"/>
            <to uri="file://{{epayment.batch.localPathOut}}"/>
            <log message="This is the body: ${body}"/>
        </route>

    </camelContext>
</blueprint>

but when Jboss Fuse starts, I receive this exception:

org.osgi.framework.BundleException: Unresolved constraint in bundle epayment [303]: Unable to resolve 303.0: missing requirement [303.0] osgi.wiring.package; (&(osgi.wiring.package=org.apache.camel.routepolicy.quartz)(version>=2.18.0)(!(version>=3.0.0)))
    at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4002)
    at org.apache.felix.framework.Felix.startBundle(Felix.java:2045)
    at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1299)
    at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:304)
    at java.lang.Thread.run(Unknown Source)

Someone can help me? I tried to deploy camel-quartz-2.18.1.jar (coping it into deploy dir) but it is not helpful.


Solution

  • you can add this package in the import-packages section of maven-bundle-plugin at pom.xml.

    Incase, this jar is still not installed in your server, use below command:

    JBossFuse:karaf@root>install camel-quartz