Friday, December 30, 2011

Deferred binding failed for ClientFactory

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.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment