Errai 4 - The constructor of ClassName annotated with @Inject must be public
acramatte Jan 9, 2017 5:38 PMHi,
We are in the process of updating one of our application from Errai version 3.2.0.Final to Errai 4.0.0.Beta4.
But when trying to build our GWT app, the following error pops up:
... [INFO] --- gwt-maven-plugin:2.8.0:compile (default) @ something --- [INFO] Compiling module foo.bar.Something-integration [INFO] Ignored 34 units with compilation errors in first pass. [INFO] Compile with -strict or with -logLevel set to TRACE or DEBUG to see all errors. [ERROR] SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". [ERROR] SLF4J: Defaulting to no-operation (NOP) logger implementation [ERROR] SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. [INFO] Computing all possible rebind results for 'org.jboss.errai.marshalling.client.api.MarshallerFactory' [INFO] Rebinding org.jboss.errai.marshalling.client.api.MarshallerFactory [INFO] Invoking generator org.jboss.errai.marshalling.rebind.MarshallersGenerator [INFO] Generating Marshallers Bootstrapper... [INFO] Checking ErraiApp.properties for configured types ... [INFO] Rebinding org.jboss.errai.marshalling.client.api.MarshallerFactory [INFO] Invoking generator org.jboss.errai.marshalling.rebind.MarshallersGenerator [INFO] Generating Marshallers Bootstrapper... [INFO] Rebinding org.jboss.errai.marshalling.client.api.MarshallerFactory [INFO] Invoking generator org.jboss.errai.marshalling.rebind.MarshallersGenerator [INFO] Generating Marshallers Bootstrapper... [INFO] Rebinding org.jboss.errai.marshalling.client.api.MarshallerFactory [INFO] Invoking generator org.jboss.errai.marshalling.rebind.MarshallersGenerator [INFO] Generating Marshallers Bootstrapper... [INFO] Rebinding org.jboss.errai.marshalling.client.api.MarshallerFactory [INFO] Invoking generator org.jboss.errai.marshalling.rebind.MarshallersGenerator [INFO] Generating Marshallers Bootstrapper... [INFO] Rebinding org.jboss.errai.marshalling.client.api.MarshallerFactory [INFO] Invoking generator org.jboss.errai.marshalling.rebind.MarshallersGenerator [INFO] Generating Marshallers Bootstrapper... [INFO] Rebinding org.jboss.errai.marshalling.client.api.MarshallerFactory [INFO] Invoking generator org.jboss.errai.marshalling.rebind.MarshallersGenerator [INFO] Generating Marshallers Bootstrapper... [INFO] Rebinding org.jboss.errai.marshalling.client.api.MarshallerFactory [INFO] Invoking generator org.jboss.errai.marshalling.rebind.MarshallersGenerator [INFO] Generating Marshallers Bootstrapper... [INFO] Rebinding org.jboss.errai.marshalling.client.api.MarshallerFactory [INFO] Invoking generator org.jboss.errai.marshalling.rebind.MarshallersGenerator [INFO] Generating Marshallers Bootstrapper... [INFO] Rebinding org.jboss.errai.marshalling.client.api.MarshallerFactory [INFO] Invoking generator org.jboss.errai.marshalling.rebind.MarshallersGenerator [INFO] Generating Marshallers Bootstrapper... [INFO] Computing all possible rebind results for 'org.jboss.errai.ioc.client.container.IOCEnvironment' [INFO] Rebinding org.jboss.errai.ioc.client.container.IOCEnvironment [INFO] Invoking generator org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCEnvironmentGenerator [INFO] Generating Extensions Bootstrapper... [INFO] Rebinding org.jboss.errai.ioc.client.container.IOCEnvironment [INFO] Invoking generator org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCEnvironmentGenerator [INFO] Generating Extensions Bootstrapper... [INFO] Rebinding org.jboss.errai.ioc.client.container.IOCEnvironment [INFO] Invoking generator org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCEnvironmentGenerator [INFO] Generating Extensions Bootstrapper... [INFO] Rebinding org.jboss.errai.ioc.client.container.IOCEnvironment [INFO] Invoking generator org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCEnvironmentGenerator [INFO] Generating Extensions Bootstrapper... [INFO] Rebinding org.jboss.errai.ioc.client.container.IOCEnvironment [INFO] Invoking generator org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCEnvironmentGenerator [INFO] Generating Extensions Bootstrapper... [INFO] Rebinding org.jboss.errai.ioc.client.container.IOCEnvironment [INFO] Invoking generator org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCEnvironmentGenerator [INFO] Generating Extensions Bootstrapper... [INFO] Rebinding org.jboss.errai.ioc.client.container.IOCEnvironment [INFO] Invoking generator org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCEnvironmentGenerator [INFO] Generating Extensions Bootstrapper... [INFO] Rebinding org.jboss.errai.ioc.client.container.IOCEnvironment [INFO] Invoking generator org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCEnvironmentGenerator [INFO] Generating Extensions Bootstrapper... [INFO] Rebinding org.jboss.errai.ioc.client.container.IOCEnvironment [INFO] Invoking generator org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCEnvironmentGenerator [INFO] Generating Extensions Bootstrapper... [INFO] Rebinding org.jboss.errai.ioc.client.container.IOCEnvironment [INFO] Invoking generator org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCEnvironmentGenerator [INFO] Generating Extensions Bootstrapper... [INFO] Computing all possible rebind results for 'org.jboss.errai.ioc.client.Bootstrapper' [INFO] Rebinding org.jboss.errai.ioc.client.Bootstrapper [INFO] Invoking generator org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCGenerator [INFO] generating ioc bootstrapping code... [ERROR] java.util.concurrent.ExecutionException: java.lang.RuntimeException: The following problems were found: [ERROR] The constructor of com.gwtplatform.mvp.shared.proxy.RouteTokenFormatter annotated with @Inject must be public. [ERROR] The class com.gwtplatform.mvp.client.AutobindDisable must be proxiable but has no injectable constructor or no-argument constructor accessible to subclasses. [ERROR] The constructor of com.gwtplatform.mvp.client.googleanalytics.GoogleAnalyticsNavigationTracker annotated with @Inject must be public. [ERROR] [ERROR] at java.util.concurrent.FutureTask.report(FutureTask.java:122) [ERROR] at java.util.concurrent.FutureTask.get(FutureTask.java:192) [ERROR] at org.jboss.errai.config.rebind.AsyncGenerators$FutureWrapper.get(AsyncGenerators.java:112) [ERROR] at org.jboss.errai.config.rebind.AsyncGenerators$FutureWrapper.get(AsyncGenerators.java:86) [ERROR] at org.jboss.errai.config.rebind.AbstractAsyncGenerator.startAsyncGeneratorsAndWaitFor(AbstractAsyncGenerator.java:205) [ERROR] at org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCGenerator.generate(IOCGenerator.java:62) ...
The constructor of com.gwtplatform.mvp.shared.proxy.RouteTokenFormatter is indeed not public but this comes from a third-party library.
Any idea what could be wrong here ? I couldn't find anything in the change logs that was related to the scanning of annotation. Do we have to exclude some resources ?
Dependencies versions:
GWT: 2.8.0
GWTP: 1.5.3
Errai: 4.0.0.Beta4
Thanks for your help.
Alexis