Sunday, October 9, 2011

Bookmark and Share

While working on a little pet project based on OSGi I wanted to use the Pax Runner Eclipse plug-in to launch my OSGi application on the Apache Felix OSGi framework.

Unfortunately this attempt resulted in the following error:

1
2
3
4
5
6
7
8
9
10
java.lang.NoClassDefFoundError: org/eclipse/pde/internal/ui/launcher/LaunchArgumentsHelper
at org.ops4j.pax.cursor.Utils.getVMArgsOptions(Utils.java:216)
at org.ops4j.pax.cursor.LaunchConfiguration.getProgramArguments(LaunchConfiguration.java:156)
at org.eclipse.pde.launching.AbstractPDELaunchConfiguration.launch(AbstractPDELaunchConfiguration.java:72)
at org.eclipse.pde.launching.OSGiLaunchConfigurationDelegate.launch(OSGiLaunchConfigurationDelegate.java:47)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:853)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:702)
at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:923)
at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1126)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

This looked pretty much like an incompatability between the Pax Runner plug-in and the Eclipse platform. And indeed the plug-in unfortunately doesn't seem to keep up with PDE-internal changes in recent Eclipse versions due to limited developer resources.

Further googling then led me to PAXRUNNER-353 at Pax Runner's issue tracker.

The ticket itself is not yet resolved, but the good news is that Christian Baranowski (whom I had the pleasure to meet during the OSGi code camp last week) created a fork on GitHub fixing the issue for now. So let's hope that this fix gets quickly merged into the main branch.

Until then Christian even has established a temporary Eclipse update site which makes upgrading the plug-in to the forked version a breeze.

So my kudos go to Christian (for fixing the plug-in) and to GitHub (for making forking easy) :-)

2 comments:

Anonymous said...

Thanks a lot. It really helped me a lot.

Unknown said...

I'd found this 'blog entry after reading that Pax Cursor is recommended as one possibility for incorporating Apache Felix into the Eclipse IDE[1]. I've read that Pax Cursor has been integrated into Pax Runner, so perhaps Felix' documentation can be updated to match the merge, sometime.

Having searched for the current Pax Cursor web site[2] -- it seems OPS4J's web hosting configuration has been updated, resulting in changes in regards to DNS domain names for those resources -- found the current location of the PAXRUNNER-353 issue report.[3] I notice that it's still marked as "open," as an issue ticket, implicitly denoted as affecting the Pax Runner distribution for Eclipse 3.6 (Helios).

It would seem that Eclipse Equinox itself doesn't feature any kind of tight OSGi console-to-Eclipse IDE view integration for Eclipse -- going by an item of documentation that recommends launching the main Equinox JAR, directly, for launching its console[5] Though there's some difficulty in the current avaialabiltiy of Pax Runner, but if it can provide a harness for direct integration of Equinox, Felix, and other OSGi implementations in Eclipse, I think that could be quite useful, ideally.

Towards trying out the Pax Runner Eclipse plugin in Kepler, found the new Pax Runner for Eclipse page. Unfortunately, the update site listed at the installation instructions page is no longer available. I guess that that would be something about which one may file an additional issue ticket -- maybe the Pax Runner for Eclipse update site will be back online, sometime soon.

Well, it was nice to find some commentary about the item. Cheers!

[1] Apache Felix, Integrating Felix with Eclipse
[2] OPS4J Wiki - Pax Cursor
[3] Pax Runner, Eclipse plugin broken on Eclipse 3.6 (Helios)
[4] Equinox Framework Quickstart Guide