开发者模式下构建openChrom时无法安装转换器
openChrom开发中安装转换器时出现
Profile id _SELF_ is not registered错误的解决方案 我正在为openChrom开发插件扩展,按照官方GitHub指南完成仓库克隆并成功启动应用,但尝试安装转换器时控制台抛出如下错误:
java.lang.IllegalArgumentException: Profile id _SELF_ is not registered. at org.eclipse.equinox.internal.p2.director.ProfileChangeRequest.createByProfileId(ProfileChangeRequest.java:49) at org.eclipse.equinox.p2.operations.InstallOperation.computeProfileChangeRequest(InstallOperation.java:74) at org.eclipse.equinox.p2.operations.ProfileChangeOperation.makeResolveJob(ProfileChangeOperation.java:168) at org.eclipse.equinox.p2.operations.ProfileChangeOperation.resolveModal(ProfileChangeOperation.java:115) at net.openchrom.installer.ui.discovery.PrepareInstallProfileJob.resolve(PrepareInstallProfileJob.java:125) at net.openchrom.installer.ui.discovery.PrepareInstallProfileJob.run(PrepareInstallProfileJob.java:95) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:124)
已尝试移除并重新添加项目、调整产品配置,但问题未解决,作为RCP新手寻求解决方案。
解决方案:
检查产品配置的P2设置
打开openChrom的.product文件,切换到Provisioning标签页:- 确认Profile ID字段设置为
_SELF_,确保该配置文件已在产品配置中注册 - 验证P2存储库配置是否正确,需包含openChrom官方更新站点
- 确认Profile ID字段设置为
调整启动配置的VM参数
在Eclipse运行配置中,为你的openChrom应用添加VM参数:-Dorg.eclipse.equinox.p2.profile=_SELF_同时确保启动配置中包含P2核心相关bundle:
org.eclipse.equinox.p2.core、org.eclipse.equinox.p2.director、org.eclipse.equinox.p2.operations等重新构建P2元数据与清理项目
- 在产品配置页面点击Add Required Plug-ins,确保所有依赖的P2插件被自动添加
- 执行
Project > Clean清理所有项目,再重新启动应用
重置工作区P2缓存
删除工作区目录下.metadata/.plugins/org.eclipse.equinox.p2.core/的所有缓存文件,然后重启Eclipse,让P2重新初始化配置文件
内容的提问来源于stack exchange,提问作者Evan Lou
相关产品推荐
相关产品推荐

