org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':api:compileJava'.

GitHub | xuhao148 | 7 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Build failed on Fedora 24

    GitHub | 7 months ago | xuhao148
    org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':api:compileJava'.
  2. 0

    build error for ambry : Could not find tools.jar

    GitHub | 5 months ago | lzhang32
    org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':ambry-utils:compileJava'.
  3. 0

    Error w/ tools.jar

    GitHub | 10 months ago | KoolDude214
    org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':compileJava'.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    GitHub comment 14#231611026

    GitHub | 8 months ago | mhart
    java.lang.IllegalStateException: Could not find tools.jar. Please check that /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.77-0.b03.9.amzn1.x86_64/jre contains a valid JDK installation.

    1 unregistered visitors

    Root Cause Analysis

    1. java.lang.IllegalStateException

      Could not find tools.jar

      at org.gradle.internal.jvm.JdkTools.<init>()
    2. org.gradle.internal
      JdkTools.current
      1. org.gradle.internal.jvm.JdkTools.<init>(JdkTools.java:50)
      2. org.gradle.internal.jvm.JdkTools.current(JdkTools.java:41)
      2 frames
    3. org.gradle.api
      JavaCompile.compile
      1. org.gradle.api.internal.tasks.compile.JavaHomeBasedJavaCompilerFactory$SystemJavaCompilerFactory.create(JavaHomeBasedJavaCompilerFactory.java:77)
      2. org.gradle.api.internal.tasks.compile.JavaHomeBasedJavaCompilerFactory$SystemJavaCompilerFactory.create(JavaHomeBasedJavaCompilerFactory.java:75)
      3. org.gradle.api.internal.tasks.compile.JavaHomeBasedJavaCompilerFactory.findCompiler(JavaHomeBasedJavaCompilerFactory.java:57)
      4. org.gradle.api.internal.tasks.compile.JavaHomeBasedJavaCompilerFactory.create(JavaHomeBasedJavaCompilerFactory.java:44)
      5. org.gradle.api.internal.tasks.compile.JavaHomeBasedJavaCompilerFactory.create(JavaHomeBasedJavaCompilerFactory.java:28)
      6. org.gradle.api.internal.tasks.compile.JdkJavaCompiler.createCompileTask(JdkJavaCompiler.java:55)
      7. org.gradle.api.internal.tasks.compile.JdkJavaCompiler.execute(JdkJavaCompiler.java:44)
      8. org.gradle.api.internal.tasks.compile.JdkJavaCompiler.execute(JdkJavaCompiler.java:33)
      9. org.gradle.api.internal.tasks.compile.NormalizingJavaCompiler.delegateAndHandleErrors(NormalizingJavaCompiler.java:101)
      10. org.gradle.api.internal.tasks.compile.NormalizingJavaCompiler.execute(NormalizingJavaCompiler.java:50)
      11. org.gradle.api.internal.tasks.compile.NormalizingJavaCompiler.execute(NormalizingJavaCompiler.java:36)
      12. org.gradle.api.internal.tasks.compile.CleaningJavaCompilerSupport.execute(CleaningJavaCompilerSupport.java:34)
      13. org.gradle.api.internal.tasks.compile.CleaningJavaCompilerSupport.execute(CleaningJavaCompilerSupport.java:25)
      14. org.gradle.api.tasks.compile.JavaCompile.performCompilation(JavaCompile.java:157)
      15. org.gradle.api.tasks.compile.JavaCompile.compile(JavaCompile.java:137)
      16. org.gradle.api.tasks.compile.JavaCompile.compile(JavaCompile.java:91)
      16 frames
    4. org.gradle.internal
      JavaMethod.invoke
      1. org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:75)
      1 frame
    5. Gradle Core
      DefaultGradleLauncher.run
      1. org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$IncrementalTaskAction.doExecute(AnnotationProcessingTaskFactory.java:243)
      2. org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:219)
      3. org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$IncrementalTaskAction.execute(AnnotationProcessingTaskFactory.java:230)
      4. org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:208)
      5. org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
      6. org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
      7. org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
      8. org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35)
      9. org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:64)
      10. org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
      11. org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:42)
      12. org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
      13. org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)
      14. org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
      15. org.gradle.api.internal.AbstractTask.executeWithoutThrowingTaskFailure(AbstractTask.java:310)
      16. org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.executeTask(AbstractTaskPlanExecutor.java:79)
      17. org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:63)
      18. org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:51)
      19. org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:23)
      20. org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:88)
      21. org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:37)
      22. org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:62)
      23. org.gradle.execution.DefaultBuildExecuter.access$200(DefaultBuildExecuter.java:23)
      24. org.gradle.execution.DefaultBuildExecuter$2.proceed(DefaultBuildExecuter.java:68)
      25. org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)
      26. org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:62)
      27. org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:55)
      28. org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:149)
      29. org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:106)
      30. org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:86)
      30 frames
    6. Gradle Launcher
      RunBuildAction.run
      1. org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:90)
      2. org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:28)
      3. org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
      4. org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:41)
      5. org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:28)
      6. org.gradle.launcher.exec.DaemonUsageSuggestingBuildActionExecuter.execute(DaemonUsageSuggestingBuildActionExecuter.java:50)
      7. org.gradle.launcher.exec.DaemonUsageSuggestingBuildActionExecuter.execute(DaemonUsageSuggestingBuildActionExecuter.java:27)
      8. org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:40)
      8 frames
    7. Gradle Core
      Actions$RunnableActionAdapter.execute
      1. org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:169)
      1 frame
    8. Gradle Launcher
      GradleMain.main
      1. org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:237)
      2. org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:210)
      3. org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:35)
      4. org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:24)
      5. org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:206)
      6. org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:169)
      7. org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
      8. org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
      9. org.gradle.launcher.Main.doAction(Main.java:33)
      10. org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
      11. org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:54)
      12. org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:35)
      13. org.gradle.launcher.GradleMain.main(GradleMain.java:23)
      13 frames
    9. org.gradle.wrapper
      GradleWrapperMain.main
      1. org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:30)
      2. org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:127)
      3. org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:56)
      3 frames