You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

WSO2 APIM 4.1.0启动异常求助:OSGi依赖解析失败

解决WSO2 APIM 4.1.0启动失败的OSGi依赖解析错误

问题根源

从提供的启动错误日志来看,核心问题是org.wso2.carbon.identity.oauth模块无法解析waffle.util包的依赖(版本要求在[1.6.0,2.0.0)区间),这个依赖缺失导致上层的API管理相关模块(org.wso2.carbon.apimgt.impl、org.wso2.carbon.apimgt.notification)无法正常初始化,最终触发FrameworkEvent ERROR。

解决步骤

  • 1. 检查并添加Waffle依赖包
    前往WSO2 APIM安装目录,查看repository/components/lib文件夹中是否存在waffle-jna-1.6.x.jar(或版本在1.6.0到2.0.0之间的Waffle相关jar包)。如果没有,下载对应版本的jar包放入该目录。

  • 2. 清理冲突或无效依赖
    如果目录中存在多个版本的Waffle包,或者版本不符合要求,删除这些不符合的jar文件,只保留符合[1.6.0,2.0.0)版本范围的包。

  • 3. 清理缓存并重启服务
    停止APIM服务后,删除以下目录的全部内容:

    • repository/tmp
    • repository/carbonapps
      重新启动服务,检查启动日志是否消除该依赖错误。

错误日志参考

TID: [-1234] [] [2023-08-03 03:30:27,825] ERROR {Events.Framework} - FrameworkEvent ERROR org.osgi.framework.BundleException: Could not resolve module: org.wso2.carbon.apimgt.notification [277]
  Unresolved requirement: Import-Package: org.wso2.carbon.apimgt.impl; version="[9.0.0,10.0.0)"
    -> Export-Package: org.wso2.carbon.apimgt.impl; bundle-symbolic-name="org.wso2.carbon.apimgt.impl"; bundle-version="9.20.74.106"; version="9.20.74.106"; uses:="javax.xml.namespace,org.apache.axiom.om,org.apache.commons.logging,org.json.simple,org.json.simple.parser,org.wso2.carbon.apimgt.api,org.wso2.carbon.apimgt.api.dto,org.wso2.carbon.apimgt.api.model,org.wso2.carbon.apimgt.api.model.botDataAPI,org.wso2.carbon.apimgt.api.model.graphql.queryanalysis,org.wso2.carbon.apimgt.api.model.policy,org.wso2.carbon.apimgt.api.model.webhooks,org.wso2.carbon.apimgt.impl.dao,org.wso2.carbon.apimgt.impl.definitions,org.wso2.carbon.apimgt.impl.dto,org.wso2.carbon.apimgt.impl.monetization,org.wso2.carbon.apimgt.impl.recommendationmgt,org.wso2.carbon.apimgt.impl.workflow,org.wso2.carbon.apimgt.persistence.exceptions,org.wso2.carbon.governance.api.common.dataobjects,org.wso2.carbon.governance.api.generic,org.wso2.carbon.governance.api.generic.dataobjects,org.wso2.carbon.registry.api,org.wso2.carbon.registry.core,org.wso2.carbon.registry.core.exceptions,org.wso2.carbon.registry.core.service,org.wso2.carbon.registry.core.session,org.wso2.carbon.user.api"
       org.wso2.carbon.apimgt.impl [272]
         Unresolved requirement: Import-Package: org.wso2.carbon.identity.oauth; version="[6.0.0,7.0.0)"
           -> Export-Package: org.wso2.carbon.identity.oauth; bundle-symbolic-name="org.wso2.carbon.identity.oauth"; bundle-version="6.4.176.9"; version="6.4.176.9"; uses:="com.nimbusds.jwt,org.apache.commons.logging,org.wso2.carbon.core,org.wso2.carbon.core.common,org.wso2.carbon.identity.application.authentication.framework.model,org.wso2.carbon.identity.application.common.model,org.wso2.carbon.identity.base,org.wso2.carbon.identity.oauth.dao,org.wso2.carbon.identity.oauth.dto,org.wso2.carbon.identity.oauth2,org.wso2.carbon.identity.oauth2.model,org.wso2.carbon.identity.openidconnect.model,org.wso2.carbon.user.core"
              org.wso2.carbon.identity.oauth [484]
                Unresolved requirement: Import-Package: waffle.util; version="[1.6.0,2.0.0)"
         Unresolved requirement: Import-Package: org.wso2.carbon.identity.oauth.cache; version="[6.0.0,7.0.0)"
           -> Export-Package: org.wso2.carbon.identity.oauth.cache; bundle-symbolic-name="org.wso2.carbon.identity.oauth"; bundle-version="6.4.176.9"; version="6.4.176.9"; uses:="org.wso2.carbon.identity.application.authentication.framework.model,org.wso2.carbon.identity.application.common.cache,org.wso2.carbon.identity.application.common.model,org.wso2.carbon.identity.oauth.dao,org.wso2.carbon.identity.oauth2.bean,org.wso2.carbon.identity.oauth2.model,org.wso2.carbon.identity.openidconnect.model"
  Unresolved requirement: Import-Package: org.wso2.carbon.apimgt.impl.dao; version="[9.0.0,10.0.0)"
    -> Export-Package: org.wso2.carbon.apimgt.impl.dao; bundle-symbolic-name="org.wso2.carbon.apimgt.impl"; bundle-version="9.20.74.106"; version="9.20.74.106"; uses:="org.apache.commons.lang3.tuple,org.json.simple,org.wso2.carbon.apimgt.api,org.wso2.carbon.apimgt.api.dto,org.wso2.carbon.apimgt.api.model,org.wso2.carbon.apimgt.api.model.botDataAPI,org.wso2.carbon.apimgt.api.model.graphql.queryanalysis,org.wso2.carbon.apimgt.api.model.policy,org.wso2.carbon.apimgt.api.model.subscription,org.wso2.carbon.apimgt.api.model.webhooks,org.wso2.carbon.apimgt.impl.certificatemgt.exceptions,org.wso2.carbon.apimgt.impl.dto,org.wso2.carbon.apimgt.impl.gatewayartifactsynchronizer.environmentspecificproperty"

    at org.eclipse.osgi.container.Module.start(Module.java:457)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel$1.run(ModuleContainer.java:1820)
    at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor$2$1.execute(EquinoxContainerAdaptor.java:150)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1813)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1770)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1735)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1661)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
    at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:234)
    at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:345)

内容的提问来源于stack exchange,提问作者Durga prasad Matta

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.07.14 17:15:56