google-code-export / mvp4g

Automatically exported from code.google.com/p/mvp4g
1 stars 0 forks source link

Could not work with google-gin 2.0 #120

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Could not work with google-gin 2.0

Original issue reported on code.google.com by zsum...@gmail.com on 4 Sep 2012 at 7:02

GoogleCodeExporter commented 9 years ago
What error do you have? What version of Mvp4g/GWT are you using?

Original comment by plcoir...@gmail.com on 4 Sep 2012 at 2:29

GoogleCodeExporter commented 9 years ago
I tried Mvp4gModules example with GIN 2.0 and I could compile it and run it. I 
had to change all the jars (gin, guice, guice-assisted). However I get the 
following error message when I compile:

[ERROR] Failure in unit cache map load.
java.util.concurrent.ExecutionException: java.lang.RuntimeException: Unable to 
read from byte cache
    at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222)
=> not sure if it's actually related to gin and it's my machine

and this warning when I compile and start the debug mode:
[WARN] Class 
com.mvp4g.example.client.product.ProductModuleImpl.com_mvp4g_example_client_prod
uct_ProductModuleGinjector is used in Gin, but not available in GWT client code.

However they don't seem to have any consequence because the code compiles and 
runs normally.

Original comment by plcoir...@gmail.com on 4 Sep 2012 at 11:03

GoogleCodeExporter commented 9 years ago
I used 1.4 and only replace all the gin guice jar,but compile false.

Except a new 1.5 snapshot.

Original comment by zsum...@gmail.com on 5 Sep 2012 at 10:27

GoogleCodeExporter commented 9 years ago
What error do you have?

Original comment by plcoir...@gmail.com on 6 Sep 2012 at 1:54

GoogleCodeExporter commented 9 years ago
00:01:00.287 [ERROR] Unable to load module entry point class 
ssmo.platform.fact.client.Fact (see associated exception for details)
java.lang.RuntimeException: Deferred binding failed for 
'com.mvp4g.client.Mvp4gModuleImpl$com_mvp4g_client_Mvp4gModuleGinjector' (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.mvp4g.client.Mvp4gModuleImpl.createAndStartModule(Mvp4gModuleImpl.java:84) 
    at ssmo.platform.fact.client.Fact.onModuleLoad(Fact.java:17)    at 
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 
    at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
a:25)   at java.lang.reflect.Method.invoke(Method.java:597)     at 
com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:405)   at 
com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java
:200)   at 
com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelSe
rver.java:526)  at 
com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
    at java.lang.Thread.run(Thread.java:662) Caused by: 
java.lang.NoSuchMethodError: 
com.google.gwt.inject.client.GinModules.properties()[Ljava/lang/String;     at 
com.google.gwt.inject.rebind.GinjectorGenerator.getPropertyNamesFromInjectorInte
rface(GinjectorGenerator.java:185)  at 
com.google.gwt.inject.rebind.GinjectorGenerator.getPropertyModuleNames(Ginjector
Generator.java:155)     at 
com.google.gwt.inject.rebind.GinjectorGenerator.getPropertyModuleClasses(Ginject
orGenerator.java:131)   at 
com.google.gwt.inject.rebind.GinjectorGenerator.getModuleClasses(GinjectorGenera
tor.java:116)   at 
com.google.gwt.inject.rebind.GinjectorGenerator.generate(GinjectorGenerator.java
:72)    at 
com.google.gwt.core.ext.IncrementalGenerator.generateNonIncrementally(Incrementa
lGenerator.java:40)     at 
com.google.gwt.dev.javac.StandardGeneratorContext.runGeneratorIncrementally(Stan
dardGeneratorContext.java:657)  at 
com.google.gwt.dev.cfg.RuleGenerateWith.realize(RuleGenerateWith.java:41)   at 
com.google.gwt.dev.shell.StandardRebindOracle$Rebinder.rebind(StandardRebindOrac
le.java:79)     at 
com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:2
76)     at 
com.google.gwt.dev.shell.ShellModuleSpaceHost.rebind(ShellModuleSpaceHost.java:1
41)     at com.google.gwt.dev.shell.ModuleSpace.rebind(ModuleSpace.java:594)    at 
com.google.gwt.dev.shell.ModuleSpace.rebindAndCreate(ModuleSpace.java:464)  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.mvp4g.client.Mvp4gModuleImpl.createAndStartModule(Mvp4gModuleImpl.java:84) 
    at ssmo.platform.fact.client.Fact.onModuleLoad(Fact.java:17)    at 
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 
    at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
a:25)   at java.lang.reflect.Method.invoke(Method.java:597)     at 
com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:405)   at 
com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java
:200)   at 
com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelSe
rver.java:526)  at 
com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
    at java.lang.Thread.run(Thread.java:662)

Original comment by zsum...@gmail.com on 1 Oct 2012 at 9:39

GoogleCodeExporter commented 9 years ago
java.lang.NoSuchMethodError: 
com.google.gwt.inject.client.GinModules.properties()[Ljava/lang/String;

Original comment by zsum...@gmail.com on 1 Oct 2012 at 9:57

GoogleCodeExporter commented 9 years ago
Do you have multiple version of GIN in your classpath? It seems an old version 
of GinModules is being called here. properties method has been added in GIN 2.0

Are you using maven to build your project?

Original comment by plcoir...@gmail.com on 2 Oct 2012 at 2:44

GoogleCodeExporter commented 9 years ago
I use maven.

Original comment by zsum...@gmail.com on 8 Oct 2012 at 1:16

GoogleCodeExporter commented 9 years ago
I found that there are com\google\gwt\inject\client\GinModules.class
in mvp4g jar file.

Original comment by zsum...@gmail.com on 8 Oct 2012 at 4:30

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I build mvp4g from source with (gwt 2.4  gin 2.0) and skip test,it work now.

Original comment by zsum...@gmail.com on 8 Oct 2012 at 8:30

GoogleCodeExporter commented 9 years ago
Hi I got the same problem.

I use maven project, and my code works if I use google gin v1.5.0.
But when I refresh it to v2.0.0 ,and I would like to run/compile I got an 
exception.

Maven dependency:
<dependency>
    <groupId>com.googlecode.mvp4g</groupId>
    <artifactId>mvp4g</artifactId>
    <version>1.4.0</version>
    <exclusions>
        <exclusion>
            <groupId>com.google.gwt.inject</groupId>
            <artifactId>gin</artifactId>
        </exclusion>
    </exclusions>
</dependency>
<dependency>
    <groupId>com.google.gwt.inject</groupId>
    <artifactId>gin</artifactId>
    <version>2.0.0</version>
</dependency>

Exception what I got:

java.lang.RuntimeException: Deferred binding failed for 
'com.mvp4g.client.Mvp4gModuleImpl$com_mvp4g_client_Mvp4gModuleGinjector' (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.mvp4g.client.Mvp4gModuleImpl.createAndStartModule(Mvp4gModuleImpl.java:91)
    at hu.enwebem.client.gwt.HomePage.onModuleLoad(HomePage.java:14)
    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:405)
    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:662)
Caused by: java.lang.NoSuchMethodError: 
com.google.gwt.inject.client.GinModules.properties()[Ljava/lang/String;
    at com.google.gwt.inject.rebind.GinjectorGenerator.getPropertyNamesFromInjectorInterface(GinjectorGenerator.java:185)
    at com.google.gwt.inject.rebind.GinjectorGenerator.getPropertyModuleNames(GinjectorGenerator.java:155)
    at com.google.gwt.inject.rebind.GinjectorGenerator.getPropertyModuleClasses(GinjectorGenerator.java:131)
    at com.google.gwt.inject.rebind.GinjectorGenerator.getModuleClasses(GinjectorGenerator.java:116)
    at com.google.gwt.inject.rebind.GinjectorGenerator.generate(GinjectorGenerator.java:72)
    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:594)
    at com.google.gwt.dev.shell.ModuleSpace.rebindAndCreate(ModuleSpace.java:464)
    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.mvp4g.client.Mvp4gModuleImpl.createAndStartModule(Mvp4gModuleImpl.java:91)
    at hu.enwebem.client.gwt.HomePage.onModuleLoad(HomePage.java:14)
    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:405)
    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:662)

Original comment by barna...@szabobarnabas.hu on 15 Oct 2012 at 7:05

GoogleCodeExporter commented 9 years ago
I think the issue is that mvp4g-1.4.0 depends on GIN-1.5.0 and both jar are 
imported in the project. I'm not an expert with maven but is there a way to 
override the mvp4g dependency so that only GIN-2.0.0 is used?

Original comment by plcoir...@gmail.com on 15 Oct 2012 at 10:35

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I found that  mvp4g-1.4.0 jar file contain GIN-1.5.0 class files in maven repo,
but the download jar file in google does not contain, I think the mvp4g pom 
file contain some issue.

Original comment by zsum...@gmail.com on 16 Oct 2012 at 7:09

GoogleCodeExporter commented 9 years ago
I found the problem:change pom file plugin maven-compiler-plugin version from 
2.0.2 to 2.5.1, that is ok.

Original comment by zsum...@gmail.com on 16 Oct 2012 at 12:11

GoogleCodeExporter commented 9 years ago
Sorry, but I already use 2.5.1 version of the maven-compiler-plugin, and still 
not working :(

Original comment by barna...@szabobarnabas.hu on 17 Oct 2012 at 12:19

GoogleCodeExporter commented 9 years ago
Does you recompile mvp4g from source?

Original comment by zsum...@gmail.com on 18 Oct 2012 at 8:54

GoogleCodeExporter commented 9 years ago
no I am not recompile

Original comment by barna...@szabobarnabas.hu on 18 Oct 2012 at 10:12

GoogleCodeExporter commented 9 years ago
I can reproduce the issue if I run the example with maven. To fix it, I had to 
change change mvp4g dependency to gin-2.0.0, rebuild mvp4g and everything was 
fine. 

I wanted to upload a new snapshot so that you could try it too but for some 
reason, I can't deploy it.

For now, you can change the dependency, recompile mvp4g and it should work. 
I'll let you know if I find a way to deploy the new snapshot.

Original comment by plcoir...@gmail.com on 18 Oct 2012 at 3:23

GoogleCodeExporter commented 9 years ago
Should have closed this bug earlier but the 1.5.0-SNAPSHOT has been uploaded 
with the right maven config.

Original comment by plcoir...@gmail.com on 6 Sep 2013 at 4:36