My favorites | Sign in
Google
                
New issue | Search
for
| Advanced search | Search tips
Issue 2507: gwt-mac-1.5.0 hosted mode UnsatisfiedLinkError with Java 6
48 people starred this issue and may be notified of changes. Back to list
 
Reported by keerat, Jun 08, 2008
Found in GWT Release: Mac 1.5.0

Detailed description:
When Java Preferences are set to use Java SE 6 (1.6.0_05) on Leopard (OS X
10.5.3), compiles on projects seem to work, while running in hosted mode
doesn't. Running the Hello application in the samples directory after a
successful compile yeilds:

 ./Hello-shell 
Unable to load required native library 'gwt-ll'.  Detailed error:
/Library/gwt-mac-1.5.0/libgwt-ll.jnilib: )

Your GWT installation may be corrupt
Exception in thread "main" java.lang.UnsatisfiedLinkError: Unable to load
required native library 'gwt-ll'.  Detailed error:
/Library/gwt-mac-1.5.0/libgwt-ll.jnilib: )

Your GWT installation may be corrupt
	at com.google.gwt.dev.shell.LowLevel.init(LowLevel.java:107)
	at com.google.gwt.dev.shell.mac.LowLevelSaf.init(LowLevelSaf.java:130)
	at com.google.gwt.dev.BootStrapPlatform.init(BootStrapPlatform.java:34)
	at com.google.gwt.dev.GWTShell.main(GWTShell.java:355)



Workaround if you have one:
Switching back to Java SE 5 seems to mitigate the problem.

Links to the relevant GWT Developer Forum posts:
This seems to resemble this issue from a prior version of GWT:
http://code.google.com/p/google-web-toolkit/issues/detail?id=1792
Comment 1 by alex.moffat, Jun 09, 2008
Java 6 on OS X is 64 bit only so I believe hosted mode isn't going to work with Java 6 on OS X until the browser 
plugin solution that supports 64 bit JVMs is released. This is unfortunate as there is not a non-64 bit Java 6 
solution available for OS X, in contrast to other platforms, so there is no workaround available.
Comment 2 by scottb@google.com, Jun 10, 2008
Bob, can you investigate and see if this is a real issue?  jgw suggests it's most 
likely valid.  If so, we should issue a good error message in BootStrapPlatform (kind 
like we're going to do for Safari 2 installations).

Possible duplicate; marking for RC2 so we can at least issue a helpful error.


Status: Accepted
Owner: b...@google.com
Cc: knor...@google.com
Labels: -Priority-Medium Priority-High Milestone-1_5_RC2 Category-HostedMode
Comment 3 by bobv@google.com, Jun 10, 2008
Will investigate.
Status: Started
Comment 4 by bobv@google.com, Jun 10, 2008
Issue confirmed.  The OS X Java6 needs 64-bit libraries.

http://groups.google.com/group/Google-Web-Toolkit-Contributors/t/3148e9abc44d5aa4
Status: ReviewPending
Labels: ReviewBy-scottb ReviewBy-knorton
Comment 5 by peter.blazejewicz, Jun 10, 2008
hi Bob,
is this issue (jvm6) based on jvm64bit some issues (swt implementation) or lack of 64-bit browser (all public 
safari browsers are compiled 32-bit)?
If i remember well there are related topics on java-dev apple lists

regards,
Peter
Comment 6 by bobv@google.com, Jun 10, 2008
Both, actually.  We need to run SWT and Safari within the JVM process.  The
Java5-only restriction on OSX will be lifted with the out-of-process hosted mode
since we can eliminate SWT for Swing.
Comment 7 by bobv@google.com, Jun 10, 2008
Improved error response in r3048.
Status: FixedNotReleased
Comment 8 by Sam.Halliday, Jun 28, 2008
this has been marked "FixedNotReleased" because there is now a better error response. Is there any hope of an 
actual fix at some point? This bug means that Apple developers cannot use Java 6 for GWT apps, which is a fairly 
major restriction.
Comment 9 by bobv@google.com, Jun 30, 2008
This only affects running hosted-mode with the Apple-supplied Java 1.6 runtime, other
platforms are not affected.  Developers who need to write server-based components
that rely on OS X Java 1.6 can use -noserver while running the hosted-mode shell with
1.5.

This issue will be completely moot upon delivery of out-of-process hosted mode.
Comment 10 by scottb@google.com, Aug 13, 2008
1_5_RC2 has been released.
Status: Fixed
Comment 11 by varmadeep, Nov 06, 2008
Is this issue fixed now? Can you please confirm?
Comment 12 by Sam.Halliday, Nov 06, 2008
No, this has absolutely not been fixed in any of the 1.5.x releases... why has it been marked Fixed?

If the user attempts to run the shell on OS X Java 6, they get the message "You must use a Java 1.5 runtime to 
use GWT Hosted Mode on Mac OS X."

At the very least, this should be marked NotGoingToFix or track it as a dupe on a feature request for out-of-
process hosted mode which is claimed to side-step this issue.
Comment 14 by pohl.longsine, Nov 17, 2008
Would it be possible to keep this issue open until OOP hosted mode is delivered?  Some of us have starred this 
issue in hopes of being notified when the issue is actually fixed.



Comment 15 by jcott28, Nov 24, 2008
I agree.  This is a pretty unfortunate problem.  Java 6 on osx works fine.  Please
enable hosted mode to run with it.  I hate having to use bootcamp.  Using --noserver
and setting up my scripts to hot deploy are just a pain in the as.
Comment 16 by jimtomlinson, Dec 23, 2008
This is not 'fixed'; not by my definition of the term. If I were the dev manager in
charge of this feature, I'd re-open the issue, for resolution by out-of-process
hosted mode.
Comment 17 by sophiav, Jan 21, 2009
I think this issue should be kept open as it is a major restriction not being able to
use Java 1.6, but for those osx developers you can switch java versions via the
/Applications/Utilities/Java/Java Preferences.app back to 1.5 for when you are
developing and needing hosted mode, I can't think of that many differences between
the versions that you will miss and then switch back once you no longer require
hosted mode.
Comment 18 by alexaxiong, Jan 27, 2009
I got my demo application run with java 1.5.0 on Mac OS 10.4 Tiger. Good lucks, guys.
Comment 19 by avataristic, Apr 06, 2009
Let me second the opinions of those above that marking this fixed as there is an unacceptable workaround to 
revert back to 1.5 is pure bug-triage ballocks. Even though switching between JVM versions is easy enough 
with the Java preferences app, it doesn't help a lot if you have JDK 1.6 dependencies in your project.
Comment 20 by OsorioJa...@gmail.com, Apr 23, 2009
thats exactly my problem! i tried everything
this blog does help: http://grack.com/blog/2009/04/19/the-final-word-on-google-eclipse-plugin-osx-
crashes/comment-page-1/#comment-35

so i can compile now but i can't run it...

Comment 21 by yonas.jongkind, Jun 22, 2009
With Eclipse being released on Mac supporting JRE6 and 64 bit java would it be possible to fix this, or are there 
any other issues? 

Are you guys working on this, or should I try and hack it?
Comment 22 by marco.len, Jun 27, 2009

Hi I am using a project that has dependencies with java 1.6 and i receive this error.
You must use a Java 1.5 runtime to use GWT Hosted Mode on Mac OS X.

Also, I tried the GWT plugin with Galileo and it doesnt work either.


Comment 23 by OsorioJa...@gmail.com, Jun 30, 2009
i cant run my apps or example apps in eclipse with any configuration...
its just too buggy... but i love gwt and dont want to go back to windows and ubuntu is not an option since i have 
a mac :S

coding on a vm
mac developers really need get 2.0! i just can't wait guys!

Comment 24 by gregory.durelle, Jul 15, 2009
just updated my eclipse to get last appengine 1.2.2 and gwt 1.7.
No Eclipse plugin update that would resolve the problem ?
hosted mode on mac with a 1.5 jre is really cumbersome... 
Comment 25 by OsorioJa...@gmail.com, Jul 15, 2009
I have been able to compile and Run Java 1.6 with gwt on macosx using netbeans 2.7 and the latest 
gwt4nb Plugin 
Comment 26 by matthewdornquast, Jul 15, 2009
Running snow leopard - no way I can run Java 1.5.  Does this mean no GWT love?  Is 
nobody at Google doing GWT on Snow Leopard yet? :)
Comment 27 by friksa, Jul 30, 2009
Using Snow Leopard and GWT does not run.  Get this error:
You must use a Java 1.5 runtime to use GWT Hosted Mode on Mac OS X.

Even tried Java 1.6 32-bit version.
Comment 29 by dustinboling, Aug 18, 2009
Just upgraded to Snow Leopard, Eclipse 3.5 Java EE, and fresh install of the Google
Plugin GWT 1.7 and App Engine SDK 1.2.2. 

It seems as if I won't be making too much progress on this machine for a bit:

"You must use a Java 1.5 runtime to use GWT Hosted Mode on Mac OS X."

I appreciate the work that goes into this project. I just hope that I can get back to
work soon.

Comment 30 by second.c...@gmail.com, Aug 20, 2009
may i know when will this be fixed?
Comment 31 by helmishariff, Aug 27, 2009
Sorry, any update on this? I'm understand because why the status is fixed.
Comment 32 by fariba.zamanpoor, Aug 27, 2009
Ok this is a problem. Eclipse Galileo didn't run on Tiger, so I went through the
trouble of upgrading to Snow Leopard hoping to do GWT dev on 1.6. Now it wants 1.5
back? You know most student developers in universities run macs these days. Get it to
work Google! I'll be doing my dev on Echo3 for now.
Comment 33 by hans.sjunnesson, Aug 27, 2009
This isn't really Google's problem to fix.
The issue stems from Eclipse's SWT hasn't yet been ported to Cocoa, and requires a 32-bit java.

Here's a way to downgrade to java 1.5:
http://wiki.oneswarm.org/index.php/OS_X_10.6_Snow_Leopard
Comment 34 by Alexande...@googlemail.com, Aug 27, 2009
Isn't the 64-bit SWT Cocoa port available since December last year? See
https://bugs.eclipse.org/bugs/show_bug.cgi?id=239301
Comment 35 by mark.sievers, Aug 29, 2009
+1 for the instructions here  (comment 33)

http://wiki.oneswarm.org/index.php/OS_X_10.6_Snow_Leopard

GWT happy again.

Comment 36 by OsorioJa...@gmail.com, Aug 29, 2009
thx for thw workaround
Comment 37 by pohl.longsine, Aug 29, 2009
I noticed that it should be possible for Google to release a quick 
patch of GWT 1.6.x that should allow users to run the legacy hosted 
mode under a Java 1.6 VM now. 

GWT's hosted mode, on the Mac, does an explicit check to ensure that 
Java 1.5 is being used.  This check only existed because under 
Leopard, Java 1.5 is the only 32-bit JVM that was available.  (I 
believe 1.6 was 64-bit only). 

I installed Snow Leopard today, and it appears that while it only has 
Java 1.6, it appears to have both a 64-bit mode and a 32-bit mode. 
(Open "/Applications/Utilities/Java Preferences.app", and under the 
"General" tab you can see both of these modes.) 

So I think it should be possible to simply remove the explicit check 
that GWT does for Java 1.5.   Has anybody attempted this?

Comment 38 by somakani, Aug 29, 2009
For those still on Mac OS Leopard (Not snow leopard yet), here is what I did.  I have
both 1.6 and 1.5 installed on the mac.  I got it working by going to Project
Properties -> Run/Debug Settings -> Selected the Project -> "Edit..." -> JRE  Then
changed to Alternate JRE and selected 1.5.  Perhaps everyone knows this already but
it took me a little while to discover.  
Comment 39 by allen.holub, Aug 30, 2009
Just tried changing the GRE using the procedure in Comment 38 and it doesn't work
(with an out-of-the-box Snow Leopard distribution).

It's inexcusable that this problem is marked 'fixed'.  All I did was install Snow
Leopard, and now GWT effectively doesn't work. At minimum, there should be some sort
of FAQ describing, in detail, how to work around this problem.
Comment 40 by pohl.longsine, Aug 30, 2009
Allen, I agree.  I stuck my neck out and filed a new one.   Here's the link, in case anybody wants to follow:

http://code.google.com/p/google-web-toolkit/issues/detail?id=3998
Comment 42 by allen.holub, Aug 30, 2009
Here's a workaround, which I've also posted to the newer thread. Note that this
workaround does not fix the real problem, which is that hosted mode does not work
with a 64-bit 1.6 JVM. However, it will get you working again:

If you look in the directory that holds the JVM versions
(/System/Library/Frameworks/JavaVM.framework/Versions/), you'll see that 1.5 and
1.5.0 are just symlinks to the 1.6 jvm. This means that changing the defaults in
Eclipse will have no effect, since all that you'll be doing is pointing to a symlink
that just points back to the original directory. What you need is a *real* 32-bit 1.5
JVM, which doesn't ship with Snow Leopard.

I did some rooting around and found the following instructions for downgrading your
JVM to a *real* 32-bit 1.5.0 JVM. This process doesn't remove the 64-bit 1.6 JVM from
the system, so it's still there if you need it.  It does, however, make a real 32-bit
1.5 JVM be the default JVM, and that will make GWT happy:

http://wiki.oneswarm.org/index.php/OS_X_10.6_Snow_Leopard

As an aside, these instructions require you to have a wget installed. I'm not sure if
there's one in Snow Leopard (there didn't used to be), but you can get one from
http://kevinhenrikson.com/2006/06/18/macos-x-1046-wget/ or you can download the
latest version and compile it by following these instructions:
http://www.asitis.org/installing-wget-for-mac-os-x

Comment 43 by pohl.longsine, Aug 30, 2009
I just had success following the procedure on the oneswarm.org wiki too.   Enough to get me by.
Comment 44 by hans.sjunnesson, Aug 31, 2009
You can force the Java 1.6 version on Snow Leopard to run in 32-bit mode by adding the vm flag "-d32".
If you do this, SWT works fine, which was the problem to begin with, that Java 6 in Leopard was 64-bit only.

I havn't tried starting GWT hosted mode with this, but technically this should work. That is unless there's an 
explicit check whether the user is running Mac and using java 6.
Comment 45 by benjamin.renaud, Aug 31, 2009
-d32 doesn't appear to work. Given that the error is 'You must use a Java 1.5 runtime
to use GWT Hosted Mode on Mac OS X.' I suspect Hans speculation that there is an
explicit check is accurate.
Comment 46 by andiknees, Sep 01, 2009
Hi,
I have followed the instructions in
http://wiki.oneswarm.org/index.php/OS_X_10.6_Snow_Leopard
but with no effort.
Instead of the "You must use a Java 1.5 runtime to use GWT Hosted Mode on Mac OS X." warning I get an 
Exception:
 java.lang.UnsupportedClassVersionError: Bad version number in .class file
	at java.lang.ClassLoader.findBootstrapClass(Native Method)
	at java.lang.ClassLoader.findBootstrapClass0(ClassLoader.java:946)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:308)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:280)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
	at sun.security.jca.ProviderConfig$3.run(ProviderConfig.java:234)
	at java.security.AccessController.doPrivileged(Native Method)
	at sun.security.jca.ProviderConfig.doLoadProvider(ProviderConfig.java:225)
	at sun.security.jca.ProviderConfig.getProvider(ProviderConfig.java:205)
	at sun.security.jca.ProviderList.loadAll(ProviderList.java:254)
	at sun.security.jca.ProviderList.removeInvalid(ProviderList.java:271)
	at sun.security.jca.Providers.getFullProviderList(Providers.java:185)
	at java.security.Security.getProviders(Security.java:422)
	at java.security.Security.getProviders(Security.java:569)
	at java.security.Security.getProviders(Security.java:515)
	at org.apache.derby.client.am.EncryptionManager.<init>(Unknown Source)
...
The class to be loaded seems to be "com.apple.crypto.provider.Apple".

Regards
Andreas
Comment 47 by pohl.longsine, Sep 01, 2009
Andreas, the message that you have given:  

     "java.lang.UnsupportedClassVersionError: Bad version number in .class file"  

...indicates that there are .class files hanging around from a prior build using Java 1.6.   Try to clean your whole 
project and build it again.
Comment 48 by andiknees, Sep 01, 2009
Hi Pohl,
thanks for the answer. I have found the error. It was due to a misconfiguration in Eclipse. I have mixed the 1.6 
and 1.5 jars when I added the Java 1.5 Library.
Now it works.
Regards
Andreas
Comment 49 by alex.moffat, Sep 02, 2009
I've tried out the approach mentioned by pohl.longsine in an earlier message. By modifying the 
BootStrapPlatform class to bypass the check for Java 5 it's possible to use java -d32 (to choose 32 bit mode) to 
run hosted mode on Snow Leopard with no problems. I have more details in my blog post 
http://development.lombardi.com/?p=1012 but it was really very simple. I would hope we'd see a quick release 
of GWT 1.7.1 to fix this but till then this works well.
Comment 50 by cdavidson825, Sep 04, 2009
Thanks Alex.  Copying the BootStrapPlatform class in our project and bypassing the
1.5 check worked for us.  Thanks again..
Comment 51 by mi...@buholzer.com, Sep 22, 2009
Thanks Alex!! Just worked fine! 

Hopefully this fix is included soon in the standard distribution.
Comment 52 by jimtomlinson, Nov 13, 2009
10.6.2 seems to have broken this fix. Was working great for me until I updated to latest Snow Leopard last 
night; now I'm getting:

Process:         java [2065]
Path:            /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/bin/java
Identifier:      java
Version:         ??? (???)
Code Type:       X86 (Native)
Parent Process:  java [2050]

PlugIn Path:       /Users/jimt/.m2/repository/com/google/gwt/gwt-dev/1.6.4/libgwt-ll.jnilib
PlugIn Identifier: libgwt-ll.jnilib
PlugIn Version:    ??? (???)

Date/Time:       2009-11-13 10:19:32.235 -0800
OS Version:      Mac OS X 10.6.2 (10C540)
Report Version:  6

Exception Type:  EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000010
Crashed Thread:  0  Dispatch queue: com.apple.main-thread

Application Specific Information:

Java information:
 Exception type: Bus Error (0xa) at pc=0x98cd877b

 Java VM: Java HotSpot(TM) Client VM (14.1-b02-90 mixed mode macosx-x86)

Current thread (0x01824000):  JavaThread "Thread-0" daemon [_thread_in_native, id=-1604791040, 
stack(0xbf800000,0xc0000000)]
Stack: [0xbf800000,0xc0000000]
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
J  com.google.gwt.dev.shell.mac.LowLevelSaf.gcUnprotect(II)V
J  com.google.gwt.dev.shell.mac.JsValueSaf.setJsVal(I)V
j  com.google.gwt.dev.shell.mac.JsValueSaf.setUndefined()V+7
J  
com.google.gwt.dev.shell.JsValueGlue.set(Lcom/google/gwt/dev/shell/JsValue;Lcom/google/gwt/dev/shell/C
ompilingClassLoader;Ljava/lang/Class;Ljava/lang/Object;)V
...
Comment 53 by jdoug...@basis.com, Nov 13, 2009
jimtomlinson:  The Safari 4.0.4 update breaks GWT hosted mode on the Mac; it's not limited to Snow Leopard.  
See http://code.google.com/p/google-web-toolkit/issues/detail?id=4220.
Comment 55 by jimtomlinson, Nov 13, 2009
Sweet; I replaced the gcUnprotected(int, int) with an empty method as mentioned at
http://populationjim.com/2009/11/13/downgrade-safari-from-404-to-get-gwt-working
et voila! Figured I'd already hacked gwt to get 1.6.4 running on my mac (can't get our project to move to new gwt 
yet), so why the heck not?

Thanks; you saved my keester!
Sign in to add a comment