Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-13316

Build error because of dependent jar (byteman-install-3.0.3.jar) currupted

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Fix Version/s: 2.2.10, 3.11.0, 4.0
    • Component/s: Legacy/Testing
    • Labels:
      None
    • Environment:

      Platform: Amd64
      OS: CentOS Linux 7

    • Severity:
      Normal
    • Since Version:

      Description

      When build cassandra 3.10 on amd64, CentOS Linux 7, there is a build error caused by corrupted jar file (byteman-install-3.0.3.jar).

      Here is the replicated steps:

      After install necessary dependent packages and apache-ant, git clone cassandra 3.10:

      1)
      git clone https://github.com/apache/cassandra.git
      cd cassandra
      git checkout cassandra-3.10
      ant

      Then gets errors like:
      "
      build-project:
      [echo] apache-cassandra: /cassandra/build.xml
      [javac] Compiling 45 source files to /cassandra/build/classes/thrift
      [javac] Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8
      [javac] error: error reading /cassandra/build/lib/jars/byteman-install-3.0.3.jar; error in opening zip file
      [javac] Compiling 1474 source files to /cassandra/build/classes/main
      [javac] Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8
      [javac] error: error reading /cassandra/build/lib/jars/byteman-install-3.0.3.jar; error in opening zip file
      [javac] Creating empty /cassandra/build/classes/main/org/apache/cassandra/hints/package-info.class
      "
      2)
      To check the jar and get:

      1. jar -i /cassandra/build/lib/jars/byteman-install-3.0.3.jar
        Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8
        java.util.zip.ZipException: error in opening zip file
        at java.util.zip.ZipFile.open(Native Method)
        at java.util.zip.ZipFile.<init>(ZipFile.java:219)
        at java.util.zip.ZipFile.<init>(ZipFile.java:149)
        at java.util.jar.JarFile.<init>(JarFile.java:166)
        at java.util.jar.JarFile.<init>(JarFile.java:103)
        at sun.tools.jar.Main.getJarPath(Main.java:1163)
        at sun.tools.jar.Main.genIndex(Main.java:1195)
        at sun.tools.jar.Main.run(Main.java:317)
        at sun.tools.jar.Main.main(Main.java:1288)

      3) if download the jar and replace it, the build will be successful.

      wget http://downloads.jboss.org/byteman/3.0.3/byteman-download-3.0.3-bin.zip
      unzip byteman-download-3.0.3-bin.zip -d /tmp
      rm -f build/lib/jars/byteman-install-3.0.3.jar
      cp /tmp/byteman-download-3.0.3/lib/byteman-install.jar build/lib/jars/byteman-install-3.0.3.jar

      ant

      ....
      BUILD SUCCESSFUL
      Total time: 36 seconds

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              samding Sam Ding
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: