JBoss Fuse:java.lang.IllegalStateException:资源没有安装bundle的uri

时间:2016-06-22 14:42:58

标签: osgi jbossfuse fuseesb blueprint-osgi

我正在研究JBossFuse 6.2,有一个CXF端点,我需要通过httpj:engine-factory配置块设置一些特殊属性。一旦尝试,我就讨论了这个问题 MapMetadataImpl not found by org.apache.cxf.cxf-rt-transports-http-jetty

错误如下

> ERROR | pool-43-thread-1 | BlueprintContainerImpl | 14 -
> org.apache.aries.blueprint.core - 1.4.2 | Unable to start blueprint
> container for bundle test-ws java.lang.NoClassDefFoundError:
> org/apache/aries/blueprint/reflect/MapMetadataImpl at
> org.apache.cxf.transport.http_jetty.blueprint.JettyServerEngineFactoryParser.parseEngineConnector(JettyServerEngineFactoryParser.java:110)
> at
> org.apache.cxf.transport.http_jetty.blueprint.JettyServerEngineFactoryParser.parse(JettyServerEngineFactoryParser.java:83)

尝试为CXF定义添加httpj块时出现。

<httpj:engine-factory bus="cxf">
    <httpj:engine port="${port}" host="${host}">
        <httpj:threadingParameters minThreads="${minThreads}" maxThreads="${maxThreads}"/>
    </httpj:engine>
</httpj:engine-factory>

我在为蓝图核心兼容性安装osgi包的推荐帖子中尝试了所提供的解决方案。

osgi:install mvn:org.apache.aries.blueprint/org.apache.aries.blueprint.core.compatibility/1.0.0

但是,在容器启动后安装bundle后,我得到以下异常:

 2016-06-22 11:01:13,279 | ERROR | 63859-1-thread-1 | DeploymentAgent                  | ?? | 83 - io.fabric8.fabric-agent - 1.2.0.redhat-133 | Unable to update agent 
    java.lang.IllegalStateException: Resource has no uri
    at io.fabric8.agent.service.Deployer.getBundleInputStream(Deployer.java:1354)[83:io.fabric8.fabric-agent:1.2.0.redhat-133]
    at io.fabric8.agent.service.Deployer.deploy(Deployer.java:714)[83:io.fabric8.fabric-agent:1.2.0.redhat-133]
    at io.fabric8.agent.service.Agent.provision(Agent.java:348)[83:io.fabric8.fabric-agent:1.2.0.redhat-133]
    at io.fabric8.agent.service.Agent.provision(Agent.java:194)[83:io.fabric8.fabric-agent:1.2.0.redhat-133]
    at io.fabric8.agent.DeploymentAgent.doUpdate(DeploymentAgent.java:642)[83:io.fabric8.fabric-agent:1.2.0.redhat-133]
    at io.fabric8.agent.DeploymentAgent$2.run(DeploymentAgent.java:256)[83:io.fabric8.fabric-agent:1.2.0.redhat-133]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.7.0_80]
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)[:1.7.0_80]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)[:1.7.0_80]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)[:1.7.0_80]
    at java.lang.Thread.run(Thread.java:745)[:1.7.0_80]

有没有人在JbossFuse中应用过提议的解决方案?我没有了解为什么要解雇该异常的事件。

先谢谢!

1 个答案:

答案 0 :(得分:0)

我有人属于这个,我从Red Hat的某个人那里得到了答案。我遇到的问题是我在Fabric环境中,所以我不得不将OSGi Blueprint Core Compatibility捆绑包添加到Fabric中的Karaf配置文件中。它可以通过运行以下命令从karaf控制台完成

profile-edit --bundles mvn:org.apache.aries.blueprint/org.apache.aries.blueprint.core.compatibility/1.0.0 karaf 1.x

其中1.x是当前正在使用的结构版本。

如果您不在结构环境中,那么上面发布的解决方案应该可以正常工作。

希望这有帮助!