I've a really strange problem here with eclipse ... I've defined a target definition within my eclipse and set it to be the active target platform.
After my workspace has been built eclipse complains about that it cannot resolve the bundle javax.inject although I can find it in the target platform ...
Here a screenshot from my target platform with the "missing" plug-in:
The strange thing is now that I also cannot find it in the run configuration as this screenshot clearly shows:
In my manifest where I've a dependency to this plug-in it also says that the bundle cannot be resolved, but when I double-click on the plug-in it opens and says that the plug-in can be found under the following directory: \.metadata\.plugins\org.eclipse.pde.core\.bundle_pool\plugins
I've struggled all day long to solve this problem, but I couldn't find anything out except that this problem seems to occure with eclipse Juno only ... I've installed eclipse Luna and with this version it works well, but our default IDE is Juno so it needs to work with this version as well ...
I've absolutely no idea what is going wrong here because I always thought the meaning of a target platform is exactly this to resolve such dependencies between different kind of eclipse versions ...
Related
So I have just installed the latest eclipse version (4.6.3) on my laptop which had 4.6.2 running before.
The problem is that all my eclipse plugin projects are now full of errors because it somehow can't resolve various bundles (swt, osgi, eclipse.core, eclipse.ui, etc).
Furthermore I have noticed that the target platform the PDE sets up as default (which is the running platform) complains that it can't find the respecive plugins either.
I don't know if these two issues are connected but it seems to me that eclipse can't find it's own plugins which would be very weird...
Does someone has an idea on how to fix this?
I'm developing an eclipse plugin with a view. When launched in dev mode it's displaying and working perfectly fine:
But when I packaged and installed the plugin in the Eclipse instance, the view is empty when launched:
EDIT:
Looking at Error Log view, sometimes there is the following error:
org.eclipse.e4.core.di.InjectionException: java.lang.NoClassDefFoundError: swing2swt/layout/BorderLayout
It might be relevant because a swing2swt.jar was magically automatically added to my plugin project by Eclipse. I tried including it in the build but the build failed complaining there is no value set for source.swing2swt.jar which I totally don't understand why it needs setting.
I have found the solution to this problem.
The problem itself is caused by swing2swt.jar not included in the build. For some reason WindowBuilder automatically added this jar to the project but didn't mark it for inclusion in the build.
However the struggle here is because Eclipse doesn't delete plugin jar files when uninstalling "software" that was previously installed. So if the version does not advance, the cached old, wrong plugin jar file will be reused when reinstalling the feature, causing any non-version-advancing fixes uneffective when reinstalling the feature/plugin.
It is so very common that during the development of a plugin, version does not advance for small fixes when trying distribution so I think this needs to be fixed. A ticket has been created at Eclipse site.
Bug 509781
I recently upgraded from Eclipse Kepler to Luna. A plugin I had been working on is now showing build errors without any source being changed.
Here is an extract from my MANIFEST.MF,
Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
org.eclipse.ui;bundle-version="3.7.0",
org.eclipse.ui.ide;bundle-version="3.7.0",
org.eclipse.core.resources;bundle-version="3.7.0",
org.eclipse.ui.forms;bundle-version="3.6.0",
org.eclipse.wst.sse.ui;bundle-version="1.3.0",
org.eclipse.jface.text;bundle-version="3.8.100",
org.eclipse.ui.workbench.texteditor;bundle-version="3.8.101",
org.eclipse.ui.views;bundle-version="3.6.0"
None of the core or ui bundles are resolved. I don't think Eclipse could even run without them and their equivalent .jar files are present and readable and haven't been modified as part of the upgrade, so they are not actually missing. When I try to add dependencies on the Dependencies tab the problem bundles do not show.
Eclipse was upgraded by the Arch Linux package manager. I mention it for completeness but believe it is likely identical to any other upgrade mechanism. I also tried creating a new plug-in project but the same happens, I guess this means it's a global setting. I'm relatively new to PDE and so far haven't had a need to change any settings.
From the preference page (Preferences > Plug-in Development > Target Platform), try Removing the Running Platform target definition, Applying, and then Restoring Defaults. Maybe it's just stale and pointing to the jars that it doesn't know Arch has changed about.
I checked in eclipse/java plugin project from svn repository.
Eclipse automatically builds the code to show hundreds of errors.
It seems like that eclipse doesn't properly link to the plugin libraries. Googling to find this site that I need dependencies and other tabs in plugin.xml.
What might be wrong? I use Indogo(3.7) on Mac OS X 10.7.4
I used Indigo (3.7) for my Mac, but it happened so that the plugin was built on Helios (3.6). When I run the plugin using Helios, I got the project compiled without errors.
It seems like that some of the plugins are (heavily) version dependent.
Looks like you got the base XML editor instead of the plugin.xml editor.
This is probably caused by your not having the eclipse plugin development environment (PDE) enabled in a new workspace.
Try creating a new plugin project (this will enable the necessary plugin tools), or go to the preferences and enable the "correct" capability. Since the capabilities seem to change from release to release, I always use the first method and then delete the new project.
I have a maven plugin that transforms class bits after compilation. This plugin works precisely as designed when run from the command line. However, the problem arises in Eclipse (3.6.1) when the Maven project is building from a clean state. What happens is that I get an error message in the console informing me that my plugin has failed due to the inability to find a class that is in fact on the classpath.
As I mentioned, this plugin works perfectly well when I build from the command line, so this is a rather annoying problem that seems a bit difficult to track down.
Has anyone else ran into this problem before, and if so, is there a solution that I'm missing?
Thanks.
I can confirm that the maven eclipse plugin sometimes works different than the "console version". You can try to change the "Preferences->Maven->Installations" to your external maven installation (that what you use when running from command line). The eclipse plugin embedded version is a 3.0-SNAPSHOT (in my installation) and maybe not stable in all points.
The issue turned out to be a difference between Maven 2.x and Maven 3.x. The m2eclipse was using a version of Maven 3.x - can't remember which - and I was running a previous version. Apparently, somewhere in the version range, the plugin mojo now requires #requiresDependencyResolution . Thus, when running in m2eclipse, my plugin was not getting any of the dependencies in the project, and thus the class path was completely boned...
word...