Question

I just wondered how to fix my project to avoid this error after I moved my project to a new computer from a 2.5RC setup to a 2.5 setup. It was working before. Of course HtmlTemplates may not exist in the 2.5 client-side library, but I'm not bothered about that, I just want my UI to show:

11:24:08.060 [ERROR] [myapp] Failed to create an instance of 'org.myapp.client.UI' via deferred binding 

java.lang.RuntimeException: Deferred binding failed for 'org.myapp.client.UIDesktop$Binder' (did you forget to inherit a required module?)
at com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:53)

...

Caused by: java.lang.NoClassDefFoundError: com/google/gwt/uibinder/rebind/model/HtmlTemplates
at com.google.gwt.uibinder.rebind.UiBinderWriter.<init>(UiBinderWriter.java:181)
at com.google.gwt.uibinder.rebind.UiBinderGenerator.generateOnce(UiBinderGenerator.java:188)

...

Caused by: java.lang.ClassNotFoundException: com.google.gwt.uibinder.rebind.model.HtmlTemplates
at java.net.URLClassLoader$1.run(Unknown Source)

I have just the 2.5 .jars (not 2.5RC), and .classpath seems to be all pointing to them, I've tried clearing the gwt-Cache, the generated .js file, running "Clean Project" all to no avail.

Était-ce utile?

La solution

There indeed is no such class in 2.5, but it was removed long before the first 2.5 RC. It only existed in 2.3 and 2.4.

Double-check your classpath, you must be referencing some 2.4 or 2.3 gwt-user.jar. Either that or you're using some third-party library that shadows some UiBinder classes with their own implementations, based on GWT 2.4 or 2.3 (IIRC, GWT-Platform does such a thing for its GinUiBinder); it might then have manifest during your 2.5RC to 2.5 upgrade because you changed the dependency order in your classpath and pushed gwt-user after the third-party lib.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top