当将我的插件放到Eclipse的dropins目录中时,会出现“在…上没有找到存储库”的错误

时间:2021-07-19 11:27:53

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创建一个包含扩展点的简单插件。我通过ant使用无头pde构建它。插件功能正常。然后,我将插件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$1.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。这两种方法在第三方插件上都很好用,但在我的插件上就不行了。请让我知道我做错了什么。谢谢你!

1 个解决方案

#1


3  

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.

首先,你应该检查插件是否找到。然后你应该检查插件是否被解析,i。e如果所有的要求都得到满足。

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的插件开发版本,那么您可以打开插件注册表视图。看看你的插件是否在列表中,如果是的话,那么至少它已经被找到了。然后右键单击它,启用高级操作,然后选择diagnosis。有些要求可能还没有实现。如果您没有Eclipse的插件版本,您可以使用osgi控制台。转到控制台视图,并在视图菜单中选择OSGI控制台。运行命令ss来列出所有的插件,并且diag 123,其中编号是您的插件的id来诊断它。

Also, see a previous answer to a similar question

同样,请参见之前对类似问题的回答

Edit: Oh, and I have been having some serious problems getting 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目录。

#1


3  

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.

首先,你应该检查插件是否找到。然后你应该检查插件是否被解析,i。e如果所有的要求都得到满足。

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的插件开发版本,那么您可以打开插件注册表视图。看看你的插件是否在列表中,如果是的话,那么至少它已经被找到了。然后右键单击它,启用高级操作,然后选择diagnosis。有些要求可能还没有实现。如果您没有Eclipse的插件版本,您可以使用osgi控制台。转到控制台视图,并在视图菜单中选择OSGI控制台。运行命令ss来列出所有的插件,并且diag 123,其中编号是您的插件的id来诊断它。

Also, see a previous answer to a similar question

同样,请参见之前对类似问题的回答

Edit: Oh, and I have been having some serious problems getting 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目录。