Error installing GRAKN on AWS Linux EC2



I get the following errors when I run “mvn package -DskipTests” on an AWS EC2 Linux (not Ubuntu) instance.

As my application, already running on this instance, is a nodejs one, I already have:

# node --version


# npm --version


I installed maven and yarn as follows:

# wget ...epel-apache-maven.repo -O /etc/yum.repos.d/epel-apache-maven.repo
# sed -i s/\$releasever/6/g /etc/yum.repos.d/epel-apache-maven.repo
# yum install -y apache-maven
# mvn --version

Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T16:41:47+00:00)
Maven home: /usr/share/apache-maven
Java version: 1.7.0_151, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-1.7.0-openjdk-
Default locale: en_US, platform encoding: UTF-8
OS name: “linux”, version: “4.9.62-21.56.amzn1.x86_64”, arch: “amd64”, family: “unix”

# npm install -g yarn
# yarn --version


# cd /usr/local/share
# git clone ...grakn.git
# cd grakn
# mvn package -DskipTests

[INFO] Scanning for projects…
[INFO] Inspecting build with total of 24 modules…
[INFO] Installing Nexus Staging features:
[INFO] … total of 24 executions of maven-deploy-plugin replaced with nexus-staging-maven-plugin
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO] Grakn
[INFO] grakn-core
[INFO] grakn-kb
[INFO] grakn-test-tools
[INFO] grakn-test-profiles
[INFO] grakn-graql
[INFO] grakn-client
[INFO] grakn-graql-shell
[INFO] grakn-module-sdk
[INFO] grakn-engine
[INFO] grakn-dashboard
[INFO] grakn-migration
[INFO] migration-base
[INFO] migration-csv
[INFO] migration-json
[INFO] migration-export
[INFO] migration-sql
[INFO] migration-xml
[INFO] grakn-factory
[INFO] janus-factory
[INFO] grakn-dist
[INFO] grakn-test
[INFO] test-integration
[INFO] test-snb
[INFO] ------------------------------------------------------------------------
[INFO] Building Grakn 1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] — maven-checkstyle-plugin:2.17:check (validate) @ grakn —
[INFO] Starting audit…
Audit done.
[INFO] — jacoco-maven-plugin: (prepare-agent) @ grakn —
[INFO] argLine set to -javaagent:/root/.m2/repository/org/jacoco/org.jacoco.agent/,excludes=/antlr/
[INFO] — jacoco-maven-plugin: (report) @ grakn —
[INFO] Skipping JaCoCo execution due to missing execution data file:/usr/local/share/grakn/target/jacoco.exec
[INFO] — maven-source-plugin:2.2.1:jar-no-fork (attach-sources) @ grakn —
[INFO] — maven-javadoc-plugin:2.10.4:jar (attach-javadocs) @ grakn —
[INFO] Not executing Javadoc as the project is not a Java classpath-capable package
[INFO] ------------------------------------------------------------------------
[INFO] Building grakn-core 1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: … (lots of downloads)
[INFO] — maven-checkstyle-plugin:2.17:check (validate) @ grakn-core —
[INFO] Starting audit…
Audit done.
[INFO] — jacoco-maven-plugin: (prepare-agent) @ grakn-core —
[INFO] argLine set to -javaagent:/root/.m2/repository/org/jacoco/org.jacoco.agent/,excludes=/antlr/
[INFO] — templating-maven-plugin:1.0.0:filter-sources (filtering-java-templates) @ grakn-core —
[INFO] Coping files with filtering to temporary directory.
[INFO] Using ‘UTF-8’ encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] No files needs to be copied to output directory. Up to date: /usr/local/share/grakn/grakn-core/target/generated-sources/java-templates
[INFO] Source directory: /usr/local/share/grakn/grakn-core/target/generated-sources/java-templates added.
[INFO] — maven-resources-plugin:2.6:resources (default-resources) @ grakn-core —
[INFO] Using ‘UTF-8’ encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /usr/local/share/grakn/grakn-core/src/main/resources
[INFO] — maven-compiler-plugin:3.5.1:compile (default-compile) @ grakn-core —
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 103 source files to /usr/local/share/grakn/grakn-core/target/classes
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] Grakn … SUCCESS [ 4.628 s]
[INFO] grakn-core … FAILURE [ 4.859 s]
[INFO] grakn-kb … SKIPPED
[INFO] grakn-test-tools … SKIPPED
[INFO] grakn-test-profiles … SKIPPED
[INFO] grakn-graql … SKIPPED
[INFO] grakn-client … SKIPPED
[INFO] grakn-graql-shell … SKIPPED
[INFO] grakn-module-sdk … SKIPPED
[INFO] grakn-engine … SKIPPED
[INFO] grakn-dashboard … SKIPPED
[INFO] grakn-migration … SKIPPED
[INFO] migration-base … SKIPPED
[INFO] migration-csv … SKIPPED
[INFO] migration-json … SKIPPED
[INFO] migration-export … SKIPPED
[INFO] migration-sql … SKIPPED
[INFO] migration-xml … SKIPPED
[INFO] grakn-factory … SKIPPED
[INFO] janus-factory … SKIPPED
[INFO] grakn-dist … SKIPPED
[INFO] grakn-test … SKIPPED
[INFO] test-integration … SKIPPED
[INFO] test-snb … SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 12.532 s
[INFO] Finished at: 2017-12-01T15:06:35+00:00
[INFO] Final Memory: 33M/79M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.5.1:compile (default-compile) on project grakn-core: Fatal error compiling: invalid target release: 1.8 -> [Help 1]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] …/MojoExecutionException
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn -rf :grakn-core

Can you help?


Colin Goldberg


Hi Colin,

I noticed your java version is 1.7, could you try upgrading to 1.8 and recompiling?