运行 测试 IntelliJ for OSGi 包时出错

Error while running tests on IntelliJ for OSGi bundle

我正在为 Linux

使用 IntelliJ IDEA Ultimate 版本 2018.1.1

在尝试 运行 测试一个由来自 Intellij 的 OSGi 包组成的 Maven 项目时,我不断遇到下面提到的错误

Error:osgi: [org.wso2.carbon.identity.oauth] In component <name not yet determined>, method framework.authentication.context.method.name.translator,  cannot recognize the signature of the descriptor: ()V
Error:osgi: [org.wso2.carbon.identity.oauth] In component class org.wso2.carbon.identity.oauth2.internal.OAuth2ServiceComponent, reference framework.authentication.context.method.name.translator is dynamic but has no unbind method.
Error:osgi: [org.wso2.carbon.identity.oauth] No interface specified on framework.authentication.context.method.name.translator

有没有人遇到过这个问题?

我找到了类似的问题 here

通过删除项目中的 OSGi 方面解决了此问题,并且测试成功。

要删除 OSGi 方面,请转到项目结构 -> 项目设置 -> 方面; select 并删除 OSGi 方面。

如果您重新导入所有项目,问题会再次出现。要永久修复它,请从 intellij 中删除插件 Osmorc。 您可以通过转到 Intellij -> 首选项 -> 插件来做到这一点 搜索 Osmorc 并取消选中复选框并重新启动 intellij

从 IntelliJ IDEA 2019.2 版开始,我无法在已安装的插件下找到 Osmorc 插件,相反,禁用 OSGi 插件帮助了我。