getodk / aggregate

ODK Aggregate is a Java server that stores, analyzes, and presents survey data collected using ODK Collect. Contribute and make the world a better place! ✨🗄✨
https://docs.opendatakit.org/aggregate-intro/
Other
74 stars 228 forks source link

Could not determine java version from '11.0.10' (after running `./gradlew appRunWar` command) #505

Open jaballogian opened 3 years ago

jaballogian commented 3 years ago

Software and hardware versions

OS: Ubuntu 18.04.5 LTS Java version: 11.0.10 Tomcat version: 9.0.44 PostgreSQL version: 10.16 MySQL version: 5.7.33 Git LFS version: 2.13.2 Docker version: 20.10.5 Docker Compose version: 1.28.5

Problem description

Could not determine java version from '11.0.10' (after running ./gradlew appRunWar command)

Steps to reproduce the problem

  1. I followed this documentation https://github.com/getodk/aggregate to install ODK Aggregate on a private server. Everything was fine until this section https://github.com/getodk/aggregate#building-and-running-the-project.

  2. I ran ./gradlew appRunWar command inside the aggregate folder and the following error appeared.

    
    user@ip:~/aggregate$ ./gradlew appRunWar

FAILURE: Build failed with an exception.

  1. I found this link https://stackoverflow.com/questions/54358107/gradle-could-not-determine-java-version-from-11-0-2 then I changed the gradle distribution url to version 5.4.1

    user@ip:~/aggregate$ cd gradle/
    user@ip:~/aggregate/gradle$ ls
    wrapper
    user@ip:~/aggregate/gradle$ cd wrapper/
    user@ip:~/aggregate/gradle/wrapper$ ls
    gradle-wrapper.jar  gradle-wrapper.properties
    user@ip:~/aggregate/gradle/wrapper$ sudo nano gradle-wrapper.properties

    Before (original from ODK Aggregate repository):

    distributionBase=GRADLE_USER_HOME
    distributionPath=wrapper/dists
    zipStoreBase=GRADLE_USER_HOME
    zipStorePath=wrapper/dists
    distributionUrl=https\://services.gradle.org/distributions/gradle-4.5.1-all.zip

    After:

    distributionBase=GRADLE_USER_HOME
    distributionPath=wrapper/dists
    zipStoreBase=GRADLE_USER_HOME
    zipStorePath=wrapper/dists
    distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
  2. I ran again ./gradlew appRunWar command then another error (A problem occurred configuring root project 'aggregate'.) appeared.

    
    user@ip:~/aggregate$ ./gradlew appRunWar
    Downloading https://services.gradle.org/distributions/gradle-5.4.1-all.zip
    ..............................................................................................................................
    Unzipping /home/user/.gradle/wrapper/dists/gradle-5.4.1-all/3221gyojl5jsh0helicew7rwx/gradle-5.4.1-all.zip to /home/user/.gradle/wrapper/dists/gradle-5.4.1-all/3221gyojl5jsh0helicew7rwx
    Set executable permissions for: /home/user/.gradle/wrapper/dists/gradle-5.4.1-all/3221gyojl5jsh0helicew7rwx/gradle-5.4.1/bin/gradle

Welcome to Gradle 5.4.1!

Here are the highlights of this release:

For more details see https://docs.gradle.org/5.4.1/release-notes.html

Starting a Gradle Daemon (subsequent builds will be faster)

FAILURE: Build failed with an exception.

BUILD FAILED in 27s



#### Expected behavior
The ODK Aggregate server is running on `<my_private_ip_address>:8080`.

#### Other information
I have a hypothesis (ODK Aggregate server must use Java version 8 to run). Is it correct?