Cause: Unable to find a javac compiler


(khinester) #1

Hello,
I have just setup a test AWS server and have cloned elesticsearch.

$ cd packages
$ git clone git://github.com/elasticsearch/elasticsearch.git && cd
elasticsearch
$ ./gradlew --debug release

...

12:55:53.968 [DEBUG]
[org.gradle.api.internal.project.ant.AntLoggingAdapter] fileset: Setup
scanner in dir /home/ec2-user/packages/elasticsearch/modules/test/
testng/src/main/java with patternSet{ includes: [] excludes: [] }
12:55:53.989 [DEBUG]
[org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter]
Finished executing task ':test-testng:compileJava'
12:55:54.005 [ERROR] [org.gradle.BuildExceptionReporter]
12:55:54.007 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE:
Build failed with an exception.
12:55:54.010 [ERROR] [org.gradle.BuildExceptionReporter]
12:55:54.010 [ERROR] [org.gradle.BuildExceptionReporter] * What went
wrong:
12:55:54.011 [ERROR] [org.gradle.BuildExceptionReporter] Execution
failed for task ':test-testng:compileJava'.
12:55:54.014 [ERROR] [org.gradle.BuildExceptionReporter] Cause: Unable
to find a javac compiler;
12:55:54.014 [ERROR] [org.gradle.BuildExceptionReporter]
com.sun.tools.javac.Main is not on the classpath.
12:55:54.015 [ERROR] [org.gradle.BuildExceptionReporter] Perhaps
JAVA_HOME does not point to the JDK.
12:55:54.017 [ERROR] [org.gradle.BuildExceptionReporter] It is
currently set to "/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre"
12:55:54.017 [ERROR] [org.gradle.BuildExceptionReporter]
12:55:54.022 [ERROR] [org.gradle.BuildExceptionReporter] * Exception
is:
12:55:54.023 [ERROR] [org.gradle.BuildExceptionReporter]
org.gradle.api.tasks.TaskExecutionException: Execution failed for task
':test-testng:compileJava'.
12:55:54.023 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:
71)
12:55:54.024 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:
48)
12:55:54.024 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:
34)
12:55:54.031 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:
55)
12:55:54.032 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:
57)
12:55:54.032 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:
41)
12:55:54.032 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:
51)
12:55:54.033 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:
52)
12:55:54.036 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:
42)
12:55:54.036 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.api.internal.AbstractTask.execute(AbstractTask.java:237)
12:55:54.037 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.execution.DefaultTaskGraphExecuter.executeTask(DefaultTaskGraphExecuter.java:
167)
12:55:54.037 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.execution.DefaultTaskGraphExecuter.doExecute(DefaultTaskGraphExecuter.java:
160)
12:55:54.040 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.execution.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:
78)
12:55:54.040 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.execution.TaskNameResolvingBuildExecuter.execute(TaskNameResolvingBuildExecuter.java:
113)
12:55:54.041 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.execution.DelegatingBuildExecuter.execute(DelegatingBuildExecuter.java:
54)
12:55:54.041 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:
158)
12:55:54.042 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:
112)
12:55:54.042 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:
80)
12:55:54.045 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.launcher.RunBuildAction.execute(RunBuildAction.java:41)
12:55:54.045 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.launcher.RunBuildAction.execute(RunBuildAction.java:27)
12:55:54.046 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.launcher.ExceptionReportingAction.execute(ExceptionReportingAction.java:
32)
12:55:54.046 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.launcher.ExceptionReportingAction.execute(ExceptionReportingAction.java:
21)
12:55:54.049 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.launcher.CommandLineActionFactory
$WithLoggingAction.execute(CommandLineActionFactory.java:219)
12:55:54.050 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.launcher.CommandLineActionFactory
$WithLoggingAction.execute(CommandLineActionFactory.java:203)
12:55:54.050 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.launcher.Main.execute(Main.java:55)
12:55:54.051 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.launcher.Main.main(Main.java:40)
12:55:54.051 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.launcher.ProcessBootstrap.runNoExit(ProcessBootstrap.java:
46)
12:55:54.051 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.launcher.ProcessBootstrap.run(ProcessBootstrap.java:28)
12:55:54.052 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.launcher.GradleMain.main(GradleMain.java:24)
12:55:54.052 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:
33)
12:55:54.058 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.wrapper.Wrapper.execute(Wrapper.java:87)
12:55:54.059 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:37)
12:55:54.059 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: :
Unable to find a javac compiler;
12:55:54.059 [ERROR] [org.gradle.BuildExceptionReporter]
com.sun.tools.javac.Main is not on the classpath.
12:55:54.060 [ERROR] [org.gradle.BuildExceptionReporter] Perhaps
JAVA_HOME does not point to the JDK.
12:55:54.060 [ERROR] [org.gradle.BuildExceptionReporter] It is
currently set to "/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre"
12:55:54.060 [ERROR] [org.gradle.BuildExceptionReporter] at
org.apache.tools.ant.taskdefs.compilers.CompilerAdapterFactory.getCompiler(CompilerAdapterFactory.java:
128)
12:55:54.061 [ERROR] [org.gradle.BuildExceptionReporter] at
org.apache.tools.ant.taskdefs.Javac.findSupportedFileExtensions(Javac.java:
961)
12:55:54.061 [ERROR] [org.gradle.BuildExceptionReporter] at
org.apache.tools.ant.taskdefs.Javac.scanDir(Javac.java:938)
12:55:54.067 [ERROR] [org.gradle.BuildExceptionReporter] at
org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:909)
12:55:54.068 [ERROR] [org.gradle.BuildExceptionReporter] at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
12:55:54.068 [ERROR] [org.gradle.BuildExceptionReporter] at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:
106)
12:55:54.069 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.api.internal.project.ant.BasicAntBuilder.nodeCompleted(BasicAntBuilder.java:
71)
12:55:54.069 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.api.internal.project.ant.BasicAntBuilder.doInvokeMethod(BasicAntBuilder.java:
86)
12:55:54.069 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.api.internal.project.DefaultAntBuilder.super
$3$invokeMethod(DefaultAntBuilder.groovy)
12:55:54.070 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.api.internal.project.DefaultAntBuilder.invokeMethod(DefaultAntBuilder.groovy:
37)
12:55:54.070 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.api.internal.tasks.compile.AntJavaCompiler.execute(AntJavaCompiler.groovy:
64)
12:55:54.070 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.api.internal.tasks.compile.IncrementalJavaSourceCompiler.execute(IncrementalJavaSourceCompiler.java:
73)
12:55:54.071 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.api.tasks.compile.Compile.compile(Compile.java:55)
12:55:54.071 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.api.internal.BeanDynamicObject.invokeMethod(BeanDynamicObject.java:
158)
12:55:54.077 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.api.internal.CompositeDynamicObject.invokeMethod(CompositeDynamicObject.java:
93)
12:55:54.078 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.api.tasks.compile.Compile_Decorated.invokeMethod(Unknown
Source)
12:55:54.078 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.util.ReflectionUtil.invoke(ReflectionUtil.groovy:23)
12:55:54.079 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory
$2.execute(AnnotationProcessingTaskFactory.java:129)
12:55:54.079 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory
$2.execute(AnnotationProcessingTaskFactory.java:127)
12:55:54.079 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:
63)
12:55:54.080 [ERROR] [org.gradle.BuildExceptionReporter] ... 31 more
12:55:54.080 [ERROR] [org.gradle.BuildExceptionReporter]
12:55:54.087 [LIFECYCLE] [org.gradle.BuildResultLogger]
12:55:54.087 [LIFECYCLE] [org.gradle.BuildResultLogger] BUILD FAILED
12:55:54.088 [LIFECYCLE] [org.gradle.BuildResultLogger]
12:55:54.088 [LIFECYCLE] [org.gradle.BuildResultLogger] Total time: 1
mins 45.891 secs

$ java -version
java version "1.6.0_20"
OpenJDK Runtime Environment (IcedTea6 1.9.8) (amazon-52.1.9.8.36.amzn1-
x86_64)
OpenJDK 64-Bit Server VM (build 19.0-b09, mixed mode)

$ echo $JAVA_HOME
/usr/lib/jvm/jre

Any advise much appreciated.


(Shay Banon) #2

In order to build elasticsearch, you need the JDK (Java Development Kit),
not a JRE (the Java Runtime). Instead of building it, why not just download
an official release?

On Tue, Oct 4, 2011 at 3:14 PM, khinester norman.khine@gmail.com wrote:

Hello,
I have just setup a test AWS server and have cloned elesticsearch.

$ cd packages
$ git clone git://github.com/elasticsearch/elasticsearch.git && cd
elasticsearch
$ ./gradlew --debug release

...

12:55:53.968 [DEBUG]
[org.gradle.api.internal.project.ant.AntLoggingAdapter] fileset: Setup
scanner in dir /home/ec2-user/packages/elasticsearch/modules/test/
testng/src/main/java with patternSet{ includes: [] excludes: [] }
12:55:53.989 [DEBUG]
[org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter]
Finished executing task ':test-testng:compileJava'
12:55:54.005 [ERROR] [org.gradle.BuildExceptionReporter]
12:55:54.007 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE:
Build failed with an exception.
12:55:54.010 [ERROR] [org.gradle.BuildExceptionReporter]
12:55:54.010 [ERROR] [org.gradle.BuildExceptionReporter] * What went
wrong:
12:55:54.011 [ERROR] [org.gradle.BuildExceptionReporter] Execution
failed for task ':test-testng:compileJava'.
12:55:54.014 [ERROR] [org.gradle.BuildExceptionReporter] Cause: Unable
to find a javac compiler;
12:55:54.014 [ERROR] [org.gradle.BuildExceptionReporter]
com.sun.tools.javac.Main is not on the classpath.
12:55:54.015 [ERROR] [org.gradle.BuildExceptionReporter] Perhaps
JAVA_HOME does not point to the JDK.
12:55:54.017 [ERROR] [org.gradle.BuildExceptionReporter] It is
currently set to "/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre"
12:55:54.017 [ERROR] [org.gradle.BuildExceptionReporter]
12:55:54.022 [ERROR] [org.gradle.BuildExceptionReporter] * Exception
is:
12:55:54.023 [ERROR] [org.gradle.BuildExceptionReporter]
org.gradle.api.tasks.TaskExecutionException: Execution failed for task
':test-testng:compileJava'.
12:55:54.023 [ERROR] [org.gradle.BuildExceptionReporter] at

org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:
71)
12:55:54.024 [ERROR] [org.gradle.BuildExceptionReporter] at

org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:
48)
12:55:54.024 [ERROR] [org.gradle.BuildExceptionReporter] at

org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:
34)
12:55:54.031 [ERROR] [org.gradle.BuildExceptionReporter] at

org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:
55)
12:55:54.032 [ERROR] [org.gradle.BuildExceptionReporter] at

org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:
57)
12:55:54.032 [ERROR] [org.gradle.BuildExceptionReporter] at

org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:
41)
12:55:54.032 [ERROR] [org.gradle.BuildExceptionReporter] at

org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:
51)
12:55:54.033 [ERROR] [org.gradle.BuildExceptionReporter] at

org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:
52)
12:55:54.036 [ERROR] [org.gradle.BuildExceptionReporter] at

org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:
42)
12:55:54.036 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.api.internal.AbstractTask.execute(AbstractTask.java:237)
12:55:54.037 [ERROR] [org.gradle.BuildExceptionReporter] at

org.gradle.execution.DefaultTaskGraphExecuter.executeTask(DefaultTaskGraphExecuter.java:
167)
12:55:54.037 [ERROR] [org.gradle.BuildExceptionReporter] at

org.gradle.execution.DefaultTaskGraphExecuter.doExecute(DefaultTaskGraphExecuter.java:
160)
12:55:54.040 [ERROR] [org.gradle.BuildExceptionReporter] at

org.gradle.execution.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:
78)
12:55:54.040 [ERROR] [org.gradle.BuildExceptionReporter] at

org.gradle.execution.TaskNameResolvingBuildExecuter.execute(TaskNameResolvingBuildExecuter.java:
113)
12:55:54.041 [ERROR] [org.gradle.BuildExceptionReporter] at

org.gradle.execution.DelegatingBuildExecuter.execute(DelegatingBuildExecuter.java:
54)
12:55:54.041 [ERROR] [org.gradle.BuildExceptionReporter] at

org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:
158)
12:55:54.042 [ERROR] [org.gradle.BuildExceptionReporter] at

org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:
112)
12:55:54.042 [ERROR] [org.gradle.BuildExceptionReporter] at

org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:
80)
12:55:54.045 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.launcher.RunBuildAction.execute(RunBuildAction.java:41)
12:55:54.045 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.launcher.RunBuildAction.execute(RunBuildAction.java:27)
12:55:54.046 [ERROR] [org.gradle.BuildExceptionReporter] at

org.gradle.launcher.ExceptionReportingAction.execute(ExceptionReportingAction.java:
32)
12:55:54.046 [ERROR] [org.gradle.BuildExceptionReporter] at

org.gradle.launcher.ExceptionReportingAction.execute(ExceptionReportingAction.java:
21)
12:55:54.049 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.launcher.CommandLineActionFactory
$WithLoggingAction.execute(CommandLineActionFactory.java:219)
12:55:54.050 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.launcher.CommandLineActionFactory
$WithLoggingAction.execute(CommandLineActionFactory.java:203)
12:55:54.050 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.launcher.Main.execute(Main.java:55)
12:55:54.051 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.launcher.Main.main(Main.java:40)
12:55:54.051 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.launcher.ProcessBootstrap.runNoExit(ProcessBootstrap.java:
46)
12:55:54.051 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.launcher.ProcessBootstrap.run(ProcessBootstrap.java:28)
12:55:54.052 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.launcher.GradleMain.main(GradleMain.java:24)
12:55:54.052 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:
33)
12:55:54.058 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.wrapper.Wrapper.execute(Wrapper.java:87)
12:55:54.059 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:37)
12:55:54.059 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: :
Unable to find a javac compiler;
12:55:54.059 [ERROR] [org.gradle.BuildExceptionReporter]
com.sun.tools.javac.Main is not on the classpath.
12:55:54.060 [ERROR] [org.gradle.BuildExceptionReporter] Perhaps
JAVA_HOME does not point to the JDK.
12:55:54.060 [ERROR] [org.gradle.BuildExceptionReporter] It is
currently set to "/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre"
12:55:54.060 [ERROR] [org.gradle.BuildExceptionReporter] at

org.apache.tools.ant.taskdefs.compilers.CompilerAdapterFactory.getCompiler(CompilerAdapterFactory.java:
128)
12:55:54.061 [ERROR] [org.gradle.BuildExceptionReporter] at
org.apache.tools.ant.taskdefs.Javac.findSupportedFileExtensions(Javac.java:
961)
12:55:54.061 [ERROR] [org.gradle.BuildExceptionReporter] at
org.apache.tools.ant.taskdefs.Javac.scanDir(Javac.java:938)
12:55:54.067 [ERROR] [org.gradle.BuildExceptionReporter] at
org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:909)
12:55:54.068 [ERROR] [org.gradle.BuildExceptionReporter] at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
12:55:54.068 [ERROR] [org.gradle.BuildExceptionReporter] at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:
106)
12:55:54.069 [ERROR] [org.gradle.BuildExceptionReporter] at

org.gradle.api.internal.project.ant.BasicAntBuilder.nodeCompleted(BasicAntBuilder.java:
71)
12:55:54.069 [ERROR] [org.gradle.BuildExceptionReporter] at

org.gradle.api.internal.project.ant.BasicAntBuilder.doInvokeMethod(BasicAntBuilder.java:
86)
12:55:54.069 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.api.internal.project.DefaultAntBuilder.super
$3$invokeMethod(DefaultAntBuilder.groovy)
12:55:54.070 [ERROR] [org.gradle.BuildExceptionReporter] at

org.gradle.api.internal.project.DefaultAntBuilder.invokeMethod(DefaultAntBuilder.groovy:
37)
12:55:54.070 [ERROR] [org.gradle.BuildExceptionReporter] at

org.gradle.api.internal.tasks.compile.AntJavaCompiler.execute(AntJavaCompiler.groovy:
64)
12:55:54.070 [ERROR] [org.gradle.BuildExceptionReporter] at

org.gradle.api.internal.tasks.compile.IncrementalJavaSourceCompiler.execute(IncrementalJavaSourceCompiler.java:
73)
12:55:54.071 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.api.tasks.compile.Compile.compile(Compile.java:55)
12:55:54.071 [ERROR] [org.gradle.BuildExceptionReporter] at

org.gradle.api.internal.BeanDynamicObject.invokeMethod(BeanDynamicObject.java:
158)
12:55:54.077 [ERROR] [org.gradle.BuildExceptionReporter] at

org.gradle.api.internal.CompositeDynamicObject.invokeMethod(CompositeDynamicObject.java:
93)
12:55:54.078 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.api.tasks.compile.Compile_Decorated.invokeMethod(Unknown
Source)
12:55:54.078 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.util.ReflectionUtil.invoke(ReflectionUtil.groovy:23)
12:55:54.079 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory
$2.execute(AnnotationProcessingTaskFactory.java:129)
12:55:54.079 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory
$2.execute(AnnotationProcessingTaskFactory.java:127)
12:55:54.079 [ERROR] [org.gradle.BuildExceptionReporter] at

org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:
63)
12:55:54.080 [ERROR] [org.gradle.BuildExceptionReporter] ... 31 more
12:55:54.080 [ERROR] [org.gradle.BuildExceptionReporter]
12:55:54.087 [LIFECYCLE] [org.gradle.BuildResultLogger]
12:55:54.087 [LIFECYCLE] [org.gradle.BuildResultLogger] BUILD FAILED
12:55:54.088 [LIFECYCLE] [org.gradle.BuildResultLogger]
12:55:54.088 [LIFECYCLE] [org.gradle.BuildResultLogger] Total time: 1
mins 45.891 secs

$ java -version
java version "1.6.0_20"
OpenJDK Runtime Environment (IcedTea6 1.9.8) (amazon-52.1.9.8.36.amzn1-
x86_64)
OpenJDK 64-Bit Server VM (build 19.0-b09, mixed mode)

$ echo $JAVA_HOME
/usr/lib/jvm/jre

Any advise much appreciated.


(David Pilato) #3

Instead of building it, why not just download an official release?

"If you build it, he will come !", Field of Dreams, 1989

David :wink:

Le 4 oct. 2011 à 16:05, Shay Banon kimchy@gmail.com a écrit :

In order to build elasticsearch, you need the JDK (Java Development Kit), not a JRE (the Java Runtime). Instead of building it, why not just download an official release?

On Tue, Oct 4, 2011 at 3:14 PM, khinester norman.khine@gmail.com wrote:
Hello,
I have just setup a test AWS server and have cloned elesticsearch.

$ cd packages
$ git clone git://github.com/elasticsearch/elasticsearch.git && cd
elasticsearch
$ ./gradlew --debug release

...

12:55:53.968 [DEBUG]
[org.gradle.api.internal.project.ant.AntLoggingAdapter] fileset: Setup
scanner in dir /home/ec2-user/packages/elasticsearch/modules/test/
testng/src/main/java with patternSet{ includes: [] excludes: [] }
12:55:53.989 [DEBUG]
[org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter]
Finished executing task ':test-testng:compileJava'
12:55:54.005 [ERROR] [org.gradle.BuildExceptionReporter]
12:55:54.007 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE:
Build failed with an exception.
12:55:54.010 [ERROR] [org.gradle.BuildExceptionReporter]
12:55:54.010 [ERROR] [org.gradle.BuildExceptionReporter] * What went
wrong:
12:55:54.011 [ERROR] [org.gradle.BuildExceptionReporter] Execution
failed for task ':test-testng:compileJava'.
12:55:54.014 [ERROR] [org.gradle.BuildExceptionReporter] Cause: Unable
to find a javac compiler;
12:55:54.014 [ERROR] [org.gradle.BuildExceptionReporter]
com.sun.tools.javac.Main is not on the classpath.
12:55:54.015 [ERROR] [org.gradle.BuildExceptionReporter] Perhaps
JAVA_HOME does not point to the JDK.
12:55:54.017 [ERROR] [org.gradle.BuildExceptionReporter] It is
currently set to "/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre"
12:55:54.017 [ERROR] [org.gradle.BuildExceptionReporter]
12:55:54.022 [ERROR] [org.gradle.BuildExceptionReporter] * Exception
is:
12:55:54.023 [ERROR] [org.gradle.BuildExceptionReporter]
org.gradle.api.tasks.TaskExecutionException: Execution failed for task
':test-testng:compileJava'.
12:55:54.023 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:
71)
12:55:54.024 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:
48)
12:55:54.024 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:
34)
12:55:54.031 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:
55)
12:55:54.032 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:
57)
12:55:54.032 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:
41)
12:55:54.032 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:
51)
12:55:54.033 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:
52)
12:55:54.036 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:
42)
12:55:54.036 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.api.internal.AbstractTask.execute(AbstractTask.java:237)
12:55:54.037 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.execution.DefaultTaskGraphExecuter.executeTask(DefaultTaskGraphExecuter.java:
167)
12:55:54.037 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.execution.DefaultTaskGraphExecuter.doExecute(DefaultTaskGraphExecuter.java:
160)
12:55:54.040 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.execution.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:
78)
12:55:54.040 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.execution.TaskNameResolvingBuildExecuter.execute(TaskNameResolvingBuildExecuter.java:
113)
12:55:54.041 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.execution.DelegatingBuildExecuter.execute(DelegatingBuildExecuter.java:
54)
12:55:54.041 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:
158)
12:55:54.042 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:
112)
12:55:54.042 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:
80)
12:55:54.045 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.launcher.RunBuildAction.execute(RunBuildAction.java:41)
12:55:54.045 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.launcher.RunBuildAction.execute(RunBuildAction.java:27)
12:55:54.046 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.launcher.ExceptionReportingAction.execute(ExceptionReportingAction.java:
32)
12:55:54.046 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.launcher.ExceptionReportingAction.execute(ExceptionReportingAction.java:
21)
12:55:54.049 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.launcher.CommandLineActionFactory
$WithLoggingAction.execute(CommandLineActionFactory.java:219)
12:55:54.050 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.launcher.CommandLineActionFactory
$WithLoggingAction.execute(CommandLineActionFactory.java:203)
12:55:54.050 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.launcher.Main.execute(Main.java:55)
12:55:54.051 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.launcher.Main.main(Main.java:40)
12:55:54.051 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.launcher.ProcessBootstrap.runNoExit(ProcessBootstrap.java:
46)
12:55:54.051 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.launcher.ProcessBootstrap.run(ProcessBootstrap.java:28)
12:55:54.052 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.launcher.GradleMain.main(GradleMain.java:24)
12:55:54.052 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:
33)
12:55:54.058 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.wrapper.Wrapper.execute(Wrapper.java:87)
12:55:54.059 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:37)
12:55:54.059 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: :
Unable to find a javac compiler;
12:55:54.059 [ERROR] [org.gradle.BuildExceptionReporter]
com.sun.tools.javac.Main is not on the classpath.
12:55:54.060 [ERROR] [org.gradle.BuildExceptionReporter] Perhaps
JAVA_HOME does not point to the JDK.
12:55:54.060 [ERROR] [org.gradle.BuildExceptionReporter] It is
currently set to "/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre"
12:55:54.060 [ERROR] [org.gradle.BuildExceptionReporter] at
org.apache.tools.ant.taskdefs.compilers.CompilerAdapterFactory.getCompiler(CompilerAdapterFactory.java:
128)
12:55:54.061 [ERROR] [org.gradle.BuildExceptionReporter] at
org.apache.tools.ant.taskdefs.Javac.findSupportedFileExtensions(Javac.java:
961)
12:55:54.061 [ERROR] [org.gradle.BuildExceptionReporter] at
org.apache.tools.ant.taskdefs.Javac.scanDir(Javac.java:938)
12:55:54.067 [ERROR] [org.gradle.BuildExceptionReporter] at
org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:909)
12:55:54.068 [ERROR] [org.gradle.BuildExceptionReporter] at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
12:55:54.068 [ERROR] [org.gradle.BuildExceptionReporter] at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:
106)
12:55:54.069 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.api.internal.project.ant.BasicAntBuilder.nodeCompleted(BasicAntBuilder.java:
71)
12:55:54.069 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.api.internal.project.ant.BasicAntBuilder.doInvokeMethod(BasicAntBuilder.java:
86)
12:55:54.069 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.api.internal.project.DefaultAntBuilder.super
$3$invokeMethod(DefaultAntBuilder.groovy)
12:55:54.070 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.api.internal.project.DefaultAntBuilder.invokeMethod(DefaultAntBuilder.groovy:
37)
12:55:54.070 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.api.internal.tasks.compile.AntJavaCompiler.execute(AntJavaCompiler.groovy:
64)
12:55:54.070 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.api.internal.tasks.compile.IncrementalJavaSourceCompiler.execute(IncrementalJavaSourceCompiler.java:
73)
12:55:54.071 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.api.tasks.compile.Compile.compile(Compile.java:55)
12:55:54.071 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.api.internal.BeanDynamicObject.invokeMethod(BeanDynamicObject.java:
158)
12:55:54.077 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.api.internal.CompositeDynamicObject.invokeMethod(CompositeDynamicObject.java:
93)
12:55:54.078 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.api.tasks.compile.Compile_Decorated.invokeMethod(Unknown
Source)
12:55:54.078 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.util.ReflectionUtil.invoke(ReflectionUtil.groovy:23)
12:55:54.079 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory
$2.execute(AnnotationProcessingTaskFactory.java:129)
12:55:54.079 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory
$2.execute(AnnotationProcessingTaskFactory.java:127)
12:55:54.079 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:
63)
12:55:54.080 [ERROR] [org.gradle.BuildExceptionReporter] ... 31 more
12:55:54.080 [ERROR] [org.gradle.BuildExceptionReporter]
12:55:54.087 [LIFECYCLE] [org.gradle.BuildResultLogger]
12:55:54.087 [LIFECYCLE] [org.gradle.BuildResultLogger] BUILD FAILED
12:55:54.088 [LIFECYCLE] [org.gradle.BuildResultLogger]
12:55:54.088 [LIFECYCLE] [org.gradle.BuildResultLogger] Total time: 1
mins 45.891 secs

$ java -version
java version "1.6.0_20"
OpenJDK Runtime Environment (IcedTea6 1.9.8) (amazon-52.1.9.8.36.amzn1-
x86_64)
OpenJDK 64-Bit Server VM (build 19.0-b09, mixed mode)

$ echo $JAVA_HOME
/usr/lib/jvm/jre

Any advise much appreciated.


(system) #4