Jboss OSGI,eclipse gemini blueprint,无效的bundle激活器

时间:2013-05-21 18:52:09

标签: java configuration jboss osgi blueprint-osgi

我正在尝试将eclipse-gemini-blueprint添加到wildfly 7.2ex-jboss

我在standalone-osgi.xml中添加了以下功能:

<capability name="personal.org.springframework.aop" startlevel="1"/>
<capability name="personal.org.springframework.asm" startlevel="1"/>
<capability name="personal.org.springframework.beans" startlevel="1"/>
<capability name="personal.org.springframework.context" startlevel="1"/>
<capability name="personal.org.springframework.core" startlevel="1"/>
<capability name="personal.org.springframework.expression" startlevel="1"/>
<capability name="personal.com.springsource.aopalliance" startlevel="1"/>
<capability name="personal.com.springsource.apachecommons" startlevel="1"/>
<capability name="personal.com.springsource.aspectjtools" startlevel="1"/>
<capability name="personal.org.eclipse.gemini-blueprint.core" startlevel="1"/>
<capability name="personal.org.eclipse.gemini-blueprint.extender" startlevel="1"/>
<capability name="personal.org.eclipse.gemini-blueprint.io" startlevel="1"/>

但是我收到以下错误:

ERROR [org.jboss.osgi.framework] (MSC service thread 1-5) JBOSGI011026: Framework Error: org.osgi.framework.BundleException: JBOSGI011254: Cannot start bundle: org.eclipse.gemini.blueprint.extender:2.0.0.M02
        at org.jboss.osgi.framework.spi.AbstractBundleAdaptor.start(AbstractBundleAdaptor.java:223) [jbosgi-framework-core-2.1.0.CR12.jar:2.1.0.CR12]
        at org.jboss.osgi.framework.internal.StartLevelImpl.increaseStartLevel(StartLevelImpl.java:246) [jbosgi-framework-core-2.1.0.CR12.jar:2.1.0.CR12]
        at org.jboss.osgi.framework.internal.FrameworkActive.createServiceValue(FrameworkActive.java:149) [jbosgi-framework-core-2.1.0.CR12.jar:2.1.0.CR12]
        at org.jboss.osgi.framework.internal.FrameworkActive.createServiceValue(FrameworkActive.java:105) [jbosgi-framework-core-2.1.0.CR12.jar:2.1.0.CR12]
        at org.jboss.osgi.framework.spi.AbstractIntegrationService.start(AbstractIntegrationService.java:60) [jbosgi-framework-core-2.1.0.CR12.jar:2.1.0.CR12]
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.4.GA.jar:1.0.4.GA]
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.4.GA.jar:1.0.4.GA]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_11]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_11]
        at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_11]
Caused by: org.osgi.framework.BundleException: JBOSGI011253: Invalid bundle activator: org.eclipse.gemini.blueprint.extender.internal.boot.ChainActivator
        at org.jboss.osgi.framework.spi.AbstractBundleAdaptor.start(AbstractBundleAdaptor.java:209) [jbosgi-framework-core-2.1.0.CR12.jar:2.1.0.CR12]
        ... 9 more

以前我在模块中有一些缺少的依赖项,我手动添加它们......

我该怎么做才能解决这个问题?这个错误并没有告诉我那么多......

1 个答案:

答案 0 :(得分:1)

将以下依赖项添加到standalone-osgi.xml会导致工作的Blueprint配置为Wildfly 8.0.0.Alpha1

<capability name="org.eclipse.gemini:org.eclipse.gemini.blueprint.core:1.0.2.RELEASE" startlevel="1"/>
<capability name="org.eclipse.gemini:org.eclipse.gemini.blueprint.extender:1.0.2.RELEASE" startlevel="1"/>
<capability name="org.eclipse.gemini:org.eclipse.gemini.blueprint.io:1.0.2.RELEASE" startlevel="1"/>
<capability name="org.springframework:org.springframework.aop:3.2.2.RELEASE" startlevel="1"/>
<capability name="org.springframework:org.springframework.beans:3.2.2.RELEASE" startlevel="1"/>
<capability name="org.springframework:org.springframework.core:3.2.2.RELEASE" startlevel="1"/>
<capability name="org.springframework:org.springframework.context:3.2.2.RELEASE" startlevel="1"/>
<capability name="org.springframework:org.springframework.expression:3.2.2.RELEASE" startlevel="1"/>
<capability name="org.apache.commons:com.springsource.org.apache.commons.logging:1.1.1" startlevel="1"/>
<capability name="org.aopalliance:com.springsource.org.aopalliance:1.0.0" startlevel="1"/>

通过这些功能,我能够获得一个简单的蓝图Hello World捆绑工作

注意:这是我第一次使用Jboss OSGi,因此不确定如何自定义嵌入式Maven工件解析器。上面使用的工件在Maven中心不存在,而是需要从Spring Repo获取。但是根据this thread,无法添加第三方存储库。所以我不得不分别在我当地的仓库中取出它们。如果有更好的方法,请告诉我