Error integrating GWT into existing project and running in hosted mode ("Unable to load required native library 'gwt-ll'")

84 views
Skip to first unread message

mooreds

unread,
Jun 19, 2006, 4:30:53 PM6/19/06
to Google Web Toolkit
Hi folks,

I created a project (sample mortgage calculator--more here:
http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/2ecb44922099655d/8218c2bb52d166ed?q=mortgage&rnum=2#8218c2bb52d166ed
) using the provided eclipse tools. Everything was working fine
there--I was able to compile to js, and debug in Eclipse.

Now I'm trying to get hosted mode for this coderunning from an existing
project. I've moved over the jar files from GWT (gwt-dev-windows.jar,
gwt-user.jar) into a lib directory, and am successfully able to compile
the java into javascript. I put both the dll files in the same lib
directory.

Now I'd like to be able to run the code from Eclipse so I can set
breakpoints, etc. I have copied over the .launch file parameters. The
error seems to be that the gwt-ll.dll can't be located. I'm getting
this error:

-----------------
[ERROR] The browser widget class could not be instantiated
java.lang.UnsatisfiedLinkError: Unable to load required native library
'gwt-ll'
Your GWT installation may be corrupt
at com.google.gwt.dev.shell.LowLevel.init(LowLevel.java:40)
at com.google.gwt.dev.shell.ie.LowLevelIE6.init(LowLevelIE6.java:21)
at
com.google.gwt.dev.shell.ie.BrowserWidgetIE6.<init>(BrowserWidgetIE6.java:139)
at com.google.gwt.dev.shell.PlatformSpecific.createBrowserWidget

(PlatformSpecific.java:34)
at com.google.gwt.dev.GWTShell.openNewBrowserWindow(GWTShell.java:365)
at com.google.gwt.dev.GWTShell.launchStartupUrls(GWTShell.java:328)
at com.google.gwt.dev.GWTShell.run(GWTShell.java:457)
at com.google.gwt.dev.GWTShell.main(GWTShell.java:208)
----------------------

I verified that gwt-ll.dll that is in the lib directory of my larger
project is the same size and byte for byte the same as the gwt-ll.dll
that I unzipped from the GWT distribution.

I have tried to register these dlls by running regserv32 (I get this
error from registering gwt-ll.dll: "LoadLibrary("gwt-ll.dll") failed -
Access is denied." ), and putting them in \windows\system32\. I also
tried starting eclipse from the directory they are in. In all cases, I
get the error above.

One weird thing is that, if I run the launcher from the original
project, everything works fine. I thought it might be related to
classloaders owning dll files (from this article:
http://www.eclipsezone.com/articles/eclipse-vms/), but rebooting and
running my launcher first (as opposed to the original generated
launcher) still gives me the same error.

I've searched the google groups and didn't see anything relevant.
There's one article where the author mentions the DLL search path:
http://jroller.com/page/revetkn?entry=gwt_ant_and_dependency_injection
) but that doesn't seem to help me too much. I also scanned through
the pages of http://jroller.com/page/masini , but didn't see anything
regarding my dll problem.

I'm not really compentent at windows dll debugging, so any help you
could give me would be appreciated.

Thanks,
Dan

mooreds

unread,
Jun 20, 2006, 10:41:59 AM6/20/06
to Google Web Toolkit

Well, the answer turned out to be this:
For my launcher, I had added the gwt-user.jar and gwt-dev-windows.jar
as jars, not as external jars. They need to be external jars to find
the DLLs, apparently. Changing them to external jars, pointing outside
of my source tree, caused my launcher to work just dandy.

Dan

Reply all
Reply to author
Forward
0 new messages