新版本的 JBossFuse 中突然出现未解决的约束

Unresolved constraint in bundle suddenly in new version of JBossFuse

我已经在网上搜索了解决方案,但 none 确实有效。我正在从 JBossFuse 6.2.1 迁移。到 JbossFuse 6.3.0。这包括升级我管理的依赖项,其中大部分。现在我遇到了这个错误:

Error executing command: Error starting bundles:
Unable to start bundle 390: Unresolved constraint in bundle pipeline-reception-ws-external-cxf [390]: Unable to resolve 390.0: missing requirement [390.0] osgi.wiring.package; (osgi.wiring.package=org.eclipse.jetty.http.ssl)

我正在使用以这种方式配置的 maven-bundle-plugin:

<plugin>
    <groupId>org.apache.felix</groupId>
    <artifactId>maven-bundle-plugin</artifactId>
    <extensions>true</extensions>
    <configuration>
        <instructions>
            <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
            <Bundle-Version>${project.version}</Bundle-Version>
            <Import-Package>
                org.apache.camel.*;version="[${camel.range.start},${camel.range.end})",
                ms.common.wsdl,template.velocity,org.eclipse.jetty.server,*
            </Import-Package>
            <Export-Package>
                eu.unicorn.basse.ms.pipeline.reception.route.ws.external.cxf.*
            </Export-Package>
            <_removeheaders>Import-Service</_removeheaders>
        </instructions>
    </configuration>
</plugin>

我不确定为什么它不能在旧的 JbossFuse 环境中运行。问题是,如何解决这个问题。

此错误表明您的环境不包含导出包 org.eclipse.jetty.http.ssl 的包。由于您的包导入中没有版本信息,这表明您在包的构建路径中也没有合适的捆绑版本(如果有,那么 maven-bundle-plugin 会找到一个版本并将其添加到你的导入)。

org.eclipse.jetty.http.ssl 上的这一要求对您的捆绑包来说是新的,或者它之前由 Fuse 6.2.1 中的另一个捆绑包提供,而 Fuse 6.3.0 中不再存在。

在任何情况下,您都需要从修复包开始,方法是将 Jetty 的相关部分放在构建路径上,以便在导入时获得版本范围,或者删除已泄漏到的新依赖项你的包。然后,如果需要,您可以简单地部署您的捆绑包所需的其他捆绑包。