Showing posts with label Eclipse. Show all posts
Showing posts with label Eclipse. Show all posts

Wednesday, March 6, 2013

Bookmark and Share

Every once in a while it happens to me that TestNG tests fail to launch in Eclipse when starting in debug mode (run mode works fine). The progress bar freezes at 57% and Eclipse indefinitely hangs.

Some googling brought me to to this bug in the TestNG issue tracker. As it seems, the issue is caused by a conflict between the TestNG version used as (Maven) dependency in the project under test and the TestNG version used by the TestNG Eclipse plug-in. People commented at the issue that it helped for them to create a new Eclipse workspace. As I wanted to avoid that, I had a look into the .metadata folder of my workspace, searching for things which might be the potential cause.

And indeed I stumbled upon the folder WORKSPACE_DIR/.metadata/.plugins/org.testng.eclipse/. After deleting this folder and restarting Eclipse, TestNG tests would launch in debug mode again as expected.

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

Sunday, August 15, 2010

Bookmark and Share

While developing an Eclipse plug-in for a small spare-time project of mine I wondered where to find the sources of the Java Development Tools (JDT). They used to be part of the Eclipse RCP/plug-in developers package in previous releases, but this isn't the case anymore with Eclipse 3.6 (Helios).

After some googling I found the reason: as of release 3.6 the RCP distribution (now named "Eclipse for RCP and RAP Developers") no longer contains any sources (except those for the actual platform plug-ins) in order to reduce the size of the download package.

If you want to get the sources for plug-ins such as JDT which are not part of the core platform you have to retrieve them separately. To do so you can use the new plug-in import wizard which allows to fetch source projects corresponding to plug-ins of the target platform directly from the Eclipse CVS.

Just open the "Plug-ins" view, right-click on the plug-in you want to retrieve (e.g. org.eclipse.jdt.ui) and select "Import as" > "Project from a Repository ...". Confirm the next dialog by clicking "Finish", and the check-out starts. Afterwards the new project will automatically replace the plug-in JAR as dependency in any dependent projects within your workspace.