5 Replies Latest reply on Feb 20, 2013 1:39 PM by shadowcreeper

    Errors compiling Infinispan 5.2.1.Final

    shadowcreeper Apprentice

      Has anybody been able to compile Inifinispan v5.2.1Final?

       

      Every time I try to compile it I get a bunch of "incompatible types" errors building infinispan-core on org/infinispan/jmx/annotations/ManagedAttribute.java for classes that exist in infinispan-core. Looking at the dependency tree I don't see where it could be getting any incompatible org.inifinispan.[anything] as they would all have to come from the local source tree (where it definitely exists).

       

      Example:

      [ERROR] /home/me/infinispan/core/src/main/java/org/infinispan/jmx/annotations/ManagedAttribute.java:[48,40] incompatible types
      [ERROR] found   : org.infinispan.jmx.annotations.DataType
      [ERROR] required: org.infinispan.jmx.annotations.DataType

       

      I was able to successfully "mvn compile" the 5.1.8.Final branch, but not the 5.2.1.Final branch.

       

      The latest version I was able to sucessfully compile was the 5.2.0.CR2 branch. Every branch after that (5.2.0.CR3, 5.2.0.Final, 5.2.1.Final, 5.2.x) gives me several "incompatible types" errors with the org.infinispan.jmx.annotations.(DataType, DisplayType, MeasurementType, Units) classes while trying to compile org.infinispan.jmx.annotations.ManagedAttribute.java.

        • 1. Re: Errors compiling Infinispan 5.2.1.Final
          Tristan Tarrant Master

          How are you running Maven ?

           

          The quickest way to compile and install everything is

           

          mvn -DskipTests clean install

           

          and I've just verified this on my local machine with Maven 3.0.3 and Java 1.6.0_37

           

          Tristan

          • 2. Re: Errors compiling Infinispan 5.2.1.Final
            shadowcreeper Apprentice

            I was using "mvn clean; mvn compile" however using "mvn -DskipTests clean install" produces the exact same errors:

            [INFO] 8 errors

            [INFO] -------------------------------------------------------------

            [INFO] ------------------------------------------------------------------------

            [INFO] Reactor Summary:

            [INFO]

            [INFO] Infinispan Common Parent .......................... SUCCESS [1.063s]

            [INFO] Infinispan Core ................................... FAILURE [6.769s]

            [INFO] Parent pom for server modules ..................... SKIPPED

            [INFO] Infinispan Server - Core Components ............... SKIPPED

            [INFO] Parent pom for cachestore modules ................. SKIPPED

            [INFO] Infinispan JDBC CacheStore ........................ SKIPPED

            [INFO] Infinispan Lucene Directory Implementation ........ SKIPPED

            [INFO] Infinispan Query API .............................. SKIPPED

            [INFO] Infinispan Tools .................................. SKIPPED

            [INFO] Infinispan JDBM CacheStore ........................ SKIPPED

            [INFO] Infinispan Tree API ............................... SKIPPED

            [INFO] Infinispan BDBJE CacheStore ....................... SKIPPED

            [INFO] Infinispan CloudCacheStore ........................ SKIPPED

            [INFO] Infinispan Hot Rod Server ......................... SKIPPED

            [INFO] Infinispan Hot Rod Client ......................... SKIPPED

            [INFO] Infinispan remote CacheStore ...................... SKIPPED

            [INFO] Infinispan CassandraCacheStore .................... SKIPPED

            [INFO] Infinispan HBaseCacheStore ........................ SKIPPED

            [INFO] Infinispan Memcached Server ....................... SKIPPED

            [INFO] Infinispan WebSocket Server ....................... SKIPPED

            [INFO] Infinispan REST Server ............................ SKIPPED

            [INFO] Infinispan RHQ Plugin ............................. SKIPPED

            [INFO] Infinispan Rolling Upgrade Tooling ................ SKIPPED

            [INFO] Infinispan Spring Integration ..................... SKIPPED

            [INFO] Infinispan QL Interpreter ......................... SKIPPED

            [INFO] Infinispan CLI Client ............................. SKIPPED

            [INFO] Infinispan GUI Demo ............................... SKIPPED

            [INFO] Infinispan EC2 Demo ............................... SKIPPED

            [INFO] Infinispan Distributed Executors and Map/Reduce Demo  SKIPPED

            [INFO] Infinispan EC2 Demo UI ............................ SKIPPED

            [INFO] Infinispan Directory Demo ......................... SKIPPED

            [INFO] Infinispan Lucene Directory Demo .................. SKIPPED

            [INFO] Infinispan GridFileSystem WebDAV interface ........ SKIPPED

            [INFO] Infinispan Near Cache Demo ........................ SKIPPED

            [INFO] Infinispan CDI support ............................ SKIPPED

            [INFO] Infinispan Near Cache Demo Client ................. SKIPPED

            [INFO] Infinispan CDI support JCache TCK runner .......... SKIPPED

            [INFO] Infinispan AS/EAP modules ......................... SKIPPED

            [INFO] Integration tests: Lucene Directory with Infinispan Query  SKIPPED

            [INFO] Integration tests: AS Module Integration Tests .... SKIPPED

            [INFO] Infinispan Distribution ........................... SKIPPED

            [INFO] ------------------------------------------------------------------------

            [INFO] BUILD FAILURE

            [INFO] ------------------------------------------------------------------------

            [INFO] Total time: 9.184s

            [INFO] Finished at: Tue Feb 19 10:36:43 PST 2013

            [INFO] Final Memory: 32M/338M

            [INFO] ------------------------------------------------------------------------

            [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.0:compile (default-compile) on project infinispan-core: Compilation failure: Compilation failure:

            [ERROR] /home/me/projects/infinispan-git/core/src/main/java/org/infinispan/jmx/annotations/ManagedAttribute.java:[48,40] incompatible types

            [ERROR] found   : org.infinispan.jmx.annotations.DataType

            [ERROR] required: org.infinispan.jmx.annotations.DataType

            [ERROR] /home/me/projects/infinispan-git/core/src/main/java/org/infinispan/jmx/annotations/ManagedAttribute.java:[50,49] incompatible types

            [ERROR] found   : org.infinispan.jmx.annotations.DisplayType

            [ERROR] required: org.infinispan.jmx.annotations.DisplayType

            [ERROR] /home/me/projects/infinispan-git/core/src/main/java/org/infinispan/jmx/annotations/ManagedAttribute.java:[52,61] incompatible types

            [ERROR] found   : org.infinispan.jmx.annotations.MeasurementType

            [ERROR] required: org.infinispan.jmx.annotations.MeasurementType

            [ERROR] /home/me/projects/infinispan-git/core/src/main/java/org/infinispan/jmx/annotations/ManagedAttribute.java:[54,31] incompatible types

            [ERROR] found   : org.infinispan.jmx.annotations.Units

            [ERROR] required: org.infinispan.jmx.annotations.Units

            [ERROR] /home/me/projects/infinispan-git/core/src/main/java/org/infinispan/jmx/annotations/ManagedAttribute.java:[48,40] incompatible types

            [ERROR] found   : org.infinispan.jmx.annotations.DataType

            [ERROR] required: org.infinispan.jmx.annotations.DataType

            [ERROR] /home/me/projects/infinispan-git/core/src/main/java/org/infinispan/jmx/annotations/ManagedAttribute.java:[50,49] incompatible types

            [ERROR] found   : org.infinispan.jmx.annotations.DisplayType

            [ERROR] required: org.infinispan.jmx.annotations.DisplayType

            [ERROR] /home/me/projects/infinispan-git/core/src/main/java/org/infinispan/jmx/annotations/ManagedAttribute.java:[52,61] incompatible types

            [ERROR] found   : org.infinispan.jmx.annotations.MeasurementType

            [ERROR] required: org.infinispan.jmx.annotations.MeasurementType

            [ERROR] /home/me/projects/infinispan-git/core/src/main/java/org/infinispan/jmx/annotations/ManagedAttribute.java:[54,31] incompatible types

            [ERROR] found   : org.infinispan.jmx.annotations.Units

            [ERROR] required: org.infinispan.jmx.annotations.Units

            [ERROR] -> [Help 1]

            Note: This is from a clean git checkout of branch "5.2.1.Final".

            • 3. Re: Errors compiling Infinispan 5.2.1.Final
              shadowcreeper Apprentice

              Also, in case this matters:

               

              $ mvn --version

              Apache Maven 3.0.3 (r1075438; 2011-02-28 09:31:09-0800)

              Maven home: /home/me/bin/apache-maven-3.0.3

              Java version: 1.6.0_26, vendor: Sun Microsystems Inc.

              Java home: /usr/lib/jvm/java-6-sun-1.6.0.26/jre

              Default locale: en_US, platform encoding: UTF-8

              OS name: "linux", version: "3.2.0-4-amd64", arch: "amd64", family: "unix"

              • 4. Re: Errors compiling Infinispan 5.2.1.Final
                shadowcreeper Apprentice

                Ok, I have no idea why, but with this change, version 5.2.1.Final compiles (and without this change, I get errors):

                diff --git a/core/src/main/java/org/infinispan/jmx/annotations/ManagedAttribute.java b/core/src/main/java/org/infinispan/jmx/annotations/ManagedAttribute.java

                index ee66a25..fcf8bbe 100644

                --- a/core/src/main/java/org/infinispan/jmx/annotations/ManagedAttribute.java

                +++ b/core/src/main/java/org/infinispan/jmx/annotations/ManagedAttribute.java

                @@ -45,11 +45,11 @@

                 

                    String displayName() default "";

                 

                -   DataType dataType() default DataType.MEASUREMENT;

                +   DataType dataType() default org.infinispan.jmx.annotations.DataType.MEASUREMENT;

                 

                -   DisplayType displayType() default DisplayType.DETAIL;

                +   DisplayType displayType() default org.infinispan.jmx.annotations.DisplayType.DETAIL;

                 

                -   MeasurementType measurementType() default MeasurementType.DYNAMIC;

                +   MeasurementType measurementType() default org.infinispan.jmx.annotations.MeasurementType.DYNAMIC;

                 

                -   Units units() default Units.NONE;

                +   Units units() default org.infinispan.jmx.annotations.Units.NONE;

                }

                1 of 1 people found this helpful
                • 5. Re: Errors compiling Infinispan 5.2.1.Final
                  shadowcreeper Apprentice

                  Per Tristan Tarrant's comment in the bug ticket, this was an issue with Sun/Oracle JDK that was fixed in v1.6.0_30.

                   

                  I also was able to compile it using an older version of the openjdk v1.6.0_24.

                   

                  If you must use a buggy JDK, see the above comment for a workaround.

                  1 of 1 people found this helpful