bundle中的未解决约束 - osgi.wiring.package; (osgi.wiring.package = org.apache.camel.routepolicy.quartz)

时间:2017-02-06 14:44:46

标签: jbossfuse

我是Jboss Fuse 6.3的新手。我需要在预定的时间从FTP服务器中提取一些文件。我找到了一个使用' CronScheduledRoutePolicy' (http://camel.apache.org/cronscheduledroutepolicy.html)。我尝试以这种方式在我的包中使用此解决方案:

    <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>

但是当Jboss Fuse启动时,我收到了这个例外:

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)
有人可以帮帮我吗?我尝试部署camel-quartz-2.18.1.jar(将其应用到deploy dir中),但它没有帮助。

1 个答案:

答案 0 :(得分:1)

你可以在pom.xml的maven-bundle-plugin的import-packages部分添加这个包。

此外,您的服务器中仍未安装此jar,请使用以下命令:

JBossFuse:karaf @ root&gt; install camel-quartz