java.lang.UnsatisfiedLinkError 1.5 Linux

37 views
Skip to first unread message

Greg Hellings

unread,
Jun 11, 2008, 4:17:50 AM6/11/08
to google-we...@googlegroups.com
Hello,

I had a project that worked marvelously under GWT/Mac. However, I
have moved over to a Linux machine for my development. At the same
time I attempted to migrate to the GWT 1.5 RC1 from the website.
After downloading the Linux version of the GWT library and moving all
of my links in the Eclipse project to reflect the new jar files, I
attempted to recompile and run the application. However, it fails
with the following error:
Exception in thread "main" java.lang.UnsatisfiedLinkError:
/home/hellings1/Public/gwt-linux-1.5.0/libswt-pi-gtk-3235.so:
/home/hellings1/Public/gwt-linux-1.5.0/libswt-pi-gtk-3235.so: wrong
ELF class: ELFCLASS32 (Possible cause: architecture word width
mismatch)
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1647)
at java.lang.Runtime.load0(Runtime.java:769)
at java.lang.System.load(System.java:968)
at org.eclipse.swt.internal.Library.loadLibrary(Library.java:132)
at org.eclipse.swt.internal.gtk.OS.<clinit>(OS.java:22)
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:126)
at com.google.gwt.dev.GWTShell.<clinit>(GWTShell.java:302)

I am on Ubuntu 8.04, AMD x86_64 system.

hellings1@ubuntu-desktop:~/workspace$ uname -a
Linux ubuntu-desktop 2.6.24-18-generic #1 SMP Wed May 28 19:28:38 UTC
2008 x86_64 GNU/Linux

Any ideas on how to remedy that?

--Greg

Ian Petersen

unread,
Jun 11, 2008, 2:37:05 PM6/11/08
to Google-We...@googlegroups.com
On Wed, Jun 11, 2008 at 4:17 AM, Greg Hellings <greg.h...@gmail.com> wrote:
> Any ideas on how to remedy that?

The least invasive solution would be to install a 32-bit JVM. The
more invasive solution is to install 32-bit Ubuntu. I'm not sure
which would be easier.

Ian

Ariane Felix

unread,
Jun 16, 2008, 10:37:47 PM6/16/08
to Google Web Toolkit
Same thing here. I really wouldn't like to do that, but maybe I will
have to use Windows...............
If I could only open libswt-pi-gtk-3235.so, but I don't know what kind
of extension is that (.so), only that it is similar to a .dll, but I
don't know how to open it.

On Jun 11, 3:37 pm, "Ian Petersen" <ispet...@gmail.com> wrote:

Ariane Felix

unread,
Jun 16, 2008, 11:11:41 PM6/16/08
to Google Web Toolkit
And doesn't work with GWT 1.4 either

Exception in thread "main" java.lang.UnsatisfiedLinkError: /home/
ariane/Java/gwt-linux-1.4.62/libswt-pi-gtk-3235.so: /home/ariane/Java/
gwt-linux-1.4.62/libswt-pi-gtk-3235.so: wrong ELF class: ELFCLASS32
(Possible cause: architecture word width mismatch)
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1647)
at java.lang.Runtime.load0(Runtime.java:770)
at java.lang.System.load(System.java:1005)
at org.eclipse.swt.internal.Library.loadLibrary(Library.java:132)
at org.eclipse.swt.internal.gtk.OS.<clinit>(OS.java:22)
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:126)
at com.google.gwt.dev.GWTShell.<clinit>(GWTShell.java:264)

Ian Petersen

unread,
Jun 17, 2008, 1:58:53 AM6/17/08
to Google-We...@googlegroups.com
On Mon, Jun 16, 2008 at 10:37 PM, Ariane Felix <ariane...@gmail.com> wrote:
> Same thing here. I really wouldn't like to do that, but maybe I will
> have to use Windows...............
> If I could only open libswt-pi-gtk-3235.so, but I don't know what kind
> of extension is that (.so), only that it is similar to a .dll, but I
> don't know how to open it.

I'd say a .so is _exactly_ the same as a .dll, but I'd be wrong
because one is for Linux (and maybe other Unix-like operating systems)
and the other is for Windows. They serve the same purpose. The s and
o in .so stand for "shared object".

Any way, opening a .so won't do you any good--it's full of compiled
code and the pre-initialized data for that code. Glossing over
details, the reason the error is cropping up is because GWT (so far)
only comes with the bits to run in a 32-bit environment. Running in a
64-bit environment requires at least a recompile of the
platform-specific code but, because there are differences between 64-
and 32-bit environments (pointer size, definition of a long, etc.),
there are sometimes problems that need to be smoothed over as well.

Thankfully, when AMD decided to create a 64-bit extension to the x86
instruction set, they did so in a backwards-compatible way, so you can
run 32-bit code in a 64-bit environment, and you'll never know the
difference. The only trick is that you have to set things up properly
to take advantage of this backwards-compatibility. Installing a
32-bit JVM should be enough. If that causes incompatibilities (it
shouldn't--I had that configuration running perfectly fine two years
ago until I realized the 64-bitness wasn't buying me anything except
grief and I went 32-bit all the way), you can just install a 32-bit
Linux on your 64-bit machine. 32-bit Linux provides all the same
features you have now, except your database will be limited to
consuming terabytes of disk space instead of yottabytes, or something
equally irrelevant, and your processes will be limited to roughly 3
gigabytes of RAM rather than several exabytes. I admit there are some
specialized circumstances where a 64-bit processor is actually
necessary, but I'd be really surprised if any machine running GWT's
hosted mode fell into one of those.

Ian

Ian

Ariane Felix

unread,
Jun 17, 2008, 7:11:13 AM6/17/08
to Google Web Toolkit
Thank you :) I will go with the 32-bit JVM. It's the easier way, and
also it's what they recommend in http://code.google.com/p/gwt-examples/wiki/gwtEclipseFaqs

On 17 jun, 02:58, "Ian Petersen" <ispet...@gmail.com> wrote:
Reply all
Reply to author
Forward
0 new messages