GWT 2.5 upgrade challenges

1,031 views
Skip to first unread message

coderinabstract

unread,
Dec 29, 2012, 5:03:50 PM12/29/12
to gwt-pl...@googlegroups.com
Trying to upgrade a fairly mature gwt 2.4 gwtp .7 gin 1.5 app to gwt 2.5 and getting this compile errors below. Any feedback appreciated.. Am stuck. Thanks and Cheers...

16:53:49.010 [ERROR] [app] Unable to load module entry point class com.app.client.bootstrap.app (see associated exception for details)
java.lang.RuntimeException: Deferred binding failed for 'com.fp.client.common.pleasewait.PleaseWaitView$Binder' (did you forget to inherit a required module?)
    at com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:53)
    at com.google.gwt.core.shared.GWT.create(GWT.java:57)
    at com.google.gwt.core.client.GWT.create(GWT.java:85)
    at com.app.client.bootstrap.ClientGinjectorImpl.create_Key$type$com$fp$client$common$pleasewait$PleaseWaitView$Binder$_annotation$$none$$(ClientGinjectorImpl.java:746)
    at com.app.client.bootstrap.ClientGinjectorImpl.get_Key$type$com$fp$client$common$pleasewait$PleaseWaitView$Binder$_annotation$$none$$(ClientGinjectorImpl.java:760)
    at com.app.client.bootstrap.ClientGinjectorImpl.create_Key$type$com$fp$client$common$pleasewait$PleaseWaitView$_annotation$$none$$(ClientGinjectorImpl.java:3100)
    at com.app.client.bootstrap.ClientGinjectorImpl.get_Key$type$com$fp$client$common$pleasewait$PleaseWaitView$_annotation$$none$$(ClientGinjectorImpl.java:3111)
    at com.app.client.bootstrap.ClientGinjectorImpl.create_Key$type$com$fp$client$common$pleasewait$PleaseWaitPresenterWidget$MyView$_annotation$$none$$(ClientGinjectorImpl.java:6780)
    at com.app.client.bootstrap.ClientGinjectorImpl.get_Key$type$com$fp$client$common$pleasewait$PleaseWaitPresenterWidget$MyView$_annotation$$none$$(ClientGinjectorImpl.java:6789)
    at com.app.client.bootstrap.ClientGinjectorImpl.create_Key$type$com$fp$client$common$pleasewait$PleaseWaitPresenterWidget$_annotation$$none$$(ClientGinjectorImpl.java:3301)
    at com.app.client.bootstrap.ClientGinjectorImpl.get_Key$type$com$fp$client$common$pleasewait$PleaseWaitPresenterWidget$_annotation$$none$$(ClientGinjectorImpl.java:3312)
    at com.app.client.bootstrap.ClientGinjectorImpl.create_Key$type$com$fp$client$place$FlowPlatformPlaceManager$_annotation$$none$$(ClientGinjectorImpl.java:4652)
    at com.app.client.bootstrap.ClientGinjectorImpl.get_Key$type$com$fp$client$place$FlowPlatformPlaceManager$_annotation$$none$$(ClientGinjectorImpl.java:4663)
    at com.app.client.bootstrap.ClientGinjectorImpl.create_Key$type$com$gwtplatform$mvp$client$proxy$PlaceManager$_annotation$$none$$(ClientGinjectorImpl.java:4309)
    at com.app.client.bootstrap.ClientGinjectorImpl.get_Key$type$com$gwtplatform$mvp$client$proxy$PlaceManager$_annotation$$none$$(ClientGinjectorImpl.java:4321)
    at com.app.client.bootstrap.ClientGinjectorImpl.getPlaceManager(ClientGinjectorImpl.java:75)
    at com.app.client.property.create.PropertyCreateWizardPPropertyCreateNewProxyImpl.delayedBind(PropertyCreateWizardPPropertyCreateNewProxyImpl.java:53)
    at com.gwtplatform.mvp.client.DelayedBindRegistry.bind(DelayedBindRegistry.java:48)
    at com.app.client.bootstrap.app.onModuleLoad(app.java:34)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:406)
    at com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:200)
    at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:526)
    at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
    at java.lang.Thread.run(Thread.java:680)
Caused by: java.lang.NoSuchMethodError: com.google.gwt.uibinder.rebind.FieldWriterOfGeneratedType.<init>(Lcom/google/gwt/core/ext/typeinfo/JClassType;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lcom/google/gwt/uibinder/rebind/MortalLogger;)V
    at com.google.gwt.uibinder.rebind.GinFieldManager.registerFieldOfGeneratedType(GinFieldManager.java:293)
    at com.google.gwt.uibinder.rebind.UiBinderWriter.parseDocumentElement(UiBinderWriter.java:1363)
    at com.google.gwt.uibinder.rebind.UiBinderWriter.parseDocument(UiBinderWriter.java:1073)
    at com.google.gwt.uibinder.rebind.GinUiBinderGenerator.generateOnce(GinUiBinderGenerator.java:195)
    at com.google.gwt.uibinder.rebind.GinUiBinderGenerator.generate(GinUiBinderGenerator.java:146)
    at com.google.gwt.core.ext.IncrementalGenerator.generateNonIncrementally(IncrementalGenerator.java:40)
    at com.google.gwt.dev.javac.StandardGeneratorContext.runGeneratorIncrementally(StandardGeneratorContext.java:657)
    at com.google.gwt.dev.cfg.RuleGenerateWith.realize(RuleGenerateWith.java:41)
    at com.google.gwt.dev.shell.StandardRebindOracle$Rebinder.rebind(StandardRebindOracle.java:79)
    at com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:276)
    at com.google.gwt.dev.shell.ShellModuleSpaceHost.rebind(ShellModuleSpaceHost.java:141)
    at com.google.gwt.dev.shell.ModuleSpace.rebind(ModuleSpace.java:595)
    at com.google.gwt.dev.shell.ModuleSpace.rebindAndCreate(ModuleSpace.java:465)
    at com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:49)
    at com.google.gwt.core.shared.GWT.create(GWT.java:57)
    at com.google.gwt.core.client.GWT.create(GWT.java:85)
    at com.app.client.bootstrap.ClientGinjectorImpl.create_Key$type$com$fp$client$common$pleasewait$PleaseWaitView$Binder$_annotation$$none$$(ClientGinjectorImpl.java:746)
    at com.app.client.bootstrap.ClientGinjectorImpl.get_Key$type$com$fp$client$common$pleasewait$PleaseWaitView$Binder$_annotation$$none$$(ClientGinjectorImpl.java:760)
    at com.app.client.bootstrap.ClientGinjectorImpl.create_Key$type$com$fp$client$common$pleasewait$PleaseWaitView$_annotation$$none$$(ClientGinjectorImpl.java:3100)
    at com.app.client.bootstrap.ClientGinjectorImpl.get_Key$type$com$fp$client$common$pleasewait$PleaseWaitView$_annotation$$none$$(ClientGinjectorImpl.java:3111)
    at com.app.client.bootstrap.ClientGinjectorImpl.create_Key$type$com$fp$client$common$pleasewait$PleaseWaitPresenterWidget$MyView$_annotation$$none$$(ClientGinjectorImpl.java:6780)
    at com.app.client.bootstrap.ClientGinjectorImpl.get_Key$type$com$fp$client$common$pleasewait$PleaseWaitPresenterWidget$MyView$_annotation$$none$$(ClientGinjectorImpl.java:6789)
    at com.app.client.bootstrap.ClientGinjectorImpl.create_Key$type$com$fp$client$common$pleasewait$PleaseWaitPresenterWidget$_annotation$$none$$(ClientGinjectorImpl.java:3301)
    at com.app.client.bootstrap.ClientGinjectorImpl.get_Key$type$com$fp$client$common$pleasewait$PleaseWaitPresenterWidget$_annotation$$none$$(ClientGinjectorImpl.java:3312)
    at com.app.client.bootstrap.ClientGinjectorImpl.create_Key$type$com$fp$client$place$FlowPlatformPlaceManager$_annotation$$none$$(ClientGinjectorImpl.java:4652)
    at com.app.client.bootstrap.ClientGinjectorImpl.get_Key$type$com$fp$client$place$FlowPlatformPlaceManager$_annotation$$none$$(ClientGinjectorImpl.java:4663)
    at com.app.client.bootstrap.ClientGinjectorImpl.create_Key$type$com$gwtplatform$mvp$client$proxy$PlaceManager$_annotation$$none$$(ClientGinjectorImpl.java:4309)
    at com.app.client.bootstrap.ClientGinjectorImpl.get_Key$type$com$gwtplatform$mvp$client$proxy$PlaceManager$_annotation$$none$$(ClientGinjectorImpl.java:4321)
    at com.app.client.bootstrap.ClientGinjectorImpl.getPlaceManager(ClientGinjectorImpl.java:75)
    at com.app.client.property.create.PropertyCreateWizardPPropertyCreateNewProxyImpl.delayedBind(PropertyCreateWizardPPropertyCreateNewProxyImpl.java:53)
    at com.gwtplatform.mvp.client.DelayedBindRegistry.bind(DelayedBindRegistry.java:48)
    at com.app.client.bootstrap.app.onModuleLoad(app.java:34)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:406)
    at com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:200)
    at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:526)
    at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
    at java.lang.Thread.run(Thread.java:680)

coderinabstract

unread,
Dec 29, 2012, 7:37:56 PM12/29/12
to gwt-pl...@googlegroups.com
Posted this on GWT group and got quick response below... Is this a compatibility bug ? Any advice? Have a fairly large app which needs to upgrade for some GWT 2.5 features.. Any feedback appreciated... Thanks and Cheers

Current thesis from GWT group is in gwtp 0.7 incompatibility with GWT 2.5. Pasting thread content and link from GWT group below:::

Link to thread is:

Brandon Donnelson

unread,
Dec 29, 2012, 10:23:48 PM12/29/12
to gwt-pl...@googlegroups.com
uiBinder injection has broken in 2.5, but I'm not sure this is it. Check to see if there are ui binder elements getting injected via gin, that is they should be changed from @UiField(provided=true) and instantiate them via your constructor gin injection. Other than that change everything works fine with 2.5. We've released 0.8a1 and another release is coming soon, but it's built on 2.5, not that .7 doesn't work with 2.5. 

Oh wait, upgrade gin, that should do it. I'm remember having that error when it was behind. 

Brandon Donnelson

unread,
Dec 29, 2012, 10:25:34 PM12/29/12
to gwt-pl...@googlegroups.com
I used these versions on the last build of a 2.5 app. Try upgrading to what we use here. 

coderinabstract

unread,
Dec 30, 2012, 9:42:29 PM12/30/12
to gwt-pl...@googlegroups.com
Upgraded to Gin 2.0 and same error...

Still shows gwt 2.5 incompatibility with gwtp Class method.

Will try .8 Snapshot next..

coderinabstract

unread,
Dec 30, 2012, 10:54:41 PM12/30/12
to gwt-pl...@googlegroups.com
Error below with 0.8 SNAPSHOT...

I also want to clarify that this is a standard GWTP app with presenter, presneterWidgets, their Views and the corresponding ui.xml files for the views. This is following all of the best practices over time. Really need a solution as am stuck. Lot of Ui.xml files for each view. I am not sure what use cases  are not compatible anymore. The error thrown does not even have any @UiField(Provider=true) type fields in the view. Any feedback/help appreciated. 

Caused by: java.lang.NoSuchMethodError: com.google.gwt.uibinder.rebind.FieldWriterOfGeneratedType.<init>(Lcom/google/gwt/uibinder/rebind/FieldManager;Lcom/google/gwt/core/ext/typeinfo/JClassType;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lcom/google/gwt/uibinder/rebind/MortalLogger;)V
    at com.google.gwt.uibinder.rebind.GinFieldManager.registerFieldOfGeneratedType(GinFieldManager.java:347)
    at com.google.gwt.uibinder.rebind.UiBinderWriter.parseDocumentElement(UiBinderWriter.java:1188)
    at com.google.gwt.uibinder.rebind.UiBinderWriter.parseDocument(UiBinderWriter.java:953)
    at com.google.gwt.uibinder.rebind.GinUiBinderGenerator.generateOnce(GinUiBinderGenerator.java:196)
    at com.google.gwt.uibinder.rebind.GinUiBinderGenerator.generate(GinUiBinderGenerator.java:148)
    at com.google.gwt.core.ext.GeneratorExtWrapper.generate(GeneratorExtWrapper.java:48)
    at com.google.gwt.core.ext.GeneratorExtWrapper.generateIncrementally(GeneratorExtWrapper.java:60)
    at com.google.gwt.dev.javac.StandardGeneratorContext.runGeneratorIncrementally(StandardGeneratorContext.java:647)

Thanks and Cheers..

coderinabstract

unread,
Dec 30, 2012, 11:00:19 PM12/30/12
to gwt-pl...@googlegroups.com
I noticed another WARNING on the dev mode console along with the error with 0.8-SNAPSHOT
[DEBUG] [vrntmgr] - Rebinding com.fp.client.common.pleasewait.PleaseWaitView.Binder
[DEBUG] [vrntmgr] - Invoking generator com.google.gwt.uibinder.rebind.GinUiBinderGenerator
[WARN] [vrntmgr] - Configuration property UiBinder.useLazyWidgetBuilders is false. Deprecated code generation is in play. This property will soon become a no-op.

FYI, the pleaseWaitView has been borrowed from some of the code authored by Christian in the past.

coderinabstract

unread,
Dec 31, 2012, 12:46:20 AM12/31/12
to gwt-pl...@googlegroups.com
Well I apologize for jumping the gun here... There was a problem with my pom file... I have moved past this error with GWTP .8-SNAPSHOT.

Now facing problems with Binder based composite widgets being injected in ui.xml, e.g. the old RoundTabPanel composite with Binder injection in composite... and working through it. Sorry for the confusion.

Thanks and Cheers

coderinabstract

unread,
Dec 31, 2012, 4:28:26 PM12/31/12
to gwt-pl...@googlegroups.com
Got everything working.. thanks to Brandon's POM versions and by leveraging .8-SNAPSHOT.

Key learning was....

Had to modify any composite used in ui.xml file which had 
UiBinder injected in composite constructor. Reverted back to static final field for composites extended UIBinder interface and create it with GWT.create and everything ok.

Thanks and Cheers...

Brandon Donnelson

unread,
Jan 1, 2013, 10:27:37 PM1/1/13
to gwt-pl...@googlegroups.com
Thanks for sharing your results. Nice job. 

Christian Goudreau

unread,
Jan 10, 2013, 10:07:09 AM1/10/13
to gwt-pl...@googlegroups.com
Uhm, UiBinder injected in views should still work (I'm working within a really big app that does).

You didn't use GinUiBinder at all? Is the view extending Composite? (if yes, don't :D)

There's alpha of GWTP 0.8 if you don't want to use a more stable version, I'll have to make sure the steps needed to go from 0.7 to 0.8, but unless you're using the new Ginjector generator, you shouldn't have any breaking changes.

FYI, There's some critical fixes that will get pushed to GWT 2.5 really soon, most are RPC issues.




--
 
 



--
Christian Goudreau

Ben Ritchie

unread,
Jan 13, 2013, 2:27:10 PM1/13/13
to gwt-pl...@googlegroups.com
Hi CoderInAbstract,

Im facing the same problem, Im seeing issues with my attempts to use Composites (such as ContextualRadioButton 
and PlaceholderHelpPanel)

Can you advise as to how I can continue to use Composite children in my GWTP 0.8+ Presenters, I haven't been able to figure out a way to get past this other than reimplementing them all as Presenters...

I started doing that, but it amounts to conservatively 1000 more lines of code! (10 composites x 30 LOC x 3 files for presenter, view, wiring code, and replacement logic to mimic UIBinder declarations)

GWTP is great for event-driven complex components but it shouldn't preclude the use of lightweight GWT composites to allow for simple HTML and style reuse. We need the more simple DRY (Don't Repeat Yourself) declarative approach too. 

Here is the compiler output I am seeing

Compile with -strict or with -logLevel set to TRACE or DEBUG to see all errors.
   Scanning for additional dependencies: jar:file:/C:/Dev/Java/GWT/gwt-2.4.0/gwt-2.4.0/gwt-user.jar!/com/google/gwt/cell/client/ButtonCellBase.java
      Computing all possible rebind results for 'com.google.gwt.cell.client.ButtonCellBase.DefaultAppearance.Template'
         Rebinding com.google.gwt.cell.client.ButtonCellBase.DefaultAppearance.Template
            Invoking generator com.google.gwt.safehtml.rebind.SafeHtmlTemplatesGenerator
               Constructing interface com.google.gwt.cell.client.ButtonCellBase.DefaultAppearance.Template
                  Generating method body for iconContentLayout()
                     [WARN] Template with variable in CSS attribute context: The template code generator cannot guarantee HTML-safety of the template -- please inspect manually or use SafeStyles to specify arguments in a CSS attribute context
                     [WARN] Template with variable in CSS attribute context: The template code generator cannot guarantee HTML-safety of the template -- please inspect manually or use SafeStyles to specify arguments in a CSS attribute context
                  Generating method body for iconWrapper()
                     [WARN] Template with variable in CSS attribute context: The template code generator cannot guarantee HTML-safety of the template -- please inspect manually or use SafeStyles to specify arguments in a CSS attribute context
                     [WARN] Template with variable in CSS attribute context: The template code generator cannot guarantee HTML-safety of the template -- please inspect manually or use SafeStyles to specify arguments in a CSS attribute context
   Scanning for additional dependencies: file:/C:/Dev/src/job-mood/src/main/java/com/recruitmentlink/client/ui/widget/PlaceholderHelpPanel.java
      Computing all possible rebind results for 'com.recruitmentlink.client.ui.widget.PlaceholderHelpPanel.MyBinder'
         Rebinding com.recruitmentlink.client.ui.widget.PlaceholderHelpPanel.MyBinder
            Invoking generator com.google.gwt.uibinder.rebind.GinUiBinderGenerator
               [WARN] Configuration property UiBinder.useLazyWidgetBuilders is false. Deprecated code generation is in play. This property will soon become a no-op.
               [ERROR] The configuration property 'gin.ginjector' is 'com.gwtplatform.mvp.client.ClientGinjector'  which doesn't identify a type inheriting from 'Ginjector'.
   [ERROR] Errors in 'file:/C:/Dev/src/job-mood/src/main/java/com/recruitmentlink/client/ui/widget/PlaceholderHelpPanel.java'
      [ERROR] Line 74:  Failed to resolve 'com.recruitmentlink.client.ui.widget.PlaceholderHelpPanel.MyBinder' via deferred binding
   Scanning for additional dependencies: file:/C:/Dev/src/job-mood/src/main/java/com/recruitmentlink/client/ui/widget/ContextualRadioButton.java
      Computing all possible rebind results for 'com.recruitmentlink.client.ui.widget.ContextualRadioButton.ContextualRadioButtonBinder'
         Rebinding com.recruitmentlink.client.ui.widget.ContextualRadioButton.ContextualRadioButtonBinder
            Invoking generator com.google.gwt.uibinder.rebind.GinUiBinderGenerator
               [ERROR] The configuration property 'gin.ginjector' is 'com.gwtplatform.mvp.client.ClientGinjector'  which doesn't identify a type inheriting from 'Ginjector'.
   [ERROR] Errors in 'file:/C:/Dev/src/job-mood/src/main/java/com/recruitmentlink/client/ui/widget/ContextualRadioButton.java'
      [ERROR] Line 49:  Failed to resolve 'com.recruitmentlink.client.ui.widget.ContextualRadioButton.ContextualRadioButtonBinder' via deferred binding
   Scanning for additional dependencies: file:/C:/Dev/src/job-mood/src/main/java/com/recruitmentlink/client/ui/widget/EngagementStatusLabel.java
      [WARN] For the following type(s), generated source was never committed (did you forget to call commit()?)
         [WARN] com.recruitmentlink.client.ui.widget.ContextualRadioButton_ContextualRadioButtonBinderImpl
         [WARN] com.recruitmentlink.client.ui.widget.PlaceholderHelpPanel_MyBinderImpl

Cheers
Ben

Christian Goudreau

unread,
Jan 13, 2013, 4:29:11 PM1/13/13
to gwt-pl...@googlegroups.com
You don't have to reimplement your simple composites. I actually do that really often.

GinUiBinder brakes every time GWT versions changes, it's not up to date and you shouldn't use it. It was an experimental feature which lack true support from both GWT and GIN. As long as we're not supporting this feature officially, please try not using it for productions app.

You should simply add @UiField(provided = true) and inject the component in your view CTOR and you should be back in business.


--
 
 



--
Christian Goudreau

Christian Goudreau

unread,
Jan 13, 2013, 4:29:55 PM1/13/13
to gwt-pl...@googlegroups.com
AND remove the usage of GinUiBinder
--
Christian Goudreau
Reply all
Reply to author
Forward
0 new messages