Building Apache Flink from source fail when package flink-1.5.2
Clash Royale CLAN TAG#URR8PPP
Building Apache Flink from source fail when package flink-1.5.2
I just start my flink learning the day before yesterday.And I download the newest version of flink ----flink1.5.2
I run mvn clean package -DskipTests
on both win10 ubuntu14.0 MacOS10.13,and both failed.By the way,I can not download code on the linkhttps://github.com/apache/flink.git
.Followed README.md, I can not build successfullly.
mvn clean package -DskipTests
https://github.com/apache/flink.git
Here is the error info below:
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building flink-runtime 1.5.2
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:3.0.0:clean (default-clean) @ flink-runtime_2.11 ---
[INFO] Deleting /Applications/yanjiusheng/examples/flink/flink-1.5.2/flink-runtime/target
[INFO]
[INFO] --- maven-checkstyle-plugin:2.17:check (validate) @ flink-runtime_2.11 ---
[INFO]
[INFO] --- maven-enforcer-plugin:3.0.0-M1:enforce (enforce-maven) @ flink-runtime_2.11 ---
[INFO]
[INFO] --- git-commit-id-plugin:2.1.5:revision (default) @ flink-runtime_2.11 ---
[INFO]
[INFO] --- directory-maven-plugin:0.1:highest-basedir (directories) @ flink-runtime_2.11 ---
[INFO] Highest basedir set to: /Applications/yanjiusheng/examples/flink/flink-1.5.2
[INFO]
[INFO] --- build-helper-maven-plugin:1.7:add-source (add-source) @ flink-runtime_2.11 ---
[INFO] Source directory: /Applications/yanjiusheng/examples/flink/flink-1.5.2/flink-runtime/src/main/scala added.
[INFO]
[INFO] --- maven-remote-resources-plugin:1.5:process (process-resource-bundles) @ flink-runtime_2.11 ---
[INFO]
[INFO] --- maven-resources-plugin:2.7:resources (default-resources) @ flink-runtime_2.11 ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO] Copying 3 resources
[INFO]
[INFO] --- scala-maven-plugin:3.2.2:compile (scala-compile-first) @ flink-runtime_2.11 ---
[INFO] /Applications/yanjiusheng/examples/flink/flink-1.5.2/flink-runtime/src/main/java:-1: info: compiling
[INFO] /Applications/yanjiusheng/examples/flink/flink-1.5.2/flink-runtime/src/main/scala:-1: info: compiling
[INFO] Compiling 1451 source files to /Applications/yanjiusheng/examples/flink/flink-1.5.2/flink-runtime/target/classes at 1533878767045
[ERROR] error: java.lang.NoClassDefFoundError: javax/tools/ToolProvider
[INFO] at scala.reflect.io.JavaToolsPlatformArchive.iterator(ZipArchive.scala:301)
[INFO] at scala.collection.IterableLike$class.foreach(IterableLike.scala:72)
[INFO] at scala.reflect.io.AbstractFile.foreach(AbstractFile.scala:92)
[INFO] at scala.tools.nsc.util.DirectoryClassPath.traverse(ClassPath.scala:277)
[INFO] at scala.tools.nsc.util.DirectoryClassPath.x$15$lzycompute(ClassPath.scala:299)
[INFO] at scala.tools.nsc.util.DirectoryClassPath.x$15(ClassPath.scala:299)
[INFO] at scala.tools.nsc.util.DirectoryClassPath.packages$lzycompute(ClassPath.scala:299)
[INFO] at scala.tools.nsc.util.DirectoryClassPath.packages(ClassPath.scala:299)
[INFO] at scala.tools.nsc.util.DirectoryClassPath.packages(ClassPath.scala:264)
[INFO] at scala.tools.nsc.util.MergedClassPath$$anonfun$packages$1.apply(ClassPath.scala:358)
[INFO] at scala.tools.nsc.util.MergedClassPath$$anonfun$packages$1.apply(ClassPath.scala:358)
[INFO] at scala.collection.Iterator$class.foreach(Iterator.scala:891)
[INFO] at scala.collection.AbstractIterator.foreach(Iterator.scala:1334)
[INFO] at scala.collection.IterableLike$class.foreach(IterableLike.scala:72)
[INFO] at scala.collection.AbstractIterable.foreach(Iterable.scala:54)
[INFO] at scala.tools.nsc.util.MergedClassPath.packages$lzycompute(ClassPath.scala:358)
[INFO] at scala.tools.nsc.util.MergedClassPath.packages(ClassPath.scala:353)
[INFO] at scala.tools.nsc.symtab.SymbolLoaders$PackageLoader$$anonfun$doComplete$1.apply$mcV$sp(SymbolLoaders.scala:269)
[INFO] at scala.tools.nsc.symtab.SymbolLoaders$PackageLoader$$anonfun$doComplete$1.apply(SymbolLoaders.scala:260)
[INFO] at scala.tools.nsc.symtab.SymbolLoaders$PackageLoader$$anonfun$doComplete$1.apply(SymbolLoaders.scala:260)
[INFO] at scala.reflect.internal.SymbolTable.enteringPhase(SymbolTable.scala:235)
[INFO] at scala.tools.nsc.symtab.SymbolLoaders$PackageLoader.doComplete(SymbolLoaders.scala:260)
[INFO] at scala.tools.nsc.symtab.SymbolLoaders$SymbolLoader.complete(SymbolLoaders.scala:211)
[INFO] at scala.reflect.internal.Symbols$Symbol.info(Symbols.scala:1535)
[INFO] at scala.reflect.internal.Mirrors$RootsBase.init(Mirrors.scala:256)
[INFO] at scala.tools.nsc.Global.rootMirror$lzycompute(Global.scala:73)
[INFO] at scala.tools.nsc.Global.rootMirror(Global.scala:71)
[INFO] at scala.tools.nsc.Global.rootMirror(Global.scala:39)
[INFO] at scala.reflect.internal.Definitions$DefinitionsClass.ObjectClass$lzycompute(Definitions.scala:257)
[INFO] at scala.reflect.internal.Definitions$DefinitionsClass.ObjectClass(Definitions.scala:257)
[INFO] at scala.reflect.internal.Definitions$DefinitionsClass.init(Definitions.scala:1390)
[INFO] at scala.tools.nsc.Global$Run.<init>(Global.scala:1242)
[INFO] at scala.tools.nsc.Driver.doCompile(Driver.scala:31)
[INFO] at scala.tools.nsc.MainClass.doCompile(Main.scala:23)
[INFO] at scala.tools.nsc.Driver.process(Driver.scala:51)
[INFO] at scala.tools.nsc.Driver.main(Driver.scala:64)
[INFO] at scala.tools.nsc.Main.main(Main.scala)
[INFO] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[INFO] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[INFO] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[INFO] at java.base/java.lang.reflect.Method.invoke(Method.java:564)
[INFO] at scala_maven_executions.MainHelper.runMain(MainHelper.java:164)
[INFO] at scala_maven_executions.MainWithArgsInFile.main(MainWithArgsInFile.java:26)
[INFO] java.lang.reflect.InvocationTargetException
[INFO] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[INFO] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[INFO] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[INFO] at java.base/java.lang.reflect.Method.invoke(Method.java:564)
[INFO] at scala_maven_executions.MainHelper.runMain(MainHelper.java:164)
[INFO] at scala_maven_executions.MainWithArgsInFile.main(MainWithArgsInFile.java:26)
[ERROR] Caused by: java.lang.NoClassDefFoundError: javax/tools/ToolProvider
[INFO] at scala.reflect.io.JavaToolsPlatformArchive.iterator(ZipArchive.scala:301)
[INFO] at scala.collection.IterableLike$class.foreach(IterableLike.scala:72)
[INFO] at scala.reflect.io.AbstractFile.foreach(AbstractFile.scala:92)
[INFO] at scala.tools.nsc.util.DirectoryClassPath.traverse(ClassPath.scala:277)
[INFO] at scala.tools.nsc.util.DirectoryClassPath.x$15$lzycompute(ClassPath.scala:299)
[INFO] at scala.tools.nsc.util.DirectoryClassPath.x$15(ClassPath.scala:299)
[INFO] at scala.tools.nsc.util.DirectoryClassPath.packages$lzycompute(ClassPath.scala:299)
[INFO] at scala.tools.nsc.util.DirectoryClassPath.packages(ClassPath.scala:299)
[INFO] at scala.tools.nsc.util.DirectoryClassPath.packages(ClassPath.scala:264)
[INFO] at scala.tools.nsc.util.MergedClassPath$$anonfun$packages$1.apply(ClassPath.scala:358)
[INFO] at scala.tools.nsc.util.MergedClassPath$$anonfun$packages$1.apply(ClassPath.scala:358)
[INFO] at scala.collection.Iterator$class.foreach(Iterator.scala:891)
[INFO] at scala.collection.AbstractIterator.foreach(Iterator.scala:1334)
[INFO] at scala.collection.IterableLike$class.foreach(IterableLike.scala:72)
[INFO] at scala.collection.AbstractIterable.foreach(Iterable.scala:54)
[INFO] at scala.tools.nsc.util.MergedClassPath.packages$lzycompute(ClassPath.scala:358)
[INFO] at scala.tools.nsc.util.MergedClassPath.packages(ClassPath.scala:353)
[INFO] at scala.tools.nsc.symtab.SymbolLoaders$PackageLoader$$anonfun$doComplete$1.apply$mcV$sp(SymbolLoaders.scala:269)
[INFO] at scala.tools.nsc.symtab.SymbolLoaders$PackageLoader$$anonfun$doComplete$1.apply(SymbolLoaders.scala:260)
[INFO] at scala.tools.nsc.symtab.SymbolLoaders$PackageLoader$$anonfun$doComplete$1.apply(SymbolLoaders.scala:260)
[INFO] at scala.reflect.internal.SymbolTable.enteringPhase(SymbolTable.scala:235)
[INFO] at scala.tools.nsc.symtab.SymbolLoaders$PackageLoader.doComplete(SymbolLoaders.scala:260)
[INFO] at scala.tools.nsc.symtab.SymbolLoaders$SymbolLoader.complete(SymbolLoaders.scala:211)
[INFO] at scala.reflect.internal.Symbols$Symbol.info(Symbols.scala:1535)
[INFO] at scala.reflect.internal.Mirrors$RootsBase.init(Mirrors.scala:256)
[INFO] at scala.tools.nsc.Global.rootMirror$lzycompute(Global.scala:73)
[INFO] at scala.tools.nsc.Global.rootMirror(Global.scala:71)
[INFO] at scala.tools.nsc.Global.rootMirror(Global.scala:39)
[INFO] at scala.reflect.internal.Definitions$DefinitionsClass.ObjectClass$lzycompute(Definitions.scala:257)
[INFO] at scala.reflect.internal.Definitions$DefinitionsClass.ObjectClass(Definitions.scala:257)
[INFO] at scala.reflect.internal.Definitions$DefinitionsClass.init(Definitions.scala:1390)
[INFO] at scala.tools.nsc.Global$Run.<init>(Global.scala:1242)
[INFO] at scala.tools.nsc.Driver.doCompile(Driver.scala:31)
[INFO] at scala.tools.nsc.MainClass.doCompile(Main.scala:23)
[INFO] at scala.tools.nsc.Driver.process(Driver.scala:51)
[INFO] at scala.tools.nsc.Driver.main(Driver.scala:64)
[INFO] at scala.tools.nsc.Main.main(Main.scala)
[INFO] ... 6 more
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] force-shading ...................................... SUCCESS [ 1.710 s]
[INFO] flink .............................................. SUCCESS [ 2.077 s]
[INFO] flink-annotations .................................. SUCCESS [ 1.585 s]
[INFO] flink-shaded-hadoop ................................ SUCCESS [ 0.149 s]
[INFO] flink-shaded-hadoop2 ............................... SUCCESS [ 11.693 s]
[INFO] flink-shaded-hadoop2-uber .......................... SUCCESS [ 11.371 s]
[INFO] flink-shaded-yarn-tests ............................ SUCCESS [ 11.810 s]
[INFO] flink-shaded-curator ............................... SUCCESS [ 0.827 s]
[INFO] flink-test-utils-parent ............................ SUCCESS [ 0.117 s]
[INFO] flink-test-utils-junit ............................. SUCCESS [ 1.006 s]
[INFO] flink-metrics ...................................... SUCCESS [ 0.127 s]
[INFO] flink-metrics-core ................................. SUCCESS [ 0.691 s]
[INFO] flink-core ......................................... SUCCESS [ 43.554 s]
[INFO] flink-java ......................................... SUCCESS [ 7.657 s]
[INFO] flink-queryable-state .............................. SUCCESS [ 0.098 s]
[INFO] flink-queryable-state-client-java .................. SUCCESS [ 1.083 s]
[INFO] flink-filesystems .................................. SUCCESS [ 0.131 s]
[INFO] flink-hadoop-fs .................................... SUCCESS [ 1.078 s]
[INFO] flink-runtime ...................................... FAILURE [01:10 min]
info below are some Tests SKIP and the picture below
I have upload error information on this, hoping that I can get answer soon!
BUILD FAILURE
I have post the most of error message(stackoverflow does not allow post too much code)
– David Chan
Aug 10 at 6:38
Which java version do you use David Chan? The only version supported by flink right now is 8.
– Dawid Wysakowicz
Aug 14 at 14:35
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
Please post the full error message as text (and not as image). There should be more error above the
BUILD FAILURE
line.– Fabian Hueske
Aug 9 at 9:07