java-6-openjdk-amd64 + Eclipse not working

Bug #1047762 reported by gadLinux on 2012-09-08
This bug affects 9 people
Affects Status Importance Assigned to Milestone
openjdk-6 (Ubuntu)
openjdk-7 (Ubuntu)

Bug Description

During last update of Ubuntu 12.10 beta the JRE for the system was updated to:

  Selección Ruta Prioridad Estado
  *0 /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java 1071 modo automático

This means openjdk-7

It started to crash eclipse. I mean, the system can run eclipse but weird things started to happen. See attached screenshot.

I had to go back to sun jre.


Any of the following JDKs seems to be affected.

The problem is that no log is show, just random errors in the environment. But I was able to reproduce 100% of time.

Description: Ubuntu quantal (development branch)
Release: 12.10

  Instalados: 6b24-1.11.4-3ubuntu1
  Candidato: 6b24-1.11.4-3ubuntu1
  Tabla de versión:
 *** 6b24-1.11.4-3ubuntu1 0
        500 quantal/universe amd64 Packages
        100 /var/lib/dpkg/status

  Instalados: 7u7-2.3.2-1ubuntu1
  Candidato: 7u7-2.3.2-1ubuntu1
  Tabla de versión:
 *** 7u7-2.3.2-1ubuntu1 0
        500 quantal/main amd64 Packages
        100 /var/lib/dpkg/status

gadLinux (gad-aguilardelgado) wrote :

This is one of the errors shown

Launchpad Janitor (janitor) wrote :

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

Changed in openjdk-6 (Ubuntu):
status: New → Confirmed
Changed in openjdk-7 (Ubuntu):
status: New → Confirmed
Jens Reimann (ctron) wrote :

This seems also to affect Ubuntu 12.04 with the recent update of openjdk-7

Xerxes Rånby (xranby) wrote :

I was able to reproduce this bug
. run eclipse
2 open preferencies -> Java -> installed JREs and get the same results as shown in The Screenshot

By looking into the workspace/.metadata/.log
I found that the bug was caused by:
java.lang.NoClassDefFoundError: Could not initialize class

This is a variant of an old Debian/Ubuntu bug:

I am able to workaround the issue by running:

sudo apt-get --reinstall install tzdata-java

gadLinux (gad-aguilardelgado) wrote :

Hi Xerxes,

I was able to get rid of the bug by just reinstalling tzdata-java as you said.

But I cannot confirm that was just that because I did an upgrade before I got your response. So maybe something changed in my system meanwhile.

Someone else can confirm this?

I can say that after update and aplying this reinstall everything works again.

Thank you.

Just created this account so i could confirm above findings.

"sudo apt-get --reinstall install tzdata-java"

fixed the problem for me too. If it doesn't work for you, I have also been reinstalling eclipse (Indigo) and both the openjdk6 and 7 before trying the above advice. Of course thats taking wild guesses here. My aptitude wrangling may well have nothing to do with anything. Just mentioned it to save others the trouble.

I'd really like to know in how far reinstalling the timezone data package helped resolve this issue. I know, I am the curious kind. I fear little more than the idea of dying ignorant.

Take care

Peter Ansell (p-ansell) wrote :

Reinstalling tzdata-java worked for me after updating openjdk-7 in the last few hours:

sudo apt-get --reinstall install tzdata-java

It was the only thing I did to fix the bug for me. I didn't modify the manually installed Eclipse Juno (4.2) that I was running when I noticed the bug, and the NullPointerException was reproducible using the following java file--compiled and run on the command line--up until I reinstalled tzdata-java:

    import java.util.TimeZone;

    public class TZTest {
        public static void main(String args[]) {
            String[] availableIds = TimeZone.getAvailableIDs();
           System.out.println("Length: "+availableIds.length);
            for (int i = 0; i < availableIds.length; i++) {
                System.out.println("ID #"+i+": "+availableIds[i]);

gadLinux (gad-aguilardelgado) wrote :

Then great!!!

We can close the bug because you also made a link to the original debian bug.

And is tested to work!!!

Thank you a lot guys!!!

I also got this after switching to JDK 7 using update-alternatives and running Eclipse (the Juno release) on the newer JDK.

Cd-MaN (x-at-y-or-z) wrote :


I would like to confirm a couple of things:

- this affects both JDK 6 and 7. The exact versions I have are (I'm running Ubuntu 12.04 on x64 hardware)

- this reproduces with both Eclipse 3.7 and 4.2. I attached the error log from Eclipse 4.2. My exacy symptoms were: when trying to create a new Debug/Run configuration Eclipse would give me the error:

Plug-in org.eclipse.jdt.debug.ui was unable to load class
An error occurred while automatically activating bundle
org.eclipse.jdt.debug.ui (146).

- Either of the following things fix the bug for me:

adding at the end of eclipse.ini
reinstalling tzdata as suggested above

Thank you,

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

Other bug subscribers

Remote bug watches

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