Deferred binding failed for ClientFactory

352 views
Skip to first unread message

Thad

unread,
Dec 30, 2011, 10:05:42 AM12/30/11
to Google Web Toolkit
My app is running fine on my Linux machine with GWT 2.3. I'm now
trying to build it on a Windows box with GWT 2.4 (Eclipse 3.6 in both
cases).

When I run it in devmode from Eclipse, I get this error:

Uncaught exception: java.lang.RuntimeException: Deferred binding
failed for 'com.optix.cold.client.ClientFactory' (did you forget to
inherit a required module?)
at
com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:53)
at com.google.gwt.core.client.GWT.create(GWT.java:97)
at com.optix.cold.client.Cold.onModuleLoad2(Cold.java:187)
...

The line in question (#187) is:

ClientFactory clientFactory = GWT.create(ClientFactory.class);

My gwt.xml file includes:

<replace-with class="com.optix.cold.client.ClientFactoryImpl">
<when-type-is class="com.optix.cold.client.ClientFactory"/>
</replace-with>

That's all lifted right out of the Activities and Places example
(http://code.google.com/webtoolkit/doc/latest/
DevGuideMvpActivitiesAndPlaces.html).

As I said, this all runs on GWT 2.3. I copied the files over in a zip
file, only changing the war/WEB-INF/lib/gwt-servlet.jar and gwt-
servlet-deps.jar to match 2.4.

I've also tried changing "new PlaceController(EventBus)" from the
deprecated (in 2.4) com.google.gwt.event.shared.EventBus to
com.google.web.bindery.event.shared.EventBus

What could be going wrong?



My other apps are running fine, but I don't attempt deferred binding
in those.

Thad

unread,
Dec 31, 2011, 11:45:26 AM12/31/11
to Google Web Toolkit
Fixed.

While wrestling with this, I've also been trying and failing to get
the GWT plugin to install (see
http://groups.google.com/group/google-web-toolkit/browse_thread/thread/ab1e73188746862c).

On another user's recommendation I installed Eclipse 3.7 for EE
(removing all previous Eclipse folders). After installing the plugin,
my app worked. However this was not without some pain: Eclipse
insisted that "there are no GWT SDKs in your build path" and that two
references to GWT.getModuleName() in a .ui.xml file were invalid
because the method did not exist (absolutely untrue). I deleted these
errors and finally got my current app to run in devmode.

Boris Hounwanou

unread,
Apr 15, 2014, 7:27:19 AM4/15/14
to google-we...@googlegroups.com

 Hi, please how did you fix the error about th ClientFactory???

Thad Humphries

unread,
Apr 15, 2014, 11:33:53 AM4/15/14
to google-we...@googlegroups.com
This fix has been so many releases ago--Eclipse 3.7 and GWT 2.3--that whatever I did probably would no longer apply. That said, I was setting up a Windows 7 machine, and having no end of difficulty. From my notes, the eventual solution seems to have been install the EE version of Eclipse vs the standard version. However, these days I'm working on a Mac (thank goodness!) and the standard version of Eclipse Kepler (4.3) is working fine for me.

Since 2006 I've set up several machines--Mac, Windows, and Linux--for GWT development and the choice of Eclipse always confuses me. I would find it helpful if the GWT docs would offer some guidance.
Reply all
Reply to author
Forward
0 new messages