Eclipse hanging on start up
Asked Answered
K

8

7

I was working on my Macbook, when my battery ran out. Now Eclipse refuses to start, getting stuck on "Loading Workbench". The stacktrace in the bottom is from pressing ^C after a minute or so of hanging.

~/Downloads/eclipse$ ./Eclipse.app/Contents/MacOS/eclipse -clean -debug -consolelog 
Start VM: -Dosgi.requiredJavaVersion=1.5
-Xdock:icon=../Resources/Eclipse.icns
-XstartOnFirstThread
-Xms40m
-Xmx256m
-XX:MaxPermSize=256m
-Dorg.eclipse.swt.internal.carbon.smallFonts
-clean
-Djava.class.path=/Users/admin/Downloads/eclipse/Eclipse.app/Contents/MacOS/../../../plugins/org.eclipse.equinox.launcher_1.0.101.R34x_v20081125.jar
-os macosx
-ws carbon
-arch x86
-showsplash
-launcher /Users/admin/Downloads/eclipse/Eclipse.app/Contents/MacOS/eclipse
-name Eclipse
--launcher.library /Users/admin/Downloads/eclipse/Eclipse.app/Contents/MacOS//../../../plugins/org.eclipse.equinox.launcher.carbon.macosx_1.0.101.R34x_v20080731/eclipse_1115.so
-startup /Users/admin/Downloads/eclipse/Eclipse.app/Contents/MacOS/../../../plugins/org.eclipse.equinox.launcher_1.0.101.R34x_v20081125.jar
-clean
-debug
-consolelog
-vm /System/Library/Frameworks/JavaVM.framework
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xdock:icon=../Resources/Eclipse.icns
-XstartOnFirstThread
-Xms40m
-Xmx256m
-XX:MaxPermSize=256m
-Dorg.eclipse.swt.internal.carbon.smallFonts
-clean
-Djava.class.path=/Users/admin/Downloads/eclipse/Eclipse.app/Contents/MacOS/../../../plugins/org.eclipse.equinox.launcher_1.0.101.R34x_v20081125.jar 
Install location:
    file:/Users/admin/Downloads/eclipse/
Configuration file:
    file:/Users/admin/Downloads/eclipse/configuration/config.ini loaded
Configuration location:
    file:/Users/admin/Downloads/eclipse/configuration/
Framework located:
    file:/Users/admin/Downloads/eclipse/plugins/org.eclipse.osgi_3.4.3.R34x_v20081215-1030.jar
Framework classpath:
    file:/Users/admin/Downloads/eclipse/plugins/org.eclipse.osgi_3.4.3.R34x_v20081215-1030.jar
Splash location:
    /Users/admin/Downloads/eclipse/plugins/org.eclipse.platform_3.3.101.v200902111700/splash.bmp
Debug options:
    file:/Users/admin/Downloads/eclipse/Eclipse.app/Contents/MacOS/.options not found
Time to load bundles: 16
Starting application: 3649
!SESSION 2011-08-30 18:03:17.958 -----------------------------------------------
eclipse.buildId=M20090211-1700
java.version=1.6.0_26
java.vendor=Apple Inc.
BootLoader constants: OS=macosx, ARCH=x86, WS=carbon, NL=en_US
Command-line arguments:  -os macosx -ws carbon -arch x86 -clean -debug -consolelog

!ENTRY org.eclipse.core.resources 2 10035 2011-08-30 18:03:22.073
!MESSAGE The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes.

!ENTRY org.tigris.subversion.clientadapter.javahl 1 0 2011-08-30 18:03:22.782
!MESSAGE Failed to load JavaHL Library.
These are the errors that were encountered:
no libsvnjavahl-1 in java.library.path
no svnjavahl-1 in java.library.path
no svnjavahl in java.library.path
java.library.path = .:/Users/admin/Library/Java/Extensions:/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java
^C
Exception in thread "Thread-1" org.eclipse.swt.SWTException: Invalid thread access
    at org.eclipse.swt.SWT.error(SWT.java:3777)
    at org.eclipse.swt.SWT.error(SWT.java:3695)
    at org.eclipse.swt.SWT.error(SWT.java:3666)
    at org.eclipse.swt.widgets.Widget.error(Widget.java:681)
    at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:341)
    at org.eclipse.swt.widgets.Shell.getShells(Shell.java:885)
    at org.eclipse.swt.widgets.Shell.kEventWindowHidden(Shell.java:1213)
    at org.eclipse.swt.widgets.Widget.windowProc(Widget.java:2044)
    at org.eclipse.swt.widgets.Display.windowProc(Display.java:4171)
    at org.eclipse.equinox.launcher.JNIBridge._takedown_splash(Native Method)
    at org.eclipse.equinox.launcher.JNIBridge.takeDownSplash(JNIBridge.java:110)
    at org.eclipse.equinox.launcher.Main.takeDownSplash(Main.java:1863)
    at org.eclipse.equinox.launcher.Main$SplashHandler.run(Main.java:106)

Any ideas? I guess I will try installing JavaHL if there are no other suggestions. Eclipse always complained about it, but it always started up before.

Kobe answered 31/8, 2011 at 1:17 Comment(3)
You could try changing your workspace, or unpacking a fresh version of Eclipse. Then you'll know if your Eclipse installation is corrupted or if it's your workspace.Corabelle
How big is your workspace? Eclipse is trying to refresh your workspace at the time you pressed CTRL-C... A quick fix: Just make a new workspace; import everything from the old workspace ("Import Existing Projects" with copy=true); and swap the work-spaces.Calipee
Look here for the solution https://mcmap.net/q/195835/-eclipse-juno-doesn-39-t-start/….Picayune
K
2

Yup, JavaHL was the likely cuprit as installing it solved the problem. It's still odd that Eclipse never hung before due to this reason, but after a crash, it did.

Kobe answered 31/8, 2011 at 9:38 Comment(0)
B
14

Most solutions delete or alter the metadata, unfortunately this often removes SVN and library information from projects which is a major time-loss.

I have found a commandline switch (See https://bugs.eclipse.org/bugs/show_bug.cgi?id=389738) that clears any saved state (open windows and such) which usually cause startup hangs: -clearPersistedState.

I throw in a whole range of options now:

  • In a terminal, type <eclipse dir>/eclipse -clean -refresh -debug -consolelog -clearPersistedState
  • Open the workspace that causes the issue
  • Wait until eclipse is fully started and ready, then close it and start it again normally

This always solves startup issues for me.

Barbbarba answered 19/8, 2013 at 8:13 Comment(1)
eclipse -clean -clearPersistedState worked for me when just using eclipse -clean would still hangMalamud
G
13

The procedure shown at http://off-topic.biz/en/eclipse-hangs-at-startup-showing-only-the-splash-screen/ worked for me

  1. cd .metadata/.plugins
  2. mv org.eclipse.core.resources org.eclipse.core.resources.bak
  3. Start eclipse. (It should show an error message or an empty workspace because no project is found.)
  4. Close all open editors tabs.
  5. Exit eclipse.
  6. rm -rf org.eclipse.core.resources (Delete the newly created directory.)
  7. mv org.eclipse.core.resources.bak/ org.eclipse.core.resources (Restore the original directory.)
  8. Start eclipse and start working. :-)
Grazing answered 10/5, 2013 at 13:42 Comment(1)
Still works by today, cheers! It happened several times, every time the the Debug perspective was open (from the last time). I make sure to leave it in the Java perspective before exit (although I sometimes forget ...).Powers
W
4

Instead of creating a new workspace, just delete the .metadata folder which resides inside your workspace folder. This will enable you to load the workspace and just re-import all projects and preferences into it - it will save some time for you. One more thing you can check before you do this or before you recreate the workspace: look at the .log file (which resides in that .metadata folder) for information that may give some light to the cause of the problem.

Waits answered 17/1, 2013 at 15:23 Comment(1)
This helped in my case! Looking in my .metadata/.log file showed this error: "com.perforce.p4java.exception.AccessException: Perforce password (P4PASSWD) invalid or unset." I didn't know how to 'reset' this password outside Zend Studio (aka Eclipse), but deleting the .metadata directory allowed my Zend Studio (aka Eclipse) to start properly, without hanging.Leaves
K
2

Yup, JavaHL was the likely cuprit as installing it solved the problem. It's still odd that Eclipse never hung before due to this reason, but after a crash, it did.

Kobe answered 31/8, 2011 at 9:38 Comment(0)
W
0

As Tonny says is the comments, creating a new workspaces did the trick for me.

Weinshienk answered 4/10, 2012 at 18:4 Comment(0)
S
0

I run into this problem frequently. Not sure of the cause.

Removing my workspace works but I hate having to configure everything again. Once I solved it when I moved my workspace to another location, started Eclipse and uninstalled a few plugins I didn't need anymore. Then I removed the newly created workspace and moved the old one back.

I imagine you could try without uninstalling anything and see if it helps.

Salutation answered 15/1, 2013 at 17:1 Comment(0)
P
0

I had the same kind of problem, if you follow the link I explain what I did

Eclipse Luna Hanging when Loading Debug Configuration

It seems the .Lock file was not closed properly within the .metadata folder and prevented eclipse from starting the workbench.

delete the .metadata folder and then just re-imported the project this should get it working again.

Phillipphillipe answered 26/8, 2014 at 16:19 Comment(0)
F
0

In one case, I had to delete the file .metadata/.plugins/org.eclipse.core.resources/11.snap

This file was the only non-hidden file in the org.eclipse.core.resources folder.

This way, everything in the workspace was preserved.

Fortenberry answered 9/3, 2015 at 13:59 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.