Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-2350

Cannot shade Avatica with Guava 21.0 or higher

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: avatica-1.11.0
    • Fix Version/s: avatica-1.12.0
    • Component/s: avatica
    • Labels:
      None

      Description

      When building Avatica with Guava version 23.0, I run into an error while shading:

      $ mvn -Dguava.version=23.0 -DskipTests clean package
      
      [INFO] --- maven-shade-plugin:2.1:shade (default) @ avatica-standalone-server ---
      [INFO] Including org.apache.calcite.avatica:avatica-core:jar:1.12.0-SNAPSHOT in the shaded jar.
      [INFO] Including org.apache.calcite.avatica:avatica-metrics:jar:1.12.0-SNAPSHOT in the shaded jar.
      [INFO] Including com.fasterxml.jackson.core:jackson-core:jar:2.9.4 in the shaded jar.
      [INFO] Including com.fasterxml.jackson.core:jackson-annotations:jar:2.9.4 in the shaded jar.
      [INFO] Including com.fasterxml.jackson.core:jackson-databind:jar:2.9.4 in the shaded jar.
      [INFO] Including com.google.protobuf:protobuf-java:jar:3.3.0 in the shaded jar.
      [INFO] Including org.apache.httpcomponents:httpclient:jar:4.5.2 in the shaded jar.
      [INFO] Including commons-logging:commons-logging:jar:1.2 in the shaded jar.
      [INFO] Including commons-codec:commons-codec:jar:1.9 in the shaded jar.
      [INFO] Including org.apache.httpcomponents:httpcore:jar:4.4.4 in the shaded jar.
      [INFO] Including org.apache.calcite.avatica:avatica-server:jar:1.12.0-SNAPSHOT in the shaded jar.
      [INFO] Including javax.servlet:javax.servlet-api:jar:3.0.1 in the shaded jar.
      [INFO] Including com.google.guava:guava:jar:23.0 in the shaded jar.
      [INFO] Including com.google.code.findbugs:jsr305:jar:1.3.9 in the shaded jar.
      [INFO] Including com.google.errorprone:error_prone_annotations:jar:2.0.18 in the shaded jar.
      [INFO] Including com.google.j2objc:j2objc-annotations:jar:1.1 in the shaded jar.
      [INFO] Including org.codehaus.mojo:animal-sniffer-annotations:jar:1.14 in the shaded jar.
      [INFO] Including org.eclipse.jetty:jetty-http:jar:9.2.19.v20160908 in the shaded jar.
      [INFO] Including org.eclipse.jetty:jetty-security:jar:9.2.19.v20160908 in the shaded jar.
      [INFO] Including org.eclipse.jetty:jetty-server:jar:9.2.19.v20160908 in the shaded jar.
      [INFO] Including org.eclipse.jetty:jetty-io:jar:9.2.19.v20160908 in the shaded jar.
      [INFO] Including org.eclipse.jetty:jetty-util:jar:9.2.19.v20160908 in the shaded jar.
      [INFO] Including com.beust:jcommander:jar:1.48 in the shaded jar.
      [INFO] Including org.slf4j:slf4j-api:jar:1.7.13 in the shaded jar.
      [INFO] Including org.slf4j:slf4j-log4j12:jar:1.7.13 in the shaded jar.
      [INFO] Including log4j:log4j:jar:1.2.17 in the shaded jar.
      [INFO] ------------------------------------------------------------------------
      [INFO] Reactor Summary:
      [INFO] 
      [INFO] Apache Calcite Avatica Project 1.12.0-SNAPSHOT ..... SUCCESS [ 2.028 s]
      [INFO] Apache Calcite Avatica Metrics ..................... SUCCESS [ 1.900 s]
      [INFO] Apache Calcite Avatica ............................. SUCCESS [ 16.995 s]
      [INFO] Apache Calcite Avatica Server ...................... SUCCESS [ 2.231 s]
      [INFO] Apache Calcite Avatica Standalone Server ........... FAILURE [ 3.765 s]
      [INFO] Apache Calcite Avatica Docker images ............... SKIPPED
      [INFO] Apache Calcite Avatica Dropwizard Metrics 3 ........ SKIPPED
      [INFO] Apache Calcite Avatica Noop Driver ................. SKIPPED
      [INFO] Apache Calcite Avatica Compatibility Kit ........... SKIPPED
      [INFO] Apache Calcite Avatica (Shaded) 1.12.0-SNAPSHOT .... SKIPPED
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 27.391 s
      [INFO] Finished at: 2018-06-01T13:55:54-07:00
      [INFO] ------------------------------------------------------------------------
      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-shade-plugin:2.1:shade (default) on project avatica-standalone-server: Error creating shaded jar: Error in ASM processing class com/google/common/cache/LocalCache$EntrySet.class: 52264 -> [Help 1]

       

      The error occurs on all JDK versions, and Guava versions 21.0, 22.0 and 23.0. Avatica builds fine on Guava version 14.0 through 20.0.

        Attachments

          Activity

            People

            • Assignee:
              julianhyde Julian Hyde
              Reporter:
              julianhyde Julian Hyde
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: