Eclipse not starting with org.eclipse.equinox.launcher.Main.main java.lang.ClassNotFoundException being issued after updgrade to 18.04

Bug #1784358 reported by Thomas A. F. Thorne
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
eclipse (Debian)
Fix Released
Unknown
eclipse (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

I upgraded from 16.04 to 18.04 on Friday. Following some reboots and updates this morning I am now unable to start the Eclipse IDE. This was working before the upgrade.

I have the C++ developer support added to Eclipse. To the best of my memory (and ability to interrogate apt) it is all installed from the Ubuntu repositories.

When I click the Eclipse launcher pinned to my side bat I get an error message from Eclipse that reads:
An error has occurred. See the log file
/home/thomas/.eclipse/org.eclipse.platform_3.8_155965261/configuration/1532947738216.log

Viewing the log file I see:
!SESSION Mon Jul 30 11:48:58 BST 2018 ------------------------------------------
!ENTRY org.eclipse.equinox.launcher 4 0 2018-07-30 11:48:58.229
!MESSAGE Exception launching the Eclipse Platform:
!STACK
java.lang.ClassNotFoundException: org.eclipse.core.runtime.adaptor.EclipseStarter
        at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:466)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:566)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:499)
        at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:626)
        at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
        at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
        at org.eclipse.equinox.launcher.Main.main(Main.java:1414)

This is easily repeatable.

Some internet searching suggests this problem is present upstream as there is a Debian bug that looks similar: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=891956

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: eclipse 3.8.1-11
ProcVersionSignature: Ubuntu 4.15.0-29.31-generic 4.15.18
Uname: Linux 4.15.0-29-generic x86_64
ApportVersion: 2.20.9-0ubuntu7.2
Architecture: amd64
Date: Mon Jul 30 11:43:38 2018
InstallationDate: Installed on 2017-11-16 (255 days ago)
InstallationMedia: Ubuntu 16.04.3 LTS "Xenial Xerus" - Release amd64 (20170801)
PackageArchitecture: all
ProcEnviron:
 LANGUAGE=en_GB:en
 TERM=xterm-256color
 PATH=(custom, no user)
 LANG=en_GB.UTF-8
 SHELL=/bin/bash
SourcePackage: eclipse
UpgradeStatus: Upgraded to bionic on 2018-07-27 (3 days ago)

Revision history for this message
Thomas A. F. Thorne (tafthorne) wrote :
Revision history for this message
Thomas A. F. Thorne (tafthorne) wrote :

Reviewing the Debian equivalent people have suggested that:

$ sudo apt-get install --reinstall libequinox-osgi-java

Could resolve the issue. Although some people note that it does not help. Others have recommended completely removing Eclipse as installed through apt and instead using the version supplied directly on the Eclipse CDT webpage https://www.eclipse.org/cdt/

I shall try both solutions this afternoon if there are no alternatives suggested that people would like me to try.

Changed in eclipse (Debian):
status: Unknown → New
Revision history for this message
Thomas A. F. Thorne (tafthorne) wrote :

$ sudo apt-get install --reinstall libequinox-osgi-java

Resulted in no change. The problem presented as before.

Revision history for this message
Thomas A. F. Thorne (tafthorne) wrote :

Reinstalling Eclipse and Eclipse C/C++ Development Tooling also did not change the error.

$ sudo apt-get install --reinstall eclipse eclipse-cdt g++
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 to upgrade, 0 to newly install, 3 reinstalled, 0 to remove and 1 not to upgrade.
Need to get 37.5 MB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 eclipse all 3.8.1-11 [16.1 kB]
Get:2 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 eclipse-cdt all 8.6.0-2 [37.5 MB]
Get:3 http://gb.archive.ubuntu.com/ubuntu bionic/main amd64 g++ amd64 4:7.3.0-3ubuntu2 [1,576 B]
Fetched 37.5 MB in 6s (5,987 kB/s)
(Reading database ... 344165 files and directories currently installed.)
Preparing to unpack .../eclipse_3.8.1-11_all.deb ...
Unpacking eclipse (3.8.1-11) over (3.8.1-11) ...
Preparing to unpack .../eclipse-cdt_8.6.0-2_all.deb ...
Unpacking eclipse-cdt (8.6.0-2) over (8.6.0-2) ...
Preparing to unpack .../g++_4%3a7.3.0-3ubuntu2_amd64.deb ...
Unpacking g++ (4:7.3.0-3ubuntu2) over (4:7.3.0-3ubuntu2) ...
Processing triggers for man-db (2.8.3-2) ...
Setting up g++ (4:7.3.0-3ubuntu2) ...
Setting up eclipse (3.8.1-11) ...
Setting up eclipse-cdt (8.6.0-2) ...

I shall try removing Eclipse using apt and installing from the website instread.

Revision history for this message
Thomas A. F. Thorne (tafthorne) wrote :

I can confirm that downloading the Eclipse installer from the main website: http://www.eclipse.org/downloads/ executing it as myself and then selecting the C/C++ option got me a working copy of Eclipse installed. That is a successful work around until the packaged version is fixed.

When I ran the install I did see some errors that I will bring up with the Eclipse team, if I can work out how:

:~/Downloads/eclipse/eclipse-inst-linux64/eclipse-installer$ sudo ./eclipse-inst
[sudo] password for thomas:
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.eclipse.emf.ecore.xmi.impl.XMLHandler (file:/home/thomas/Downloads/eclipse/eclipse-inst-linux64/eclipse-installer/plugins/org.eclipse.emf.ecore.xmi_2.13.0.v20170609-0707.jar) to method com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser$LocatorProxy.getEncoding()
WARNING: Please consider reporting this to the maintainers of org.eclipse.emf.ecore.xmi.impl.XMLHandler
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

(SWT:17278): IBUS-WARNING **: 14:26:33.796: The owner of /home/thomas/.config/ibus/bus is not root!

(SWT:17278): GLib-CRITICAL **: 14:26:38.153: Source ID 409 was not found when attempting to remove it
:~/Downloads/eclipse/eclipse-inst-linux64/eclipse-installer$ ./eclipse-inst
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.eclipse.emf.ecore.xmi.impl.XMLHandler (file:/home/thomas/Downloads/eclipse/eclipse-inst-linux64/eclipse-installer/plugins/org.eclipse.emf.ecore.xmi_2.13.0.v20170609-0707.jar) to method com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser$LocatorProxy.getEncoding()
WARNING: Please consider reporting this to the maintainers of org.eclipse.emf.ecore.xmi.impl.XMLHandler
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

(SWT:17498): GLib-CRITICAL **: 14:27:23.976: Source ID 5293 was not found when attempting to remove it

(SWT:17498): GLib-CRITICAL **: 14:27:24.432: Source ID 5445 was not found when attempting to remove it

(SWT:17498): GLib-CRITICAL **: 14:27:25.951: Source ID 5614 was not found when attempting to remove it
[Fatal Error] :539:7: XML document structures must start and end within the same entity.

However despite the above it did seem to install fine.

Revision history for this message
Thomas A. F. Thorne (tafthorne) wrote :

I have raised https://bugs.eclipse.org/bugs/show_bug.cgi?id=537526 to cover the installer issue. There are similar bugs marked as fixed for the main Eclipse code, but as this is still visible and relates to the installer, not the main binary, I raised a new bug.

That is probably all from me for now. I shall await news of an updated package to test out or some instructions of other things to try.

Changed in eclipse (Debian):
status: New → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in eclipse (Ubuntu):
status: New → Confirmed
Revision history for this message
Norbert (nrbrtx) wrote :

Still happens on fully upgraded 18.04.2:

/home/user/.eclipse/org.eclipse.platform_3.8_155965261/configuration/1555078858391.log
!SESSION Fri Apr 12 17:20:58 MSK 2019 ------------------------------------------
!ENTRY org.eclipse.equinox.launcher 4 0 2019-04-12 17:20:58.495
!MESSAGE Exception launching the Eclipse Platform:
!STACK
java.lang.ClassNotFoundException: org.eclipse.core.runtime.adaptor.EclipseStarter
 at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:466)
 at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:566)
 at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:499)
 at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:626)
 at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
 at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
 at org.eclipse.equinox.launcher.Main.main(Main.java:1414)

$ update-java-alternatives -l
java-1.11.0-openjdk-amd64 1101 /usr/lib/jvm/java-1.11.0-openjdk-amd64

Switching to OpenJDK 8 with

```
sudo apt-get install openjdk-8-jre openjdk-8-jre-headless
sudo update-java-alternatives --set \
 java-1.8.0-openjdk-$(dpkg --print-architecture)
```

does not help too.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.