Search code examples
gwtgwt-gingwt-platform

GWT application runs in dev mode but fails to compile


My GWT app works in development mode but when I compile I get this error:

[ERROR] Errors in generated://F1C9BA113391FC353E7321372D77396D/com/mygwtapp/client/gin/ClientGinjectorImpl.java'
[ERROR] Line 64:  Rebind result 'com.mygwtapp.client.core.presenter.ResponsePresenter.MyView' must be a class
[ERROR] Line 2319:  Rebind result 'com.mygwtapp.client.core.presenter.MainPagePresenter.MyView' must be a class
[ERROR] Cannot proceed due to previous errors

I am using GWT 2.4.0 and GwtPlatform.


Solution

  • This suggests that you have MainPagePresenter.MyView and ResponsePresenter.MyView injected, but not bound to concrete types. The fact that it is working in dev mode (and I'm assuming that you only have one module) but not compiling suggests that the ginjector is finding injection sites that you aren't bumping into when running dev mode.

    Make sure both of those are bound in your ginjector (or you have replace-with rules defined for them), or remove references to them.

    (If that is all worked up right, consider posting some code, like your ginjector interface, perhaps the generated code, your module, etc)