GWT 2.2 version of gin

105 views
Skip to first unread message

Sydney

unread,
Feb 12, 2011, 2:46:55 PM2/12/11
to gwt-pl...@googlegroups.com
I upgraded my eclipse plugin but made the mistake to remove GWT 2.1.1, so now I have to use GWT 2.2. The problem is that the version r137 of gin is not compatible with GWT 2.2. I found in the GWT groups, some link to snapshot of gin but it doesn't work.

[ERROR] [portfolio] - Generator 'com.google.gwt.inject.rebind.GinjectorGenerator' threw an exception while rebinding 'com.portfolio.client.MyGinjector'

I was wondering if I am missing a jar, and what version of gin you ended up using.

Christian Goudreau

unread,
Feb 12, 2011, 2:48:14 PM2/12/11
to gwt-pl...@googlegroups.com
I didn't try Gwt 2.2 yet, I'll have a look when I get back home.
 
Cheers,

--
Christian Goudreau

Christian Goudreau

unread,
Feb 12, 2011, 6:44:58 PM2/12/11
to gwt-pl...@googlegroups.com
Gwt 2.2 isn't compatible with Gwtp 0.5, yet.

I don't know why but they seem to have changed things with Gwt.Create() that mess the creation of our proxy classes.

We will have to investigate. For an older version of GWT:

Cheers,
--
Christian Goudreau

anton_evane

unread,
Feb 13, 2011, 2:28:06 AM2/13/11
to gwt-pl...@googlegroups.com
Good day, Christian

 I upgraded my application to GWT 2.2.0, and upgrade gin to trunk revision. My problem is to occure when I start GWT compile.

GWTP version 0.5

 StackTrace: is 
 ERROR] Internal compiler error
java.lang.IncompatibleClassChangeError: Found interface com.google.gwt.core.ext.typeinfo.JClassType, but class was expected
	at com.gwtplatform.mvp.rebind.ProxyGenerator.findBaseTypes(ProxyGenerator.java:834)
	at com.gwtplatform.mvp.rebind.ProxyGenerator.generate(ProxyGenerator.java:166)
	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:662)
	at com.google.gwt.dev.cfg.RuleGenerateWith.realize(RuleGenerateWith.java:41)
	at com.google.gwt.dev.shell.StandardRebindOracle$Rebinder.rebind(StandardRebindOracle.java:74)
	at com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:259)
	at com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:248)
	at com.google.gwt.dev.DistillerRebindPermutationOracle.getAllPossibleRebindAnswers(DistillerRebindPermutationOracle.java:91)
	at com.google.gwt.dev.jdt.WebModeCompilerFrontEnd.doFindAdditionalTypesUsingRebinds(WebModeCompilerFrontEnd.java:106)
	at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox$CompilerImpl.process(AbstractCompiler.java:254)
	at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:444)
	at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox$CompilerImpl.compile(AbstractCompiler.java:175)
	at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox$CompilerImpl.compile(AbstractCompiler.java:288)
	at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox$CompilerImpl.access$400(AbstractCompiler.java:145)
	at com.google.gwt.dev.jdt.AbstractCompiler.compile(AbstractCompiler.java:632)
	at com.google.gwt.dev.jdt.BasicWebModeCompiler.getCompilationUnitDeclarations(BasicWebModeCompiler.java:124)
	at com.google.gwt.dev.jdt.WebModeCompilerFrontEnd.getCompilationUnitDeclarations(WebModeCompilerFrontEnd.java:54)
	at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.precompile(JavaToJavaScriptCompiler.java:517)
	at com.google.gwt.dev.jjs.JavaScriptCompiler.precompile(JavaScriptCompiler.java:35)
	at com.google.gwt.dev.Precompile.precompile(Precompile.java:541)
	at com.google.gwt.dev.Precompile.precompile(Precompile.java:495)
	at com.google.gwt.dev.Precompile.precompile(Precompile.java:407)
	at com.google.gwt.dev.Compiler.run(Compiler.java:215)
	at com.google.gwt.dev.Compiler.run(Compiler.java:187)
	at com.google.gwt.dev.Compiler$1.run(Compiler.java:159)
	at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:87)
	at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:81)
	at com.google.gwt.dev.Compiler.main(Compiler.java:166)

[ERROR] Unexpected
java.lang.IncompatibleClassChangeError: Found interface com.google.gwt.core.ext.typeinfo.JClassType, but class was expected
	at com.gwtplatform.mvp.rebind.ProxyGenerator.findBaseTypes(ProxyGenerator.java:834)
	at com.gwtplatform.mvp.rebind.ProxyGenerator.generate(ProxyGenerator.java:166)
	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:662)
	at com.google.gwt.dev.cfg.RuleGenerateWith.realize(RuleGenerateWith.java:41)
	at com.google.gwt.dev.shell.StandardRebindOracle$Rebinder.rebind(StandardRebindOracle.java:74)
	at com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:259)
	at com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:248)
	at com.google.gwt.dev.DistillerRebindPermutationOracle.getAllPossibleRebindAnswers(DistillerRebindPermutationOracle.java:91)
	at com.google.gwt.dev.jdt.WebModeCompilerFrontEnd.doFindAdditionalTypesUsingRebinds(WebModeCompilerFrontEnd.java:106)
	at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox$CompilerImpl.process(AbstractCompiler.java:254)
	at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:444)
	at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox$CompilerImpl.compile(AbstractCompiler.java:175)
	at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox$CompilerImpl.compile(AbstractCompiler.java:288)
	at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox$CompilerImpl.access$400(AbstractCompiler.java:145)
	at com.google.gwt.dev.jdt.AbstractCompiler.compile(AbstractCompiler.java:632)
	at com.google.gwt.dev.jdt.BasicWebModeCompiler.getCompilationUnitDeclarations(BasicWebModeCompiler.java:124)
	at com.google.gwt.dev.jdt.WebModeCompilerFrontEnd.getCompilationUnitDeclarations(WebModeCompilerFrontEnd.java:54)
	at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.precompile(JavaToJavaScriptCompiler.java:517)
	at com.google.gwt.dev.jjs.JavaScriptCompiler.precompile(JavaScriptCompiler.java:35)
	at com.google.gwt.dev.Precompile.precompile(Precompile.java:541)
	at com.google.gwt.dev.Precompile.precompile(Precompile.java:495)
	at com.google.gwt.dev.Precompile.precompile(Precompile.java:407)
	at com.google.gwt.dev.Compiler.run(Compiler.java:215)
	at com.google.gwt.dev.Compiler.run(Compiler.java:187)
	at com.google.gwt.dev.Compiler$1.run(Compiler.java:159)
	at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:87)
	at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:81)
	at com.google.gwt.dev.Compiler.main(Compiler.java:166)

Christian Goudreau

unread,
Feb 14, 2011, 10:52:17 AM2/14/11
to gwt-pl...@googlegroups.com
I just read something interesting on another library where the only thing they had to do to remove that error is to rebuild the library with Gwt 2.2 as a dependency.

Cheers,
--
Christian Goudreau

Christian Goudreau

unread,
Feb 14, 2011, 11:22:48 AM2/14/11
to gwt-pl...@googlegroups.com
Here's a more complete explanation from @Tomas Boyer:

GWT 2.2 introduces a binary incompatibility in generators (some classes have been replaced with interfaces), hence the error with GIN (though honestly, it should have been another error thatn the one you pasted here)
It is still source compatible with the previous versions though, so recompiling the generators (GIN in this case) is enough. 
Technically, you don't have to upgrade GIN to a 1.1-SNAPSHOT version if you don't want to, but you then have to recompile it against the GWT 2.2 SDK.
I'm not aware of any "GIN 1.0 recompiled for GWT 2.2" available for download though, so given that GIN 1.1 is compatible with GIN 1.0 (unless you're doing "hardcore" things with it), you can safely use a GIN 1.1-SNAPSHOT if you don't want to recompile GIN by yourself.
Cheers,
--
Christian Goudreau

Thomas Broyer

unread,
Feb 14, 2011, 12:33:27 PM2/14/11
to gwt-pl...@googlegroups.com
Except that I was wrong: GIN uses GWT internals (including those modified classes), so it's not source compatible with "any version" of GWT.

michal poreba

unread,
Feb 18, 2011, 7:08:46 AM2/18/11
to GWTP
I have upgraded the libraries to GWT 2.2, GWTP 0.6 SNAPSHOT, gin-1.0-
r170 and guice 3.0 rc2 to resolve to problem described in this
thread.
Most of the problems have gone but still there is little one lest. It
looks like the generated *MyGinjectorImpl.java is missing methods
returning PresenterWidget providers.


Compiling module com.hermes.shell.Hermes
Scanning for additional dependencies: file:/F:/Dev/Hermes/hermes/
src/com/hermes/shell/client/Hermes.java
Adding '1' new generated units
Validating newly compiled units
[ERROR] Errors in 'generated://
C476538545C2F1C2DF76C4F70605E289/com/hermes/shell/client/config/
com_hermes_shell_client_config_MyGinjectorImpl.java'
[ERROR] Line 5: The type
com_hermes_shell_client_config_MyGinjectorImpl must implement the
inherited abstract method MyGinjector.getSessionPresenter()
[ERROR] Line 5: The type
com_hermes_shell_client_config_MyGinjectorImpl must implement the
inherited abstract method MyGinjector.getVerticalMenuPresenter()
[ERROR] Line 5: The type
com_hermes_shell_client_config_MyGinjectorImpl must implement the
inherited abstract method MyGinjector.getHorizontalMenuPresenter()
See snapshot: C:\Users\Michal\AppData\Local\Temp
\com.hermes.shell.client.config.com_hermes_shell_client_config_MyGinjectorImpl7239093047234286259.java
[ERROR] Errors in 'generated://C476538545C2F1C2DF76C4F70605E289/com/
hermes/shell/client/config/
com_hermes_shell_client_config_MyGinjectorImpl.java'
[ERROR] Line 5: The type
com_hermes_shell_client_config_MyGinjectorImpl must implement the
inherited abstract method MyGinjector.getSessionPresenter()
[ERROR] Line 5: The type
com_hermes_shell_client_config_MyGinjectorImpl must implement the
inherited abstract method MyGinjector.getHorizontalMenuPresenter()
[ERROR] Line 5: The type
com_hermes_shell_client_config_MyGinjectorImpl must implement the
inherited abstract method MyGinjector.getVerticalMenuPresenter()
[ERROR] Line 401: Rebind result
'com.hermes.shell.client.widget.menu.VerticalMenuPresenterWidget.MyView'
must be a class
[ERROR] Line 691: Rebind result
'com.hermes.shell.client.widget.session.SessionPresenterWidget.MyView'
must be a class
[ERROR] Cannot proceed due to previous errors

in MyGininjector I have

Provider<VerticalMenuPresenterWidget> getVerticalMenuPresenter();
Provider<HorizontalMenuPresenterWidget>
getHorizontalMenuPresenter();
Provider<SessionPresenterWidget> getSessionPresenter();

and in MyModule

bindSingletonPresenterWidget(SessionPresenterWidget.class,
SessionPresenterWidget.MyView.class, SessionView.class);
bindPresenterWidget(VerticalMenuPresenterWidget.class,
VerticalMenuPresenterWidget.MyView.class, VerticalMenuView.class);
bindPresenterWidget(HorizontalMenuPresenterWidget.class,
HorizontalMenuPresenterWidget.MyView.class, HorizontalMenuView.class);

Any thoughts on that?

Thanks in advance
Michal

Michał Poręba

unread,
Feb 18, 2011, 7:48:46 AM2/18/11
to gwt-pl...@googlegroups.com
Ok, I have solved it. 

I have forget to change reference to the new gwtp-all in Java Compiler -> Annotation Processing -> Factory Path. As result of that the path was pointing to the old file which has been removed.

Strangely the compiler didn't complain about any other generated types. Usually when I was changing versions the IDE was first to complain about Action and Result classes generated by @GenDispatch

Well... here we go. 

Fille

unread,
Feb 21, 2011, 1:08:55 PM2/21/11
to GWTP
Hello

I having problems with updating to gwt 2.2.

I have downloaded and referenced:
gin-1.0-r170.jar
guice-3.0-rc2.jar
guice-servlet-3.0-rc2.jar
gwtp-all-0.6-20110217.132630-1.jar

also dereferenced the old libraries, for guice, gin and gwpt.

When i try to compile my project i get the following:

Resolving javax.inject.Named
Found type 'javax.inject.Named'
[WARN] Ignoring unresolvable annotation type
javax.inject.Qualifier
Resolving javax.inject.Singleton
Found type 'javax.inject.Singleton'
[WARN] Ignoring unresolvable annotation type
javax.inject.Scope

java.lang.NoClassDefFoundError: javax/inject/Provider
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(Unknown Source)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$000(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
.
.
Caused by: java.lang.ClassNotFoundException: javax.inject.Provider
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
.
.


When i try to Run the project i get:

19:05:26.873 [ERROR] [rem] Failed to create an instance of
'com.myapp.client.Rem' via deferred binding
java.lang.RuntimeException: Deferred binding failed for
'com.myapp.client.gin.MyGinjector' (did you forget to inherit a
required module?)
at
com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:53)
at com.google.gwt.core.client.GWT.create(GWT.java:98)
at com.myapp.client.Rem.<init>(Rem.java:13)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown
Source)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown
Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at
com.google.gwt.dev.shell.ModuleSpace.rebindAndCreate(ModuleSpace.java:
465)
at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:
375)
.
.

Any idéa or solution to this promlem ?

Regards

/Filip

Dominik Mayer

unread,
Feb 21, 2011, 1:10:48 PM2/21/11
to gwt-pl...@googlegroups.com
You also need:

guice-assistedinject-3.0-rc2.jar
javax.inject.jar
aopalliance.jar

Fille

unread,
Feb 21, 2011, 1:47:26 PM2/21/11
to GWTP
Thanks!

I'll try that.

Regards
Filip
Reply all
Reply to author
Forward
0 new messages