question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Execution failed for task ':compileJava'

See original GitHub issue

Rally version (get with esrally --version): esrally 0.4.1 Invoked command:

Configuration file (located in ~/.rally/rally.ini)): [meta] config.version = 6

[system] root.dir = /root/.rally/benchmarks log.root.dir = logs env.name = local

[source] local.src.dir = /root/.rally/benchmarks/src remote.repo.url = https://github.com/elastic/elasticsearch.git

[build] gradle.bin = /opt/app/gradle-2.13/bin/gradle

[provisioning] local.install.dir = install

[runtime] java8.home = /opt/app/jdk1.8.0_101

[benchmarks] local.dataset.cache = ${system:root.dir}/data

[reporting] datastore.type = in-memory datastore.host = datastore.port = datastore.secure = datastore.user = datastore.password =

[tracks] default.url = https://github.com/elastic/rally-tracks

[defaults] preserve_benchmark_candidate = False JVM version: jdk1.8.0_101 OS version: ubutn Description of the problem including expected versus actual behavior:

Steps to reproduce: 1.esrally 2. 3.

Provide logs (if relevant):

esrally.exceptions.BuildError: Executing ‘/opt/app/gradle-2.13/bin/gradle clean’ failed. Here are the last 20 lines in the build log file:

    :buildSrc:clean
    :buildSrc:compileJava/root/.rally/benchmarks/src/buildSrc/src/main/java/org/elasticsearch/test/NamingConventionsCheck.java:151: error: local variable skipTestsInDisguised is accessed from within inner class; needs to be declared final
                            if (skipTestsInDisguised == false && integTestClass.isAssignableFrom(clazz)) {
                                ^
    1 error
     FAILED

    FAILURE: Build failed with an exception.

    * What went wrong:
    Execution failed for task ':compileJava'.
    > Compilation failed; see the compiler error output for details.

    * Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

    BUILD FAILED

    Total time: 3.092 secs

The full build log is available at [/root/.rally/benchmarks/races/2016-09-21-08-56-55/local/logs/build/build.gradle.tasks.clean.log].

Describe the feature:

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
danielmitterdorfercommented, Sep 21, 2016

git -C ~/.rally/benchmarks/src rev-parse --short HEAD c97f4f3

This is the latest version on Github. It builds fine for me and also in our CI environment. However, I could reproduce the problem when using JDK 7 to build (but it should use JDK 8).

You can verify this by typing gradle -version. It should show something like this:

dm@io:master/elasticsearch ‹master›$ gradle -version

------------------------------------------------------------
Gradle 2.13
------------------------------------------------------------

Build time:   2016-04-25 04:10:10 UTC
Build number: none
Revision:     3b427b1481e46232107303c90be7b05079b05b1c

Groovy:       2.4.4
Ant:          Apache Ant(TM) version 1.9.6 compiled on June 29 2015
JVM:          1.8.0_102 (Oracle Corporation 25.102-b14)
OS:           Mac OS X 10.11.6 x86_64

The important line is: JVM: 1.8.0_102 (Oracle Corporation 25.102-b14) and I am almost sure it says JDK 1.7 for you. If that is the case, please have JAVA_HOME point to your JDK 8 installation. You can try this by issuing export JAVA_HOME=/opt/app/jdk1.8.0_101 prior to running Gradle (or Rally). To make this permanent you need to define the export in one of your shell startup files (e.g. ~/.bash_profile)

Another hint: If you are not interested in building Elasticsearch from sources, you can also benchmark official Elasticsearch distributions by issuing:

esrally --pipeline=from-distribution --distribution-version=5.0.0-alpha5

or even benchmark the latest snapshot build of Elasticsearch with:

esrally --pipeline=from-distribution --distribution-version=5.0.0-SNAPSHOT --distribution-repository=snapshot
0reactions
danielmitterdorfercommented, Sep 21, 2016

Sure, you’re welcome. 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Execution failed for task ':compileJava'. > invalid source release
a) Gradle itself is running with JDK 7. If you run gradle from within Eclipse using the STS gradle tooling, it will use...
Read more >
Execution failed for task ':compileJava'. #166 - GitHub
What went wrong: Execution failed for task ':compileJava'. Compilation failed; see the compiler error output for details. Try:
Read more >
Gradle task "compileJava" for new project fails - ForgeGradle
Executing task: gradle: build < > Configure project : Java: 16.0.2 JVM: ... What went wrong: Execution failed for task ':compileJava'.
Read more >
Task :compileJava FAILED - Help/Discuss - Gradle Forums
What went wrong: Execution failed for task ':compileJava'. > Compilation failed; see the compiler error output for details.
Read more >
Error:Gradle: Execution failed for task ':ios:compileJava ...
Error:Gradle: Execution failed for task ':ios:compileJava'. > invalid source release: 1.8. I downloaded and installed RoboVM 1.8 and MacOSX 10.10 and I'm ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found