Can't start shell (mac os 10.5)

87 views
Skip to first unread message

hammett

unread,
Sep 13, 2007, 3:08:13 PM9/13/07
to Google-We...@googlegroups.com
Hello,

I've download both 1.4.60 and 1.4.10 with the same problem. It's
similar to what has been reported here
(http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/e888f9acedb61e52/3fde819fa9321e7d?lnk=gst&rnum=1#3fde819fa9321e7d)
But I'm sure nothing is using the port. Using -noserver starts the
shell, but any action - like click on About - crashes the shell.

Then I decided to use JDK 1.4.2 (the default java is 1.5.0.12 on MacOS
10.5) and got the following error starting the KitchenSink sample.

hammett:KitchenSink hammett$ ./KitchenSink-shell
2007-09-13 16:01:45.267 java[282:10b] Apple AWT Java VM was loaded on
first thread -- can't start AWT.
Exception in thread "main" java.lang.InternalError: Can't start the
AWT because Java was started on the first thread. Make sure
StartOnFirstThread is not specified in your application's Info.plist
or on the command line
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1503)
at java.lang.Runtime.loadLibrary0(Runtime.java:788)
at java.lang.System.loadLibrary(System.java:834)
at sun.security.action.LoadLibraryAction.run(LoadLibraryAction.java:50)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Toolkit.loadLibraries(Toolkit.java:1437)
at java.awt.Toolkit.<clinit>(Toolkit.java:1458)
at com.google.gwt.dev.BootStrapPlatform.maybeInitializeAWT(BootStrapPlatform.java:75)
at com.google.gwt.dev.GWTShell.run(GWTShell.java:545)
at com.google.gwt.dev.GWTShell.main(GWTShell.java:321)

Disabling the startonfirstthread is not an option as GWT checks for
it. I've downloaded GWT 1.4.60 on Windows XP it works fine (VMWare
fusion)

Any hints?

Thanks in advance

--
Cheers,
hammett
http://hammett.castleproject.org/

Reinier Zwitserloot

unread,
Sep 13, 2007, 8:22:15 PM9/13/07
to Google Web Toolkit
Add -XstartOnFirstThread as a parameter.

the applicationCreator scripts adds it for you.

On Sep 13, 9:08 pm, hammett <hamm...@gmail.com> wrote:
> Hello,
>
> I've download both 1.4.60 and 1.4.10 with the same problem. It's
> similar to what has been reported here

> (http://groups.google.com/group/Google-Web-Toolkit/browse_thread/threa...)


> But I'm sure nothing is using the port. Using -noserver starts the
> shell, but any action - like click on About - crashes the shell.
>
> Then I decided to use JDK 1.4.2 (the default java is 1.5.0.12 on MacOS
> 10.5) and got the following error starting the KitchenSink sample.
>
> hammett:KitchenSink hammett$ ./KitchenSink-shell
> 2007-09-13 16:01:45.267 java[282:10b] Apple AWT Java VM was loaded on
> first thread -- can't start AWT.
> Exception in thread "main" java.lang.InternalError: Can't start the
> AWT because Java was started on the first thread. Make sure
> StartOnFirstThread is not specified in your application's Info.plist
> or on the command line
> at java.lang.ClassLoader$NativeLibrary.load(Native Method)
> at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586)
> at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1503)
> at java.lang.Runtime.loadLibrary0(Runtime.java:788)
> at java.lang.System.loadLibrary(System.java:834)
> at sun.security.action.LoadLibraryAction.run(LoadLibraryAction.java:50)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.awt.Toolkit.loadLibraries(Toolkit.java:1437)
> at java.awt.Toolkit.<clinit>(Toolkit.java:1458)

> at com.google.gwt.dev.BootStrapPlatform.maybeInitializeAWT(BootStrapPlatform.j ava:75)

hammett

unread,
Sep 13, 2007, 10:07:56 PM9/13/07
to Google-We...@googlegroups.com
Trying again: shell is not working on leopard, java 1.5.0.update 12.
With or without the -XstartOnFirstThread.

Reinier Zwitserloot

unread,
Sep 14, 2007, 7:13:53 PM9/14/07
to Google Web Toolkit
.... try applicationCreator, see if the standard skeleton that it
generates does work. I mean, I can't exactly install leopard on a
whim, and if I start guessing why it's not working, we'll be here
until kingdom come.

On Sep 14, 4:07 am, hammett <hamm...@gmail.com> wrote:
> Trying again: shell is not working on leopard, java 1.5.0.update 12.
> With or without the -XstartOnFirstThread.
>

John Navarro

unread,
Sep 19, 2007, 5:31:27 AM9/19/07
to Google Web Toolkit
Works okay with me. But I'm having the same error if I try to run it
in eclipse. I used the applicationCreator -eclipse to generate the
launch file. Does anyone know how to fix this?

Thanks!

On Sep 15, 7:13 am, Reinier Zwitserloot <reini...@gmail.com> wrote:
> .... try applicationCreator, see if the standard skeleton that it

> generates does work. I mean, Ican'texactly install leopard on a
> whim, and if Istartguessing why it's not working, we'll be here


> until kingdom come.
>
> On Sep 14, 4:07 am, hammett <hamm...@gmail.com> wrote:
>

> > Trying again: shell is not working on leopard,java1.5.0.update 12.


> > With or without the -XstartOnFirstThread.
>
> > On 9/13/07, Reinier Zwitserloot <reini...@gmail.com> wrote:
>
> > > Add -XstartOnFirstThread as a parameter.
>
> > > the applicationCreator scripts adds it for you.
>
> > > On Sep 13, 9:08 pm, hammett <hamm...@gmail.com> wrote:
> > > > Hello,
>
> > > > I've download both 1.4.60 and 1.4.10 with the same problem. It's
> > > > similar to what has been reported here
> > > > (http://groups.google.com/group/Google-Web-Toolkit/browse_thread/threa...)
> > > > But I'm sure nothing is using the port. Using -noserver starts the
> > > > shell, but any action - like click on About - crashes the shell.
>

> > > > Then I decided to use JDK 1.4.2 (the defaultjavais 1.5.0.12 on MacOS


> > > > 10.5) and got the following error starting the KitchenSink sample.
>
> > > > hammett:KitchenSink hammett$ ./KitchenSink-shell
> > > > 2007-09-13 16:01:45.267java[282:10b]AppleAWTJavaVMwasloadedon
> > > >firstthread--can'tstartAWT.
> > > > Exception inthread"main"java.lang.InternalError:Can'tstartthe

> > > >AWTbecauseJavawas started on thefirstthread. Make sure


> > > > StartOnFirstThread is not specified in your application's Info.plist
> > > > or on the command line
> > > > atjava.lang.ClassLoader$NativeLibrary.load(Native Method)
> > > > atjava.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586)
> > > > atjava.lang.ClassLoader.loadLibrary(ClassLoader.java:1503)
> > > > atjava.lang.Runtime.loadLibrary0(Runtime.java:788)
> > > > atjava.lang.System.loadLibrary(System.java:834)
> > > > at sun.security.action.LoadLibraryAction.run(LoadLibraryAction.java:50)
> > > > atjava.security.AccessController.doPrivileged(Native Method)
> > > > atjava.awt.Toolkit.loadLibraries(Toolkit.java:1437)

> > > > atjava.awt.Toolkit.<clinit>(Toolkit.java:1458)

kro...@gmail.com

unread,
Sep 28, 2007, 6:10:35 AM9/28/07
to Google Web Toolkit
I've tried applicationCreator

Macintosh:gwt-mac-1.4.60 krondix$ ./applicationCreator -out test
client.Test
Created directory test/src
Created directory test/src/client
Created directory test/src/public
Created file test/src/Test.gwt.xml
Created file test/src/public/Test.html
Created file test/src/client/Test.java
Created file test/Test-shell
Created file test/Test-compile
Macintosh:gwt-mac-1.4.60 krondix$ cd test
Macintosh:test krondix$ ./Test-compile
Macintosh:test krondix$ ./Test-shell
Macintosh:test krondix$

Shell started for a second and then dissappeared.
And as you see the compiler does not work either. When I removed -
XstartOnFirstThread from Test-compile, it started working.
But shell does not want to start without this option.

RyanD

unread,
Oct 2, 2007, 6:42:47 PM10/2/07
to Google Web Toolkit
On the latest build of leopard, I have the same experience / problem
as kro...@gmail.com outlines.

pohl.l...@gmail.com

unread,
Oct 21, 2007, 6:37:14 PM10/21/07
to Google Web Toolkit
I'm experiencing the same problem on 9A559. I have created an issue
to track this problem...

http://code.google.com/p/google-web-toolkit/issues/detail?id=1792

a y

unread,
Oct 24, 2007, 10:34:06 PM10/24/07
to Google Web Toolkit
I fixed this issue by simply deleting the workspace and let eclipse
simply create a new one.

On Oct 21, 3:37 pm, "pohl.longs...@gmail.com"

pohl

unread,
Oct 26, 2007, 4:06:18 PM10/26/07
to Google Web Toolkit
Could someone translate what this could mean in a non-eclipse
environment?

Laszlo Ferenczi

unread,
Oct 27, 2007, 7:39:25 AM10/27/07
to Google-We...@googlegroups.com
Hello,

Hosted mode doesn't work (at all) under Leopard.
I think the previous comment is just a mistake, deleting the workspace has nothing to do with the problem here.
Refer to this issue:
http://code.google.com/p/google-web-toolkit/issues/detail?id=1792

GWT folks, could you please take a look at this ? I belive it's a common problem with 64bit environments. (similar issues with 64bit linux builds)

Regards,
Laszlo

Eric Ayers

unread,
Oct 27, 2007, 7:55:53 AM10/27/07
to Google-We...@googlegroups.com
I'm not aware of anyone on the GWT team that has 10.5 on their Mac's yet.  Would someone that has Leopard installed mind filing a ticket with Apple regarding the CGraphicsEnvironment stack trace?  This looks like its deep inside Apple's windowing toolkit implementation and probably not specific to GWT applications. 

(this one)
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at apple.awt.CGraphicsEnvironment.displayChanged(CGraphicsEnvironment.java:65)
Invalid memory access of location 00000000 eip=00000000
at apple.awt.CToolkit$4.run(CToolkit.java:1259)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
at java.awt.EventDispatchThread.pumpEvents (EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java

Adam Houghton

unread,
Oct 27, 2007, 3:05:50 PM10/27/07
to Google-We...@googlegroups.com
I submitted a bug report to Apple: Problem ID 5563333 - "CGraphicsEnvironment NullPointerException breaks Google Web Toolkit in Leopard". I included a self-contained archive (simple project & gwt-mac-1.6.0) that immediately triggers the exception.

I'll keep the issue updated if I hear anything:
http://code.google.com/p/google-web-toolkit/issues/detail?id=1792

- Adam Houghton


-----Original Message-----
From: Google-We...@googlegroups.com on behalf of Eric Ayers
Sent: Sat 10/27/2007 7:55 AM
To: Google-We...@googlegroups.com
Subject: Re: Can't start shell (mac os 10.5)

I'm not aware of anyone on the GWT team that has 10.5 on their Mac's yet.
Would someone that has Leopard installed mind filing a ticket with Apple
regarding the CGraphicsEnvironment stack trace? This looks like its deep
inside Apple's windowing toolkit implementation and probably not specific to
GWT applications.

(this one)

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at apple.awt.CGraphicsEnvironment.displayChanged(CGraphicsEnvironment.java:65)
Invalid memory access of location 00000000 eip=00000000
at apple.awt.CToolkit$4.run(CToolkit.java:1259)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184)

Todd

unread,
Oct 28, 2007, 9:59:39 PM10/28/07
to Google Web Toolkit
Has anyone made any progress on this issue? Is anyone able to get GWT
to run under Leopard?

stephenp

unread,
Oct 29, 2007, 2:24:28 AM10/29/07
to Google Web Toolkit
I too am seeing this problem.

I've been poking around a little and here is what I've seen. GWT uses
SWT (for display) and AWT (internally for things like ImageBundles).
Getting these two to play nicely together requires some hackery -
especially on Mac OS X. See the comments in
http://google-web-toolkit.googlecode.com/svn/trunk/dev/mac/src/com/google/gwt/dev/BootStrapPlatform.java.

But now I am wondering if SWT and AWT don't play well together, why
not run AWT in headless mode (-Djava.awt.headless=true)? Wouldn't this
keep AWT from creating the event thread in the first place which is
conflicting with SWT (See Eric's stack trace above)? I don't know much
about headless AWT, so maybe it doesn't.

When I try to run hosted mode GWT with the headless AWT flag set I
see:
2007-10-29 00:54:31.579 java[1126:913] Process manager already
initialized -- can't fully enable headless mode.
Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException:
sun.java2d.HeadlessGraphicsEnvironment
at apple.awt.CToolkit$4.run(CToolkit.java:1258)


at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:
269)
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:
190)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:
184)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:
176)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

This appears to have already been reported to apple developers in May:
http://lists.apple.com/archives/Java-dev/2007/May/msg00311.html.

So, without really having any idea what I am talking about, it seems
that Apple needs to make headless AWT work, and the GWT folks need to
use AWT headless mode to avoid conflicts with SWT.

Stephen


Adam Houghton

unread,
Oct 29, 2007, 9:44:45 AM10/29/07
to Google-We...@googlegroups.com
One approach I (unsuccessfully) tried was swapping in the PJA toolkit,
an AWT replacement, using these system properties:
-Dawt.toolkit=com.eteks.awt.PJAToolkit
-Djava.awt.graphicsenv=com.eteks.java2d.PJAGraphicsEnvironment

I ran into some issues that looked related to Java 1.5 compatability
w/the PJA toolkit & didn't get very far. But in theory, the general
idea of bypassing Apple's AWT code might hold potential.

- Adam

-----Original Message-----
From: Google-We...@googlegroups.com
[mailto:Google-We...@googlegroups.com] On Behalf Of stephenp
Sent: Monday, October 29, 2007 2:24 AM
To: Google Web Toolkit
Subject: Re: Can't start shell (mac os 10.5)

Kelly Norton

unread,
Nov 7, 2007, 10:18:10 AM11/7/07
to Google-We...@googlegroups.com
Just to follow up on all the Leopard threads:

There is now a test build for leopard posted on the issue tracker:
http://code.google.com/p/google-web-toolkit/issues/detail?id=1792

/kel

On Oct 29, 2007 8:44 AM, Adam Houghton <Adam.H...@sas.com> wrote:

One approach I (unsuccessfully) tried was swapping in the PJA toolkit,
an AWT replacement, using these system properties:
-Dawt.toolkit=com.eteks.awt.PJAToolkit
-Djava.awt.graphicsenv=com.eteks.java2d.PJAGraphicsEnvironment

I ran into some issues that looked related to Java 1.5 compatability
w/the PJA toolkit & didn't get very far.  But in theory, the general
idea of bypassing Apple's AWT code might hold potential.

- Adam

-----Original Message-----
From: Google-We...@googlegroups.com
[mailto: Google-We...@googlegroups.com] On Behalf Of stephenp
Sent: Monday, October 29, 2007 2:24 AM
To: Google Web Toolkit
Subject: Re: Can't start shell (mac os 10.5)


I too am seeing this problem.

I've been poking around a little and here is what I've seen. GWT uses
SWT (for display) and AWT (internally for things like ImageBundles).
Getting these two to play nicely together requires some hackery -
especially on Mac OS X. See the comments in
http://google-web-toolkit.googlecode.com/svn/trunk/dev/mac/src/com/googl
e/gwt/dev/BootStrapPlatform.java
.

But now I am wondering if SWT and AWT don't play well together, why
not run AWT in headless mode (- Djava.awt.headless=true)? Wouldn't this

rjcarr

unread,
Dec 13, 2007, 7:05:49 PM12/13/07
to Google Web Toolkit
It seems I'm missing something. I have the special leopard 61 release
and it gives the internal error just like the 60 release did:

"Apple AWT Java VM was loaded on first thread -- can't start AWT."

I'm fairly certain I'm doing everything correctly. I don't use
eclipse or any other IDE, just using the generated -shell script.
Ideas?

rjcarr

unread,
Dec 13, 2007, 7:57:19 PM12/13/07
to Google Web Toolkit
Quick update to my last comment ... it gives the "first thread" error
if started with the -shell script, but if started through ant, it
works fine. And the ant I'm using is the one that came with leopard.

Not sure if this helps, but I thought I'd update.

Jason Essington

unread,
Dec 14, 2007, 11:43:58 AM12/14/07
to Google-We...@googlegroups.com
look at the shell script, it builds the GWT paths up as absolute
paths, resolving symlinks in the process so, it probably says
something like:

.../Users/rjcarr/gwt-mac-1.4.60/gwt-user.jar...

fix the paths to the gwt-user, and gwt-dev-mac jars, and you should be
good to go.

-jason

rjcarr

unread,
Dec 14, 2007, 12:50:36 PM12/14/07
to Google Web Toolkit
Thanks for the suggestion, but as I said, I'm sure I have everything
correct, and specifically, I made the changes you recommend. I even
created a brand new app with application creator and get the same
thing, the first thread error.

However, if I start the app with ant (by creating a target that calls
GWTShell with the correct arguments), it works fine.

You're saying you can use the -shell script and it works in leopard?

Jason Essington

unread,
Dec 14, 2007, 1:12:14 PM12/14/07
to Google-We...@googlegroups.com
yup, just tried it with one of my projects ...

only change I had to make was to change the path for both the gwt-
user.jar and gwt-dev-mac.jar, and it fired right up.

-jason

Robert J. Carr

unread,
Dec 14, 2007, 1:24:17 PM12/14/07
to Google-We...@googlegroups.com
Well, thanks for checking ... I quadruple checked everything was
right, but something must have slipped by. Good to know it is just
me, thanks for looking into it.

Jason Essington

unread,
Dec 14, 2007, 1:43:08 PM12/14/07
to Google-We...@googlegroups.com
There has to be some difference in the parameters that you are passing
then, because ultimately both ant, and the shell script call GWTCompile.

It sounds to me that there's still something not right with your shell
script, or perhaps with your shell environment that is tripping things
up.

-jason

Reply all
Reply to author
Forward
0 new messages