Details
-
Bug
-
Status: Resolved
-
Normal
-
Resolution: Fixed
-
None
-
Platform: Amd64
OS: CentOS Linux 7
-
Normal
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:
- 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