0

I recently upgraded to Eclipse 2020-06. After the upgrade, I'm now unable to run Junit tests in Eclipse while they run smoothly in Maven.

Here is a screenshot of the error : enter image description here

I tried to delete the .metadata folder (I made a backup before), start a fresh copy of eclipse and import my project in it and event start another fresh copy of eclipse and create a simple JUnit test in it.

All these attempts result in the same error.

What am I doing wrong?

EDIT: enter image description here

Stephan
  • 41,764
  • 65
  • 238
  • 329
  • see also : https://www.eclipse.org/forums/index.php/m/1817647/?srch=Eclipse+2020-06+junit+nullpointerexception#msg_1817647 – Stephan Jun 20 '20 at 16:10
  • see also : https://github.com/eclipse/eclipse.jdt.ui/blob/afb285d86adfc259b684d907eb153a874448ccbc/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/junit/launcher/JUnitLaunchConfigurationDelegate.java#L715 – Stephan Jun 20 '20 at 16:18
  • Never ever delete the `.metadata` folder. Please show a [minimal example to reproduce your issue](https://stackoverflow.com/help/minimal-reproducible-example). – howlger Jun 20 '20 at 16:28
  • @howlger I did make a backup before deletion ;) – Stephan Jun 20 '20 at 17:41

2 Answers2

1

According to the screenshot you did not have Eclipse 2020-06 (4.16.0), but a kind of beta/preview version which might be unstable:

eclipse.buildId=4.16.0.I20200604-0540 means integration build (I) of June 4, 2020 (20200604) at 5:40 (0540). After this build and before the release there were a couple of integration builds and one release candidate. It was the second release candidate, one week later, which became the Eclipse 2020-06 release and which was released on June 17, 2020.

If you do not want to have an integration build, make sure that in Window > Preferences: Update/Install > Available Software Sites you don't have an update site with a URL that contains staging.

howlger
  • 31,050
  • 11
  • 59
  • 99
  • Check the edit in my question. I added a screenshot of Window > Preferences: Update/Install > Available Software Sites. – Stephan Jun 25 '20 at 21:22
  • @Stephan These update sites looks okay to me. I guess it was different before you re-installed Eclipse and that you really have Eclipse 2020-06 now (check _Help > About Eclipse IDE_ for the build id). If you don't care about the cause of the already fixed issue, the answer comes too late, but maybe it is helpful for others facing the same issue. – howlger Jun 26 '20 at 07:13
  • In "About Eclipse" windows, I can read `Version: 2020-06 (4.16.0) Build id: 20200615-1200` while in the installation details I read `eclipse.buildId=4.16.0.I20200604-0540` – Stephan Jun 27 '20 at 04:41
  • @Stephan Do _Help > Check for Updates_. – howlger Jun 27 '20 at 08:49
0

I wasn't able to fix the problem. I tried to install Java Development Tool but the installer failed with an OutOfMemoryException.

So I re-download Eclipse 2020-06 manually, I re-install all my plugins and re-import my projects.

My guess is the ooomph installer messed around somehow during the upgrade from Eclipse 2020-03 to Eclipse 2020-06.

I lost nearly a day to fix this !

Stephan
  • 41,764
  • 65
  • 238
  • 329