将我的插件放入 Eclipse 的 dropins 目录时出现“找不到存储库...”错误
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/9883199/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
getting "no repository found at..." error when placing my plugin into Eclipse's dropins directory
提问by user1056027
i am using eclipse 3.5 to create a simple plugin bearing an extension point. i built it using headless pde build via ant. the plugin functions properly. i then proceeded to test its extension point by placing my plugin jar into eclipse_home/dropins with intention of eventually creating an extension. but after i start eclipse, i get the following error in its log:
我正在使用 eclipse 3.5 创建一个带有扩展点的简单插件。我使用无头 pde 通过 ant 构建它。插件功能正常。然后我通过将我的插件 jar 放入 eclipse_home/dropins 来测试它的扩展点,目的是最终创建一个扩展。但是在我启动 eclipse 后,我在其日志中收到以下错误:
!ENTRY org.eclipse.equinox.p2.core 4 0 2012-03-22 01:00:45.270
!MESSAGE Provisioning exception
!STACK 1
org.eclipse.equinox.internal.provisional.p2.core.ProvisionException: No repository found at file:/C:/eclipse35/dropins/MyPlugin/.
at org.eclipse.equinox.internal.p2.repository.helpers.AbstractRepositoryManager.fail(AbstractRepositoryManager.java:380)
at org.eclipse.equinox.internal.p2.repository.helpers.AbstractRepositoryManager.loadRepository(AbstractRepositoryManager.java:641)
at org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositoryManager.loadRepository(MetadataRepositoryManager.java:92)
at org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositoryManager.loadRepository(MetadataRepositoryManager.java:88)
at org.eclipse.equinox.internal.p2.reconciler.dropins.Activator.loadMetadataRepository(Activator.java:90)
at org.eclipse.equinox.internal.p2.reconciler.dropins.DropinsRepositoryListener.getMetadataRepository(DropinsRepositoryListener.java:184)
at org.eclipse.equinox.internal.p2.reconciler.dropins.DropinsRepositoryListener.addRepository(DropinsRepositoryListener.java:79)
at org.eclipse.equinox.internal.p2.reconciler.dropins.DropinsRepositoryListener.added(DropinsRepositoryListener.java:57)
at org.eclipse.equinox.internal.provisional.p2.directorywatcher.DirectoryWatcher.processFile(DirectoryWatcher.java:200)
at org.eclipse.equinox.internal.provisional.p2.directorywatcher.DirectoryWatcher.scanDirectories(DirectoryWatcher.java:161)
at org.eclipse.equinox.internal.provisional.p2.directorywatcher.DirectoryWatcher.poll(DirectoryWatcher.java:108)
at org.eclipse.equinox.internal.p2.reconciler.dropins.Activator.watchDropins(Activator.java:491)
at org.eclipse.equinox.internal.p2.reconciler.dropins.Activator.start(Activator.java:167)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.run(BundleContextImpl.java:782)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:773)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:754)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:352)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:370)
at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1068)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:557)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:464)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:248)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:445)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:220)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:330)
i have tried both just placing the plugin jar directly in the dropins directory, as well as using the following directory structure: eclipse_home/dropins/MyPlugin/plugins/myplugin.jar. both approaches work just fine with 3rd party plugins, but not with mine. please let me know what i am doing wrong. thank you!
我已经尝试将插件 jar 直接放在 dropins 目录中,以及使用以下目录结构:eclipse_home/dropins/MyPlugin/plugins/myplugin.jar。这两种方法都适用于 3rd 方插件,但不适用于我的。请让我知道我做错了什么。谢谢你!
回答by Fredrik
It seems like two problems. The "no repository found" error message looks like this problem. And then there is the issue with your plugin not starting.
好像有两个问题。“未找到存储库”错误消息看起来像这个问题。然后是您的插件无法启动的问题。
First you should check if the plugin is found. Then you should check if the plugin is resolved, i.e if all requirements are fulfilled.
首先,您应该检查是否找到了插件。然后您应该检查插件是否已解决,即是否满足所有要求。
If you have the plugin development version of Eclipse, then you can open the plugin registry view. See if your plugin is in the list, if so, then the atleast it has been found. Then right click on it, enable advanced operations, and after that choose diagnose. Some requirement has probably not been fulfilled.
If you dont have the Plugin version of Eclipse, you can use the osgi console. Go to console view, and choose OSGI console in the view menu.
Run command ss
to list all plugins, and diag 123
where the number is the id of your plugin to diagnose it.
如果您有 Eclipse 的插件开发版本,那么您可以打开插件注册表视图。查看您的插件是否在列表中,如果是,则至少已找到它。然后右键单击它,启用高级操作,然后选择诊断。一些要求可能没有得到满足。如果你没有 Eclipse 的 Plugin 版本,你可以使用 osgi 控制台。转到控制台视图,然后在视图菜单中选择 OSGI 控制台。运行命令ss
以列出所有插件,diag 123
其中数字是用于诊断插件的 id。
Also, see a previous answer to a similar question
Edit: Oh, and I have been having some serious problemsgetting plugins placed in the dropins catalog to work at times... You could try to copy it to the eclipse/plugins
catalog directly.
编辑:哦,我在将插件放置在 dropins 目录中时遇到了一些严重的问题……您可以尝试直接将其复制到eclipse/plugins
目录中。