【问题标题】:OSGi plugin won't start in tomcatOSGi 插件不会在 tomcat 中启动
【发布时间】:2009-03-30 18:54:18
【问题描述】:

我有一个带有激活器的 OSGi 插件,我要求在我的 tomcat jsf 项目下启动它。

基于:http://www.eclipse.org/equinox/documents/quickstart.php 和其他一些文档,我已将此结构放在我的 WEB-INF 目录下,以启动 osgi 的Equinox 实现。我已经能够直接访问插件,但不能通过从另一个插件引用它以编程方式访问它。就是这个例子。

我的项目 配置/ 配置文件 org.eclipse.osgi_3.3.0.jar org.eclipse.equinox.common_3.3.0.jar org.eclipse.update.configurator_3.2.100.jar 插件/ com.fnet.tts.service_1.0.0.jar

我在config.ini中放了以下两行

osgi.bundles=org.eclipse.equinox.common@2:start, org.eclipse.update.configurator@start, org.eclipse.equinox.registry@3:start, com.fnet.tts.service@4 :开始 osgi.bundles.defaultStartLevel=4

但是,当我尝试激活调用 tts.service 的包时,我收到了这个错误。

详情: com.fnet.runtime.KSException:无法启动捆绑“com.fnet.tts.service.viewSchedule_2.0.0.jar” 在 com.runtime.impl.RuntimeServiceImpl$KSImpl .loadKnowledgebase(RuntimeServiceImpl.java:190) 在 com..loadKnowledgebaseHandle(InterviewContext.java:83) 原因:org.osgi.framework.BundleException:无法解析捆绑包。 原因:缺少约束:Require-Bundle: com.fnet.tts.service;捆绑版本="1.0.0" 在 org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(Bundl eHost.java:305) 在 org.eclipse.osgi.framework.internal.core.AbstractBundle.start(Abstract tBundle.java:265) 在 org.eclipse.osgi.framework.internal.core.AbstractBundle.start(Abstract tBundle.java:257) 在 com.fnet.runtime.impl.RuntimeServiceImpl$KSImpl .loadKnowledgebase(RuntimeServiceImpl.java:188) ... 3 更多

我已经看了好几个小时了,我正在寻找线索、提示或答案,以便继续前进。

谢谢。

【问题讨论】:

    标签: tomcat plugins eclipse-plugin osgi


    【解决方案1】:

    您能否启用更多调试输出以查看“com.fnet.tts.service”捆绑包发生了什么? Equinox 是否尝试加载它但失败了,或者根本没有尝试?

    另外,您可以访问 OSGi 控制台吗?如果是这样,已安装捆绑包的列表如何?您可以从控制台手动安装捆绑包吗?

    您在开始级别 4 开始您的捆绑包。可能尚未达到此开始级别。当您在第 1 级启动捆绑包(所有捆绑包?)时,它是否有效?

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-11-06
      • 2013-02-03
      • 2016-04-27
      • 2023-03-16
      • 1970-01-01
      • 2016-04-17
      • 1970-01-01
      相关资源
      最近更新 更多