GIN binding issues in a GWTP application

each! I have a compilation problem in my GWT application, which is divided into 3 modules: Application core: contains main classes without an entry point, App-A and App-B: inherit from App-core and contain certain classes with an entry point in each submodule .

I use GIN to inject class instances into each module:

in the core of the application:

public interface App-coreGinjector extends Ginjector { EventBus getEventBus(); Provider<LoginPagePresenter> getLoginPagePresenter(); ... } App-coreModule extends AbstractPresenterModule { protected void configureCore() { install(new DefaultModule(App-corePlaceManager.class)); bindConstant().annotatedWith(DefaultPlace.class).to(LoginPagePresenter.NAME_TOKEN); ... bind(AuthenticationManager.class).to(AuthenticationManagerImpl.class); bindPresenter(LoginPagePresenter.class, LoginPagePresenter.MyView.class, LoginPageView.class, LoginPagePresenter.MyProxy.class); } 

in application -A:

 @GinModules({ App-AModule.class }) public interface App-AGinjector extends App-coreGinjector { MyApp-AScreen getMyApp-AScreen(); ... } public class App-AModule extends App-coreModule { @Override protected void configure() { configureCore(); ... //Here we bind the App-A classes inheriting from App-core classes bind(App-coreScreenManager.class).to(App-AcreenManager.class).in(Singleton.class); ... //Here we bind the specific App=A classes } 

And we do the same in App-B

The maven compilation is successful for App-A, but for App-B it does not work:

 [ERROR] Errors in 'C:\workspace\App-core\client\gin\App-coreGinjectorImpl.java' [ERROR] Line 790: Rebind result 'com.gwtplatform.mvp.client.proxy.PlaceManager' must be a class [ERROR] Line 818: Rebind result 'lu.sfeir.grh.client.authentication.AuthenticationManager' must be a class [ERROR] Line 1047: Rebind result 'lu.sfeir.grh.client.login.LoginPagePresenter.MyView' must be a class [ERROR] Line 2359: Rebind result 'com.google.gwt.event.shared.EventBus' cannot be abstract [ERROR] Cannot proceed due to previous errors 

So, the strange part of all this is that this error comes from a common module between these two submodules, because this is a binding of LoginPagePresenter and AuthentificationManager, but we have this compilation error in only one additional module. So, if someone had this king of problems, I am waiting for his precious help ^^

Oh! if you want some clarification feel free !!

+4
source share
1 answer

In GWTP 0.7 and all instances of EventBus changed from

  com.google.gwt.event.shared.EventBus; to com.google.web.bindery.event.shared.EventBus 

If you are using GWTP 0.6, you need to change them back ...

+2
source

Source: https://habr.com/ru/post/1403462/


All Articles