getting "no repository found at..." error when placing my plugin into Eclipse's dropins directory - eclipse

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:
!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!

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.
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.

Related

How to setup the project & workspace for building Androlate; an Eclipse Plugin

Does anyone know how to properly setup an Eclipse project in order to build the Androlate plugin; which can be found at http://code.google.com/p/androlate/issues/list?
I need this in order to replace the older Google translation code - which no longer works - with the newer Bing Translation code (see Issue #2 of this plugin for more information).
I've never built an Eclipse plugin before and all my attempts so far for this plugin have failed. However, I'm able to build the plugin examples given by Eclipse and I've also be able to build the complex Motodev plugin (http://www.motorola.com/sites/motodev/library/motodev_core_plugins.html); therefore my environment (Eclipse Juno) should be correct.
First, the source for this plugin is lacking its .project File; so I had to trick Eclipse in order to import this project into the workspace by overwriting a new plugin project over the source files. (BTW, does anyone knows why is it so difficult to simply add an existing project to the current workspace in Eclipse? Why did they have to make such a simple task so difficult?).
Second, when I try to launch this plugin under Debug Mode as an Eclipse application, I first got multiple error messages: Can't find bundle for base name feature, locale en_US.
Finally, when I try the plugin itself, I got the error Logging bundle must not be null at the line 60 of the AndrolateWizard.java file; indicating that the call to Platform.getBundle(Activator.PLUGIN_ID) at the previous line (line 59) return a null bundle.
This is because the Plugin Id specified in the activator does not match the plugin id specified in your MANIFEST.MF [Check and correct it to com.cicadalane.androlate]
Old post, but here is an androlate gradle plugin if it helps anyone https://github.com/ayvazj/gradle-androlate-plugin

using the eclipse extension points in virgo

I am encountering a problem here...our team is trying to port an eclipse Eclipse RCP project into the web and so the first step is to try to use Virgo to use the plugins. I have created all the correct things but when I try to use an extension point (an Eclipse concept) it gives me a null pointer exception on this call:
org.eclipse.core.runtime.Platform.getextensionregistry(); // null here
Does anyone have any experience when it comes to solving this problem?
Thanks,
Tom
UPDATE:
So I got a little further with this. I've added the org.eclipse...registry bundle along with its associated bundles to the repository/usr folder and had to manually login to the console to start it up after I start up my web app. However this is still a problem because now my app doesn't seem to have any of the extension points registered. Could it be the sequence in which the app is started? (ie. I have to start the registry bundle first)?
A first step would be to add the eclipse registry bundle to the initial artifacts for the user region; in org.eclipse.virgo.kernel.userregion.properties, change initialArtifacts to:
initialArtifacts=repository:plan/org.eclipse.virgo.kernel.userregion.blueprint,repository:plan
/org.eclipse.virgo.web.tomcat,repository:configuration/org.eclipse.virgo.apps.repository,repository:plan/org.eclipse.virgo.management,repository:bundle/org.eclipse.equinox.registry
This will at least ensure that the registry plugin is available while your eclipse plug-ins are being loaded.
What I am still struggling with is figuring out how to control which plugin.xml are loaded by the registry and what triggers that. Somehow some eclipse runtime will scan some plugins directory, but how to set that up while in Virgo is still unclear to me.

Eclipse RCP- org.eclipse.ui.plugin missing

I've written an Eclipse RCP application that runs fine in Eclipse, however, packaging it to be a standalone application has been tricky. I've worked my way though a few class path errors, but now I'm getting a new one.
After running the export wizard and launching my application, it throws a ClassDefError and ClassNotFoundException, specifically it's looking for org.eclipse.ui.plugin.AbstractUIPlugin. I did not find this in my copy of the eclipse SDK, and I downloaded the SDK again to be sure, and still couldn't find it. I found a jar online that supposedly contained the fiel along with some other eclipse packages, however, I then got this:
NoSuchMethodError: org.eclipse.ui.plugin.AbstractUIPlugin: method ()V not found
I figure the problem is more I did something wrong rather than this class is actually missing, but I've gone though all the configurations and I'm sure all the required packages and dependencies are included. Any ideas?
Download and install the new version of adt plugin 21.0.0.
Does your application works when you run from Eclipse? If so then try to open your plugin.xml, go to Runtime and on the bottom right part of the window you should see Classpath. Try adding the required plugins there.

Eclipse Galileo - JUnit missing

Build Path > Add Library > JUnit unable to add JUnit3 or JUnit4 components.
I see such message in the .log
!MESSAGE No property tester contributes a property projectPersistentProperty org.eclipse.team.core.repository to type class org.eclipse.core.internal.resources.Project
Eclipse Galileo installed by root user on Linux.
It works well for root and for other users except this JUnit issue.
Why it lost Junit?
(I've checked file permissions twice - all readable!)
This seems to be related to bug 239715, triggered by TypeExtensionManager.java, and due to some kind of plugins combination.
Could you check if your org.eclipse.core.expressions/.options file has the line
org.eclipse.core.expressions/debug/TypeExtensionManager=false
This should be enough to make that error message disappear.
That file is <eclipse-SDK-3.5-win32>\eclipse\plugins\org.eclipse.core.expressions_3.4.100.v20090429-1800.jar, and I just checked, it does contains the right option value (with latest Galileo) (are you using an older Galileo RC or Milestone release?).
Ah, I was getting this problem this morning. A search showed that it was possibly related to JGit/Egit. After updating the EGit plugin from 0.5 to 0.6, the errors have not returned.
You can make a variable junit or smtg similar to your customized one, add the junit folder to this varible, and give extension of it as junit4.8.1.jar.
I tried this and it works, but you have to delete any plugins of junit of version4 if present from plugins folder.

Modifying Existing Eclipse Plugin and Correctly Installing it

I downloaded the source code for the EMF based UML2 Plugin and changed a class in the org.eclipse.uml2.uml.edit project to remove special characters when returning string representations. Now when I export the projects and place the jar files either in the dropins directory or replace my current uml2 plugin jar files in plugins directory, The UML files are no longer recognized, in short my modified plugin does not install correctly (no error is thrown and I can see the files being picked up under Plugins->Target Platform) .
However, When I run the plugin as an eclipse application (from the workspace) I can see the changes I made being reflected in the new instance of eclipse.
What can I do to ensure that the plugin installs correctly?
Is there a documented procedure of how to build the uml2 plugin (or any comparable plugin) after modification?
Select the project and open the context menu. There is an entry PDE near the bottom of the menu. In there, you can find an entry to build the plugin for deployment. This gives you the features and plugins directory with the fixed files. Copy both into your Eclipse install.
Unless the UML2 plugins require some kind of magic build script, exporting the one plugin you changed and overwriting the original in your Eclipse installation should be the easiest solution. One potential problem which comes to mind is conflicting plugin version numbers: make sure you don't have two identical versions of your modified plugin in your Eclipse installation.
When debugging plugins which apparently don't work properly at runtime, I always look at Help > About Eclipse Platform > Configuration Details. This lists all the plugins found by Equinox during startup, along with their status (see the Javadoc of the org.osgi.framework.Bundle interface for explanation).
I faced the exact same problem as you describe here . I dont have any answer to your problem but i am sharing what worked for me .
I created a local update site of the plugin on my system. Create update site for your plug-in article explains very very nicely the steps needed to accomplish this .