You need to enable JavaScript to run this app. OSGi项目新增bundle时osgi.wiring.package类型解析失败问题咨询
优惠活动
大模型
产品
解决方案
定价
更多

OSGi项目新增bundle时osgi.wiring.package类型解析失败问题咨询

OSGi bundle解析失败问题排查

你遇到的osgi.wiring.package=io.openems.edge.simulator报错核心源于OSGi基于包导入导出的类加载机制:仅配置编译/构建阶段的bundle级依赖,无法保证运行时解析通过,常见触发原因如下:

  • io.openems.edge.simulator bundle未导出对应包
    检查simulator bundle的bnd.bnd文件或maven-bundle-plugin配置中的Export-Package字段,确认是否显式声明导出了io.openems.edge.simulator包,以及导出的版本号范围。
  • 新增bundle的包导入版本要求不匹配
    检查io.openems.edge.dieselgenerator bundle的Import-Package配置,确认你对io.openems.edge.simulator的版本要求,和simulator实际导出的版本范围是否兼容,比如你要求版本>=2.0.0,但simulator仅导出1.x版本就会触发该错误。
  • simulator bundle未加入运行时部署列表
    你仅配置了编译阶段的依赖,但OSGi容器启动配置(如bndrun文件、feature配置、启动bundle列表)中未包含io.openems.edge.simulator bundle,运行时无对应bundle存在,自然无法找到其导出的包。
  • 其他解析错误的连锁影响
    报错中还存在logback、jetty、osgi.cmpn的解析失败问题,全局解析失败会阻断所有bundle的依赖校验,建议先修复其他明显的依赖错误,再验证你新增bundle的解析状态。

如果需要进一步定位问题,可补充以下信息:

  1. io.openems.edge.simulator bundle的导出包配置内容
  2. io.openems.edge.dieselgenerator bundle的打包依赖配置(bnd文件、maven打包插件配置)
  3. OSGi运行时的启动部署配置

内容的提问来源于stack exchange,提问作者Charles

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.10.12 09:21:03