1 Reply Latest reply on Feb 20, 2014 10:11 AM by Jonathan Fuerth

    Errai 2.4.3.Final and GWT 2.6.0 anyone?

    Hristo Stoyanov Master

      Hi all. Has anyone succeeded using Errai 2.4.3 with GWT 2.6.0? I decided to use the newly released GWT 2.6.0 with Errai 2.4.3.Final and started getting errors like these:

       

      =========================

      Compiling module com.peruncs.s4g.web.gwt.S4GWebApp

         [WARN] Unable to read: jar:file:/home/hristo/.gradle/caches/modules-2/files-2.1/com.google.gwt/gwt-user/2.5.1/a8afe9b0222db730f4ebd02a1aa329a5395473c5/gwt-user-2.5.1.jar!/com/google/gwt/user/User.gwtar. Skipping: java.io.InvalidClassException: com.google.gwt.dev.util.DiskCacheToken; local class incompatible: stream classdesc serialVersionUID = 3824090149180578568, local class serialVersionUID = -2622986784335128516

         [WARN] Unable to read: jar:file:/home/hristo/.gradle/caches/modules-2/files-2.1/com.google.gwt/gwt-user/2.5.1/a8afe9b0222db730f4ebd02a1aa329a5395473c5/gwt-user-2.5.1.jar!/com/google/gwt/core/Core.gwtar. Skipping: java.io.InvalidClassException: com.google.gwt.dev.util.DiskCacheToken; local class incompatible: stream classdesc serialVersionUID = 3824090149180578568, local class serialVersionUID = -2622986784335128516

         [WARN] Unable to read: jar:file:/home/hristo/.gradle/caches/modules-2/files-2.1/com.google.gwt/gwt-user/2.5.1/a8afe9b0222db730f4ebd02a1aa329a5395473c5/gwt-user-2.5.1.jar!/com/google/gwt/regexp/RegExp.gwtar. Skipping: java.io.InvalidClassException: com.google.gwt.dev.util.DiskCacheToken; local class incompatible: stream classdesc serialVersionUID = 3824090149180578568, local class serialVersionUID = -2622986784335128516

         [WARN] Unable to read: jar:file:/home/hristo/.gradle/caches/modules-2/files-2.1/com.google.gwt/gwt-user/2.5.1/a8afe9b0222db730f4ebd02a1aa329a5395473c5/gwt-user-2.5.1.jar!/com/google/web/bindery/event/Event.gwtar. Skipping: java.io.InvalidClassException: com.google.gwt.dev.util.DiskCacheToken; local class incompatible: stream classdesc serialVersionUID = 3824090149180578568, local class serialVersionUID = -2622986784335128516

         [WARN] Unable to read: jar:file:/home/hristo/.gradle/caches/modules-2/files-2.1/com.google.gwt/gwt-user/2.5.1/a8afe9b0222db730f4ebd02a1aa329a5395473c5/gwt-user-2.5.1.jar!/com/google/gwt/json/JSON.gwtar. Skipping: java.io.InvalidClassException: com.google.gwt.dev.util.DiskCacheToken; local class incompatible: stream classdesc serialVersionUID = 3824090149180578568, local class serialVersionUID = -2622986784335128516

         Validating units:

            [ERROR] Errors in 'com/google/common/collect/super/com/google/common/collect/ImmutableSortedMap.java'

               [ERROR] Line 112: Name clash: The method copyOf(Map<? extends K,? extends V>) of type ImmutableSortedMap<K,V> has the same erasure as copyOf(Map<? extends K,? extends V>) of type ImmutableMap<K,V> but does not hide it

            [ERROR] Errors in 'com/google/common/collect/super/com/google/common/collect/ImmutableSortedSet.java'

               [ERROR] Line 140: Name clash: The method copyOf(Collection<? extends E>) of type ImmutableSortedSet<E> has the same erasure as copyOf(Collection<? extends E>) of type ImmutableSet<E> but does not hide it

               [ERROR] Line 145: Name clash: The method copyOf(Iterable<? extends E>) of type ImmutableSortedSet<E> has the same erasure as copyOf(Iterable<? extends E>) of type ImmutableSet<E> but does not hide it

               [ERROR] Line 150: Name clash: The method copyOf(Iterator<? extends E>) of type ImmutableSortedSet<E> has the same erasure as copyOf(Iterator<? extends E>) of type ImmutableSet<E> but does not hide it

      =========================

       

      So, I checked my Gradle build if I am accidentally introducing some GWT 2.5.1 dependency, but could not find any. My concerns is that Errai 2.4.3. Final is hard-wired to GWT 2.5.1, preventing upgrade to GWT 2.6.0. Indeed, take a look at this dependency:

      ...

      +--- org.jboss.errai:errai-jpa-datasync:2.4.3.Final

      |    +--- org.jboss.errai:errai-jpa-client:2.4.3.Final

      |    |    +--- org.hibernate:hibernate-entitymanager:4.2.0.Final

      |    |    |    +--- org.jboss.logging:jboss-logging:3.1.0.GA

      |    |    |    +--- org.hibernate:hibernate-core:4.2.0.Final

      |    |    |    |    +--- antlr:antlr:2.7.7

      |    |    |    |    +--- org.jboss.logging:jboss-logging:3.1.0.GA

      |    |    |    |    +--- org.jboss.spec.javax.transaction:jboss-transaction-api_1.1_spec:1.0.0.Final

      |    |    |    |    +--- dom4j:dom4j:1.6.1 (*)

      |    |    |    |    +--- org.hibernate.javax.persistence:hibernate-jpa-2.0-api:1.0.1.Final

      |    |    |    |    +--- org.javassist:javassist:3.15.0-GA

      |    |    |    |    \--- org.hibernate.common:hibernate-commons-annotations:4.0.1.Final

      |    |    |    |         \--- org.jboss.logging:jboss-logging:3.1.0.CR2 -> 3.1.0.GA

      |    |    |    +--- org.jboss.spec.javax.transaction:jboss-transaction-api_1.1_spec:1.0.0.Final

      |    |    |    +--- dom4j:dom4j:1.6.1 (*)

      |    |    |    +--- org.hibernate.javax.persistence:hibernate-jpa-2.0-api:1.0.1.Final

      |    |    |    +--- org.javassist:javassist:3.15.0-GA

      |    |    |    \--- org.hibernate.common:hibernate-commons-annotations:4.0.1.Final (*)

      |    |    +--- org.hibernate.javax.persistence:hibernate-jpa-2.0-api:1.0.1.Final

      |    |    +--- org.jboss.errai:errai-ioc:2.4.3.Final (*)

      |    |    +--- org.jboss.errai:errai-data-binding:2.4.3.Final

      |    |    |    +--- org.jboss.errai:errai-marshalling:2.4.3.Final (*)

      |    |    |    \--- com.google.guava:guava-gwt:14.0.1

      |    |    |         +--- com.google.code.findbugs:jsr305:1.3.9

      |    |    |         \--- com.google.guava:guava:14.0.1

      |    |    +--- com.google.gwt:gwt-user:2.5.1

      |    |    |    +--- javax.validation:validation-api:1.0.0.GA

      |    |    |    \--- org.json:json:20090211

      |    |    \--- com.google.guava:guava-gwt:14.0.1 (*)

      |    +--- org.jboss.errai:errai-bus:2.4.3.Final (*)

      |    \--- org.jboss.errai:errai-cdi-client:2.4.3.Final (*)

        • 1. Re: Errai 2.4.3.Final and GWT 2.6.0 anyone?
          Jonathan Fuerth Master

          Hi Hristo,

           

             [WARN] Unable to read: jar:file:/home/hristo/.gradle/caches/modules-2/files-2.1/com.google.gwt/gwt-user/2.5.1/a8afe9b0222db730f4ebd02a1aa329a5395473c5/gwt-user-2.5.1.jar!/com/google/gwt/user/User.gwtar. Skipping: java.io.InvalidClassException: com.google.gwt.dev.util.DiskCacheToken; local class incompatible: stream classdesc serialVersionUID = 3824090149180578568, local class serialVersionUID = -2622986784335128516

          This is an issue with GWT's caching system. It can happen when you switch between versions of the GWT library jars. To fix it, find and delete all gwt-unitCache directories within your project(s). Our example Maven POMs are set up to delete these directories when you clean; you could do the same with your Gradle build.

           

                [ERROR] Errors in 'com/google/common/collect/super/com/google/common/collect/ImmutableSortedMap.java'

                   [ERROR] Line 112: Name clash: The method copyOf(Map<? extends K,? extends V>) of type ImmutableSortedMap<K,V> has the same erasure as copyOf(Map<? extends K,? extends V>) of type ImmutableMap<K,V> but does not hide it

                [ERROR] Errors in 'com/google/common/collect/super/com/google/common/collect/ImmutableSortedSet.java'

                   [ERROR] Line 140: Name clash: The method copyOf(Collection<? extends E>) of type ImmutableSortedSet<E> has the same erasure as copyOf(Collection<? extends E>) of type ImmutableSet<E> but does not hide it

                   [ERROR] Line 145: Name clash: The method copyOf(Iterable<? extends E>) of type ImmutableSortedSet<E> has the same erasure as copyOf(Iterable<? extends E>) of type ImmutableSet<E> but does not hide it

                   [ERROR] Line 150: Name clash: The method copyOf(Iterator<? extends E>) of type ImmutableSortedSet<E> has the same erasure as copyOf(Iterator<? extends E>) of type ImmutableSet<E> but does not hide it

           

           

          GWT 2.6.0 compiles with the Java 7 source level by default, and according to this mailing list thread, Guava 14 can't be compiled as Java 7 source code. You can fix this by updating to Guava 15.

           

           

          So, I checked my Gradle build if I am accidentally introducing some GWT 2.5.1 dependency, but could not find any. My concerns is that Errai 2.4.3. Final is hard-wired to GWT 2.5.1, preventing upgrade to GWT 2.6.0. Indeed, take a look at this dependency:

           

          Yes, Errai 2.4.3 (also 3.0 currently) declares a dependency on GWT 2.5.1, but in Maven you can override that in your POM's <depencencyManagement> section. Gradle probably has a similar feature for overriding the versions of transitive dependencies.

           

          Hope that helps,

          Jonathan