hugoloza / gwt-mobile-webkit

Automatically exported from code.google.com/p/gwt-mobile-webkit
2 stars 0 forks source link

GWT 2.2 and gwt-html5-database incompatiblity #33

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Compiling a project that uses GWT 2.2 and gwt-html5-database, the following 
error is thrown.

[ERROR]  Internal compiler error
java.lang.IncompatibleClassChangeError: Found interface
com.google.gwt.core.ext.typeinfo.JClassType, but class was expected
       at com.google.code.gwt.database.rebind.DataServiceGenerator.generate(DataServiceGenerator.java:71)

Shawn

Original issue reported on code.google.com by big.coffee.lover@gmail.com on 3 Apr 2011 at 10:57

GoogleCodeExporter commented 9 years ago

Original comment by bguijt on 6 Apr 2011 at 12:03

GoogleCodeExporter commented 9 years ago
Thanks for reporting. Will look at it as soon as I can.

Bart.

Original comment by bguijt on 6 Apr 2011 at 12:04

GoogleCodeExporter commented 9 years ago
Just try to recompile the database with gwt 2.2

Original comment by Peter.Nu...@googlemail.com on 6 Apr 2011 at 1:25

GoogleCodeExporter commented 9 years ago
It does appear to be a simple recompilation.

See this bug in another project for more details: 
http://code.google.com/p/gwt-google-apis/issues/detail?id=447

Original comment by moor...@gmail.com on 5 May 2011 at 2:07

GoogleCodeExporter commented 9 years ago
I tried recompiling against GWT 2.3.0 (on Windows Vista) but I got the 
following error:

compile:
    [mkdir] Created dir: C:\Users\me\gwt\gwt-mobile-webkit\applicationcache\build\out\appcache\bin
[gwt.javac] 
C:\Users\me\gwt\gwt-mobile-webkit\applicationcache\appcache\build.xml:21: 
warning: 'includeantruntime' was not set, defaulting to 
build.sysclasspath=last; set to false for repeatable builds
[gwt.javac] Compiling 5 source files to 
C:\Users\me\gwt\gwt-mobile-webkit\applicationcache\build\out\appcache\bin
[gwt.javac] 
C:\Users\me\gwt\gwt-mobile-webkit\applicationcache\appcache\src\com\google\code\
gwt\appcache\linker\IFrameAppCacheLinker.java:208: 
doEmitCompilation(com.google.gwt.core.ext.TreeLogger,com.google.gwt.core.ext.Lin
kerContext,com.google.gwt.core.ext
.linker.CompilationResult,com.google.gwt.core.ext.linker.ArtifactSet) in 
com.google.gwt.core.ext.linker.impl.SelectionScriptLinker cannot be applied to 
(com.google.gwt.core.ext.TreeLogger,com.google.gwt.core.ext.LinkerContext,com.go
ogle.gwt.core.ext.linker.Com
pilationResult)
[gwt.javac]       EmittedArtifact htmlArtifact = doEmitCompilation(logger, 
context, cr);

Does this look like something silly on my part or is there a problem with GWT 
2.3?

Thanks,
Phil

Original comment by ph...@mobius.ie on 22 Jun 2011 at 11:28

GoogleCodeExporter commented 9 years ago
Hi Phil,

It looks like you are compiling the 'appcache' module which is in a, let's say, 
'experimental' state :-) That code won't compile to any GWT 2.x release.

However, if you CD into the /database module of your gwt-mobile-webkit 
checkout, enter "ant clean dist" command, it would compile with any GWT release 
(GWT 2.3 gives errors related to missing validation types, but won't affect the 
result. Working on that).

HTH,
Bart

Original comment by bguijt on 25 Jun 2011 at 11:21

GoogleCodeExporter commented 9 years ago

Hello

Done the following:

- Tried HelloDatabase in dev mode on Chrome (12.0.742.122 m), using GWT 2.3.0. 
Got the com.google.gwt.core.ext.typeinfo.JClassType exception.
- Tried the same with a GWT 2.1 in dev mode. Worked fine except for the 
following:

12:40:40.159 [ERROR] [hellodatabase] Uncaught exception escaped
java.lang.ClassCastException: com.google.gwt.core.client.JavaScriptObject$ 
cannot be cast to java.util.Date
    at com.google.code.gwt.database.sample.hellodatabase.client.ClickRow$.getClicked$(ClickRow.java)
    at com.google.code.gwt.database.sample.hellodatabase.client.HelloDatabase$2$1$1.onSuccess(HelloDatabase.java:94)
    at com.google.code.gwt.database.client.service.callback.list.TransactionCallbackListCallback.onTransactionSuccess(TransactionCallbackListCallback.java:61)
    at com.google.code.gwt.database.client.impl.DatabaseImpl.handleSuccess(DatabaseImpl.java:105)
    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)

But the clickcount went fine. The question would be: do you plan to fix the 
issue, or is there any new workaround we may apply? I definitely understand 
it's quite some deep re-writing of the existing code, being a compatibility 
issue. But as you perfectly already know, it's quite a blocking one.

Please let me know if you need any further detail.

Riccardo

Original comment by riccardo...@gmail.com on 27 Jul 2011 at 10:53

GoogleCodeExporter commented 9 years ago
Hi

When do you think there will be a new version, which is compatible with GWT 2.3?
I tried to check out and build it manually as suggested, but I ended up with 
other compilation errors:

 [ERROR] Line 71:  The method getCanonicalName() is undefined for the type Class<Database>
      [ERROR] Line 72:  The method getCanonicalName() is undefined for the type Class<SQLTransaction>
      [ERROR] Line 73:  The method getCanonicalName() is undefined for the type Class<DataServiceUtils>
      [ERROR] Line 74:  The method getCanonicalName() is undefined for the type Class<VoidCallback>
      [ERROR] Line 75:  The method getCanonicalName() is undefined for the type Class<ListCallback>
      [ERROR] Line 76:  The method getCanonicalName() is undefined for the type Class<ScalarCallback>
      [ERROR] Line 77:  The method getCanonicalName() is undefined for the type Class<RowIdListCallback>
      [ERROR] Line 78:  The method getCanonicalName() is undefined for the type Class<DataServiceStatementCallback>
      [ERROR] Line 79:  The method getCanonicalName() is undefined for the type Class<StatementCallbackVoidCallback>
      [ERROR] Line 80:  The method getCanonicalName() is undefined for the type Class<StatementCallbackListCallback>
      [ERROR] Line 81:  The method getCanonicalName() is undefined for the type Class<StatementCallbackRowIdListCallback>
      [ERROR] Line 82:  The method getCanonicalName() is undefined for the type Class<TransactionCallbackVoidCallback>
      [ERROR] Line 83:  The method getCanonicalName() is undefined for the type Class<TransactionCallbackScalarCallback>
      [ERROR] Line 84:  The method getCanonicalName() is undefined for the type Class<TransactionCallbackListCallback>
      [ERROR] Line 85:  The method getCanonicalName() is undefined for the type Class<TransactionCallbackRowIdListCallback>
      [ERROR] Line 86:  The method getCanonicalName() is undefined for the type Class<DatabaseException>
      [ERROR] Line 265:  The method getCanonicalName() is undefined for the type Class<ServiceMethodCreator>
      [ERROR] Line 271:  The method forName(String) is undefined for the type Class
      [ERROR] Line 272:  The method newInstance() is undefined for the type Class<capture#1-of ?>
   [ERROR] Errors in 'jar:file:/C:/Users/MSc/Desktop/gwt-html5-database_new.jar!/com/google/code/gwt/database/rebind/GeneratorUtils.java'
      [ERROR] Line 103:  The method getCanonicalName() is undefined for the type Class<capture#1-of ?>
      [ERROR] Line 166:  The method getCanonicalName() is undefined for the type Class<capture#2-of ?>
      [ERROR] Line 176:  The method getCanonicalName() is undefined for the type Class<capture#3-of ?>
   [ERROR] Cannot proceed due to previous errors

Thank you
Manuel

Original comment by schragma...@gmail.com on 19 Aug 2011 at 12:37

GoogleCodeExporter commented 9 years ago
Hi

I simply recompiled the sources of the gwt-html5-database project and now it 
works again with GWT 2.4. But now I have to maintain this JAR by myself. Can 
you please upload the recompiled version (1.5.2) to your maven repository?

Regards
Christoph

Original comment by cspe...@gmail.com on 23 May 2012 at 12:19

GoogleCodeExporter commented 9 years ago
Facing the same problem, would appreciate an official version that works with 
GWT 2.4

Original comment by dominik....@gmail.com on 27 Jun 2012 at 9:01

GoogleCodeExporter commented 9 years ago
Same problem, I tried to recompile like Christoph did. I did use the 1.5.1 code 
and that did not solve the issue.  please post new official version. 

@ Christoph, could you actually post the jar you created, meanwhile it would 
help guys like me :-)) ?

Benoit

Original comment by b.marcha...@gmail.com on 12 Jul 2012 at 9:02

GoogleCodeExporter commented 9 years ago
These are not official versions by any means, but are my gwt-html5-database 
builds...

I don't post all the src as I built against a distributed GWT version and not 
against GWT truck, didn't have the time to figure out the ant build completely 
and just hardcoded my paths to the GWT_HOME I was using (= too embarrassing to 
post my build file)

https://github.com/Shawn-in-Tokyo/gwt-mobile-webkit-builds

Original comment by big.coffee.lover@gmail.com on 13 Jul 2012 at 1:37

GoogleCodeExporter commented 9 years ago
thanks a lot 'big coffee lover' :-) 

Thanks to the provided 'temporary' jar, I could compile successfully .. 

BUT when running the provided example, I get now the same error as Riccardo 
(see comment 7)
java.lang.ClassCastException: com.google.gwt.core.client.JavaScriptObject$ 
cannot be cast to java.util.Date

May be I can develop around and avoid Dates ... but that does not look like 
production quality. Riccardo reported the problem one year ago ... it is 
worrying !!!!! 

Original comment by b.marcha...@gmail.com on 13 Jul 2012 at 8:18