Eclipse cannot start: "java.lang.UnsatisfiedLinkError: no swt-gtk-3557 or swt-gtk"

Bug #728825 reported by Jens Jorgensen
252
This bug affects 64 people
Affects Status Importance Assigned to Milestone
eclipse (Ubuntu)
Fix Released
Critical
Unassigned
swt-gtk (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: eclipse

On a freshly installed/updated box, when I run eclipse I first get the splash screen, the a little dialog saying: An error has occurred. See the log file /space/home/jbj1/workspace/.metadata/.log. In this file I see at the end:

!SESSION 2011-03-04 10:19:26.019 -----------------------------------------------
eclipse.buildId=M20100211-1343
java.version=1.6.0_21
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Command-line arguments: -os linux -ws gtk -arch x86_64

!ENTRY org.eclipse.osgi 4 0 2011-03-04 10:19:27.633
!MESSAGE Application error
!STACK 1
java.lang.UnsatisfiedLinkError: no swt-gtk-3557 or swt-gtk in swt.library.path, java.library.path or the jar file
        at org.eclipse.swt.internal.Library.loadLibrary(Library.java:254)
        at org.eclipse.swt.internal.Library.loadLibrary(Library.java:159)
        at org.eclipse.swt.internal.C.<clinit>(C.java:21)
        at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:63)
        at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:54)
        at org.eclipse.swt.widgets.Display.<clinit>(Display.java:131)
        at org.eclipse.ui.internal.Workbench.createDisplay(Workbench.java:516)
        at org.eclipse.ui.PlatformUI.createDisplay(PlatformUI.java:161)
        at org.eclipse.ui.internal.ide.application.IDEApplication.createDisplay(IDEApplication.java:143)
        at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:88)
        at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:616)
        at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)
        at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
        at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
        at org.eclipse.equinox.launcher.Main.main(Main.java:1287)

I have installed libswt-gtk-3.5-java, libswt-gtk-3.5-jni, and if I run strace I can see it is looking for this:

8979 stat("/usr/java/packages/lib/amd64/libswt-gtk-3557.so", 0x7f5a74006b80) =
-1 ENOENT (No such file or directory)
8979 stat("/usr/lib/jni/libswt-gtk-3557.so", 0x7f5a74006b80) = -1 ENOENT (No su
ch file or directory)
8979 stat("/lib/libswt-gtk-3557.so", 0x7f5a74006b80) = -1 ENOENT (No such file
or directory)

but if I look in /usr/lib/jni/ I see:

jens-hplaptop$ ls /usr/lib/jni
libjava-access-bridge-jni.so libswt-awt-gtk-3555.so
libjava-access-bridge-jni.so.0 libswt-gnome-gtk-3555.so
libjava-access-bridge-jni.so.0.0.0 libswt-gtk-3555.so
libswt-atk-gtk-3555.so libswt-pi-gtk-3555.so

so perhaps the dependencies are not correct?

jens-hplaptop$ lsb_release -rd
Description: Ubuntu Natty (development branch)
Release: 11.04

jens-hplaptop$ dpkg --list eclipse\* | grep ^ii
ii eclipse 3.5.2-8ubuntu2 Extensible Tool Platform and Java IDE
ii eclipse-jdt 3.5.2-8ubuntu2 Eclipse Java Development Tools (JDT)
ii eclipse-pde 3.5.2-8ubuntu2 Eclipse Plug-in Development Environment (PDE)
ii eclipse-platform 3.5.2-8ubuntu2 Eclipse platform without plug-ins to develop any language
ii eclipse-platform-data 3.5.2-8ubuntu2 Eclipse platform without plug-ins to develop any language (data)
ii eclipse-plugin-cvs 3.5.2-8ubuntu2 Eclipse Team Integration (CVS support)
ii eclipse-rcp 3.5.2-8ubuntu2 Eclipse Rich Client Platform (RCP)

Revision history for this message
Alejandro J. Cura (alecu) wrote :

I keep an up to date natty development machine and this just started happening on today's update.
If I run eclipse from the command line I get the same error: "java.lang.UnsatisfiedLinkError: no swt-gtk-3557 or swt-gtk in swt.library.path, java.library.path or the jar file"

btw: If I download an eclipse .tar.gz it works fine, though.

Changed in eclipse (Ubuntu):
importance: Undecided → Critical
Zi Yang (zi-y)
Changed in eclipse (Ubuntu):
status: New → Confirmed
Revision history for this message
Kevin Jadin (marcspitz) wrote :

Some comments were added some days ago on a previous bug report, that was fixed for maverick release:
https://bugs.launchpad.net/ubuntu/+source/eclipse/+bug/620516
Please see the attached logs.

I can also confirm this bug on up-to-date Natty x64, same error log.

Revision history for this message
Javier (javiersmail) wrote :

I can also confirm this bug. Using natty x6a up to date.

If any data needed just tell wich one.

Michael Terry (mterry)
summary: - eclipse cannot start, missing dependency?
+ Eclipse cannot start: "java.lang.UnsatisfiedLinkError: no swt-gtk-3557
+ or swt-gtk"
Revision history for this message
Louis (louisgag) wrote :

Same problem here, see the log:

!SESSION 2011-03-10 14:55:52.046 -----------------------------------------------
eclipse.buildId=M20100211-1343
java.version=1.6.0_24
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Command-line arguments: -os linux -ws gtk -arch x86_64

!ENTRY org.eclipse.osgi 4 0 2011-03-10 14:55:53.023
!MESSAGE Application error
!STACK 1
java.lang.UnsatisfiedLinkError: no swt-gtk-3557 or swt-gtk in swt.library.path, java.library.path or the jar file
 at org.eclipse.swt.internal.Library.loadLibrary(Library.java:254)
 at org.eclipse.swt.internal.Library.loadLibrary(Library.java:159)
 at org.eclipse.swt.internal.C.<clinit>(C.java:21)
 at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:63)
 at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:54)
 at org.eclipse.swt.widgets.Display.<clinit>(Display.java:131)
 at org.eclipse.ui.internal.Workbench.createDisplay(Workbench.java:516)
 at org.eclipse.ui.PlatformUI.createDisplay(PlatformUI.java:161)
 at org.eclipse.ui.internal.ide.application.IDEApplication.createDisplay(IDEApplication.java:143)
 at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:88)
 at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
 at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
 at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
 at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368)
 at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)
 at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
 at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
 at org.eclipse.equinox.launcher.Main.main(Main.java:1287)

Revision history for this message
Kevin Jadin (marcspitz) wrote :

The temporary solution was for me to install the previous version of eclipse-rcp package from there:
https://launchpad.net/ubuntu/+source/eclipse/3.5.2-8ubuntu1

Revision history for this message
3vi1 (launchpad-net-eternaldusk) wrote :

Thanks for the workaround Marc! That appears to have got me working in the meantime until this bug is fixed.

Revision history for this message
Michael Terry (mterry) wrote :

OK, figured this out. It's because the latest version was built against xulrunner 2.0, which eclipse doesn't support. So the necessary libraries didn't get built. I'm investigating forcing xulrunner 1.9.

Revision history for this message
Chris Coulson (chrisccoulson) wrote :

Note that swt-gtk has the same issue

Revision history for this message
Michael Terry (mterry) wrote :

OK, so there were two problems going on with eclipse. The one I mention in comment #7 about xulrunner 2.0 and the fact that the last time it was built, Ubuntu was using the --as-needed linker option. That has now been backed out for natty's release and the .so files are correct again.

swt-gtk should probably just need a rebuild.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package eclipse - 3.5.2-8ubuntu3

---------------
eclipse (3.5.2-8ubuntu3) natty; urgency=low

  * debian/control:
    - Use xulrunner-1.9.2-dev, not xulrunner-dev, as eclipse isn't 2.0
      compatible yet. That and a rebuild fixes LP: #728825
 -- Michael Terry <email address hidden> Tue, 15 Mar 2011 11:14:51 -0400

Changed in eclipse (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
emanuel sprung (eumel-s) wrote :

Works for me! Thanks

Revision history for this message
8200 (8200) wrote :

This bug is there again with the latest update. :-(

I am using ubuntu 12.04 amd64 with all latest updates and Sun java 7 sdk.

eclipse.buildId=I20110613-1736
java.version=1.7.0
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Command-line arguments: -os linux -ws gtk -arch x86_64

!ENTRY org.eclipse.osgi 4 0 2012-04-06 22:08:33.166
!MESSAGE Application error
!STACK 1
java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons:
 no swt-gtk-3740 in java.library.path
 no swt-gtk in java.library.path
 Can't load library: /home/arthur/.swt/lib/linux/x86_64/libswt-gtk-3740.so
 Can't load library: /home/arthur/.swt/lib/linux/x86_64/libswt-gtk.so

Revision history for this message
sheldonross (ross-sheldon) wrote :

Bug is present in current state of 12.04 as of 04/06/12 4:16 MST.

!SESSION 2012-04-06 16:05:22.658 -----------------------------------------------
eclipse.buildId=I20110613-1736
java.version=1.6.0_26
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Command-line arguments: -os linux -ws gtk -arch x86_64

!ENTRY org.eclipse.osgi 4 0 2012-04-06 16:05:23.500
!MESSAGE Application error
!STACK 1
java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons:
 no swt-gtk-3740 in java.library.path
 no swt-gtk in java.library.path
 Can't load library: /home/sross/.swt/lib/linux/x86_64/libswt-gtk-3740.so
 Can't load library: /home/sross/.swt/lib/linux/x86_64/libswt-gtk.so

 at org.eclipse.swt.internal.Library.loadLibrary(Library.java:285)
 at org.eclipse.swt.internal.Library.loadLibrary(Library.java:194)
 at org.eclipse.swt.internal.C.<clinit>(C.java:21)
 at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:63)
 at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:54)
 at org.eclipse.swt.widgets.Display.<clinit>(Display.java:132)
 at org.eclipse.ui.internal.Workbench.createDisplay(Workbench.java:695)
 at org.eclipse.ui.PlatformUI.createDisplay(PlatformUI.java:161)

Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in swt-gtk (Ubuntu):
status: New → Confirmed
Revision history for this message
Simon Charette (charettes) wrote :

Updating to the lastests package fixed it for me yesterday.

Revision history for this message
fin (finbarr-u) wrote : [Bug 728825] Re: Eclipse cannot start: \"java.lang.UnsatisfiedLinkError: no swt-gtk-3557 or swt-gtk\"

Hi Simon,
What packages did you update? I've tried updating libswt and eclipse but
with no luck.

thanks,
Fin

Revision history for this message
Makario Lewis (makariolewis) wrote :

This bug should be marked as critical, as industry software is no longer usable.

Revision history for this message
Makario Lewis (makariolewis) wrote :

Until this is fixed, one solution is to copy /usr/lib/jni/libswt-*3740.so to ~/.swt/lib/linux/x86_64/ as described here:
https://bugs.launchpad.net/ubuntu/+source/swt-gtk/+bug/975560/comments/6

Revision history for this message
Simon Charette (charettes) wrote :
Download full text (5.2 KiB)

Herm I just ran the automatic pangolin updates using update-manger and it
nailed it.

Le 7 avril 2012 04:00, fin <email address hidden> a écrit :

> Hi Simon,
> What packages did you update? I've tried updating libswt and eclipse but
> with no luck.
>
> thanks,
> Fin
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/728825
>
> Title:
> Eclipse cannot start: "java.lang.UnsatisfiedLinkError: no swt-gtk-3557
> or swt-gtk"
>
> Status in “eclipse” package in Ubuntu:
> Fix Released
> Status in “swt-gtk” package in Ubuntu:
> Confirmed
>
> Bug description:
> Binary package hint: eclipse
>
> On a freshly installed/updated box, when I run eclipse I first get the
> splash screen, the a little dialog saying: An error has occurred. See
> the log file /space/home/jbj1/workspace/.metadata/.log. In this file I
> see at the end:
>
> !SESSION 2011-03-04 10:19:26.019
> -----------------------------------------------
> eclipse.buildId=M20100211-1343
> java.version=1.6.0_21
> java.vendor=Sun Microsystems Inc.
> BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
> Command-line arguments: -os linux -ws gtk -arch x86_64
>
> !ENTRY org.eclipse.osgi 4 0 2011-03-04 10:19:27.633
> !MESSAGE Application error
> !STACK 1
> java.lang.UnsatisfiedLinkError: no swt-gtk-3557 or swt-gtk in
> swt.library.path, java.library.path or the jar file
> at org.eclipse.swt.internal.Library.loadLibrary(Library.java:254)
> at org.eclipse.swt.internal.Library.loadLibrary(Library.java:159)
> at org.eclipse.swt.internal.C.<clinit>(C.java:21)
> at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:63)
> at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:54)
> at org.eclipse.swt.widgets.Display.<clinit>(Display.java:131)
> at
> org.eclipse.ui.internal.Workbench.createDisplay(Workbench.java:516)
> at org.eclipse.ui.PlatformUI.createDisplay(PlatformUI.java:161)
> at
> org.eclipse.ui.internal.ide.application.IDEApplication.createDisplay(IDEApplication.java:143)
> at
> org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:88)
> at
> org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368)
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:616)
> at
> org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)
> at org.e...

Read more...

Revision history for this message
sheldonross (ross-sheldon) wrote :

Thanks Makario for the workaround. Softlinks appear to work fine

'ln -s /usr/lib/jni/libswt-* /home/sross/.swt/lib/linux/x86_64/.'

replace sross with your username of course.

No further update on this. It was still broken when I came into work today, and it appears there has been another duplicate(#975560) marked since I last posted.

Revision history for this message
Scott Adams (scottadams80) wrote :

Same here on kubuntu

sudo cp /usr/lib/jni/libswt-*3740.so ~/.swt/lib/linux/x86_64/

fixed it for me

Revision history for this message
أحمد المحمودي (Ahmed El-Mahmoudy) (aelmahmoudy) wrote :
Revision history for this message
Vadim Peretokin (vperetokin) wrote :

I got this error on 12.04. I'm doubting that the issue was fixed.

Revision history for this message
useResa (rdrijsen) wrote :

I am on 12.04 32-bit and encountered the same issue.
Resolved by using the suggestion as made in comment #9 in Bug #975560

$ rm -rf ~/.swt/lib/linux/x86
$ ln -s /usr/lib/jni ~/.swt/lib/linux/x86

Revision history for this message
mateor (mateor) wrote :

encountered this only with the update to 12.04.

swt-gtk was registering as not installed. I reinstalled through synaptic both libswt-gtk-3-jni and libswt-gtk-3-java. No dice.

This worked for me, though.

$ cp /usr/lib/jni/libswt-*3740.so ~/.swt/lib/linux/x86

Revision history for this message
ejan (ehsanullahjan) wrote :

I can confirm this issue on Kubuntu

$ lsb_release -rd
Description: Ubuntu 12.04 LTS
Release: 12.04

The system is up to date.

Revision history for this message
ejan (ehsanullahjan) wrote :

I can confirm that the following fixed it (as suggested by other users above)

$ ln -s /usr/lib/jni/libswt-* ~/.swt/lib/linux/x86_64/

Revision history for this message
michael thorne (mxtbcca) wrote :

Thanks for the post, to remove the directory used:

$ rmdir ~/.swt/lib/linux/x86_64

Revision history for this message
Mike Lerley (akfy-7tk2-nw2w) wrote :

Just updated to Kubuntu 12.04, 32-bit. Same problem and same cp /usr/lib/jni/libswt-*3740.so ~/.swt/lib/linux/x86 solution.

Revision history for this message
Scott Severance (scott.severance) wrote :

Why is this bug marked "Fix released" when many users, myself included, are still experiencing this bug, long after it was supposedly fixed? I'd change it back to "Confirmed" myself, but apparently I don't have the appropriate permissions.

Revision history for this message
Scott Severance (scott.severance) wrote :

I believe Mikolaj Lechtanski'sworkaround is more efficient. It was originally posted here: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=663734#31

> create or edit /etc/eclipse.ini
>
> Paste inside:
>
> -vmargs
> -Djava.library.path=/usr/lib/jni
>
> exit
>
> make sure the file is readable:
>
> sudo chmod 755 /etc/eclipse.ini

Revision history for this message
Helen Callaghan (diamante-0) wrote :

I just experienced this bug, but admittedly am using JDK 6 because that's known to be compatible with our code base. Thanks so much for the advice.

Revision history for this message
Peter Schüller (schueller-p) wrote :

I have the bug in an up-to-date precise in eclipse 3.7.2-1 - the workaround also works for me but the bug is not fixed or the fix was removed.

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

Other bug subscribers

Remote bug watches

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