Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm on 12.04 LTS, and trying to use Eclipse Indigo.

This morning Ubuntu made me update the following packages:

Preparing to replace icedtea-6-jre-cacao 6b24-1.11.3-1ubuntu0.12.04.1 (using .../icedtea-6-jre-cacao_6b24-1.11.4-1ubuntu0.12.04.1_amd64.deb) ...
Unpacking replacement icedtea-6-jre-cacao ...
Preparing to replace openjdk-6-jre-lib 6b24-1.11.3-1ubuntu0.12.04.1 (using .../openjdk-6-jre-lib_6b24-1.11.4-1ubuntu0.12.04.1_all.deb) ...
Unpacking replacement openjdk-6-jre-lib ...
Preparing to replace icedtea-6-jre-jamvm 6b24-1.11.3-1ubuntu0.12.04.1 (using .../icedtea-6-jre-jamvm_6b24-1.11.4-1ubuntu0.12.04.1_amd64.deb) ...
Unpacking replacement icedtea-6-jre-jamvm ...
Preparing to replace openjdk-6-jre-headless 6b24-1.11.3-1ubuntu0.12.04.1 (using .../openjdk-6-jre-headless_6b24-1.11.4-1ubuntu0.12.04.1_amd64.deb) ...
Unpacking replacement openjdk-6-jre-headless ...
Preparing to replace openjdk-6-jre 6b24-1.11.3-1ubuntu0.12.04.1 (using .../openjdk-6-jre_6b24-1.11.4-1ubuntu0.12.04.1_amd64.deb) ...
Unpacking replacement openjdk-6-jre ...

After that (but I cannot swear it is the root cause), I have the following issues in Eclipse:

  • When trying to launch the simplest HelloWorld program (which behaves fine with manual javac/java), I get either nothing or:

    An internal error occurred during: "Launching HelloWorld".
    org/eclipse/jdt/debug/core/JDIDebugModel

  • I get an "Error log" tab in the console panel, with an error:

    Could not create the view: An unexpected exception was thrown.

    (Follows a consequent NullPointerException stacktrace between sun.util.calendar.ZoneInfoFile.getZoneIDs(ZoneInfoFile.java:785) and org.eclipse.equinox.launcher.Main.main(Main.java:1386))

  • When trying to access the Installed JREs part of the preferences, I get a popup saying:

    Unable to create the selected preference page.
    An error occurred while automatically activating bundle org.eclipse.jdt.debug.ui (162).

    And the preference tab says An error has occurred when creating this preference page.

Until today I had a manually installed Eclipse (one of the official bundles available on their site), I've tried to replace it by the repository version and I get the same errors.

What should I do to make Eclipse work again?

Another person reports: Same happened to me after updating last night. Already tried reinstalling Eclipse and Java, starting Eclipse with -clean and starting new workspace and new .eclipse dir, but nothing helps.

share|improve this question
    
The accepted solution works fine, but the problem can also be avoided by using an Oracle JRE and solving a small SWT issue. –  Eusebius Sep 12 '12 at 17:19
add comment

5 Answers

up vote 17 down vote accepted

I had exactly the same problem today. First, a little googling brought me to your issue (didn't assumed to be due to OpenJDK). After a little more research, finally solved this strange behaviour: have a look at this ubuntu-bug.

So the quick solution is just to run sudo apt-get --reinstall install tzdata-java (reinstalling Time zone and daylight-saving time data for use by java runtimes)

Cheers

share|improve this answer
    
Many thanks. Works nicely. –  Eusebius Sep 12 '12 at 17:20
    
Worked for me also. Thanks much. –  Eric Wilson Sep 17 '12 at 13:41
    
Worked for OpenJDK 7 as well. –  user68186 Sep 19 '12 at 16:57
add comment

No idea why, but putting the line

-Dcom.ibm.icu.util.TimeZone.DefaultTimeZoneType=ICU

at the end of eclipse.ini seems to have solved the issue.

share|improve this answer
add comment

Yes, Brüno's answer worked for me too! It also fixed a bug that this caused in the application I am developing. Since a recent package upgrade in which the cacao virtual machine was removed, timestamps in my database that were in daylight savings time were interpreted incorrectly (off by one hour). But reinstalling tzdata-java fixed that too.

share|improve this answer
add comment

I can confirm Brüno's suggestion works well. Thank you!

The following resolves the issue, adding this line to eclipse.ini:

-Dcom.ibm.icu.util.TimeZone.DefaultTimeZoneType=ICU

Or re-installing a missing package.

sudo apt-get --reinstall install tzdata-java

I have been dealing with missing and broken packages ever since Ubuntu's last upgrade!

share|improve this answer
add comment

I would like to add, that I had the same issue; after the same update a java class was not being loaded by Eclipse. same bug posted by bruno for amd64

But I right away went to eclipse and checked for updates do not do this. After updating twice Eclipse now doesnt even load plugins (so no perspectives, start java projects, etc)

Then I updated to oracle's jre; the problem persists.

I am attemptedthis reinstall, plus removed ~/.eclipse/ and achieved a clean reinstall.

The problem stated in this question is not solved doing this, but with Bruno's answer it is now solved.

OpenJDK Runtime Environment (IcedTea7 2.3.2) (7u7-2.3.2-1ubuntu0.12.04.1)
OpenJDK 64-Bit Server VM (build 23.2-b09, mixed mode)
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.