1

Building Apache Ignite's latest release is failing with following error :

WARNING] Rule 0: org.apache.maven.plugins.enforcer.RequireJavaVersion failed with message:
[INFO] ------------------------------------------------------------------------
[ERROR] You are trying to compile Apache Ignite with inappropriate JDK version!
[ERROR] Detected JDK Version: pxa6480sr3fp12-20160919_01 (SR3 FP12)
[ERROR] JDK version should be 1.7.0-* or >= 1.8.0-u40.
[INFO] ------------------------------------------------------------------------

However when I check JDK version, I see I am using IBM JDK 1.8 which clearly meets JDK requirement mentioned in the documents.

[user@machine apache-ignite-1.9.0-src]$ /opt/ibm/java-x86_64-80/bin/java -version
java version "1.8.0"
Java(TM) SE Runtime Environment (build pxa6480sr3fp12-20160919_01(SR3 FP12))
IBM J9 VM (build 2.8, JRE 1.8.0 Linux amd64-64 Compressed References 20160915_318796 (JIT enabled, AOT enabled)
J9VM - R28_Java8_SR3_20160915_0912_B318796
JIT  - tr.r14.java.green_20160818_122998
GC   - R28_Java8_SR3_20160915_0912_B318796_CMPRSS
J9CL - 20160915_318796)
JCL - 20160914_01 based on Oracle jdk8u101-b13

Has anyone tried this before? Will I need to force Oracle JDK to make it work?

Gaurav Daga
  • 343
  • 2
  • 11
  • I think there is a mismatch between the java which Ignite is using and you are using? Can you try `java -version`? – prasanth Apr 07 '17 at 18:32
  • Second output shown above is output for java -version itself. Problem I think is, maven enforcer is picking version information from second line instead of first line. It may have been coded to parse output from standard JDK and may not have been tested on IBM JDK. – Gaurav Daga Apr 07 '17 at 18:35
  • Instead of `/opt/ibm/java-x86_64-80/bin/java -version`, try `java -version`. Lets make sure the `java` is pointing to `/opt/ibm/java-x86_64-80/bin/java` – prasanth Apr 07 '17 at 18:37
  • 1
    You can also try `which java` – prasanth Apr 07 '17 at 18:37
  • Here you go : `[user@machine apache-ignite-1.9.0-src]$ java -version java version "1.8.0" Java(TM) SE Runtime Environment (build pxa6480sr3fp12-20160919_01(SR3 FP12)) IBM J9 VM (build 2.8, JRE 1.8.0 Linux amd64-64 Compressed References 20160915_318796 (JIT enabled, AOT enabled) J9VM - R28_Java8_SR3_20160915_0912_B318796 JIT - tr.r14.java.green_20160818_122998 GC - R28_Java8_SR3_20160915_0912_B318796_CMPRSS J9CL - 20160915_318796) JCL - 20160914_01 based on Oracle jdk8u101-b13 ` – Gaurav Daga Apr 07 '17 at 18:38
  • Try this. http://stackoverflow.com/questions/7032965/how-do-i-figure-out-and-change-which-version-of-java-maven-is-using-to-execute – prasanth Apr 07 '17 at 18:40
  • `[user@machine apache-ignite-1.9.0-src]$ mvn -version Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T11:41:47-05:00) Maven home: /opt/dev/maven/latest Java version: 1.8.0, vendor: IBM Corporation Java home: /opt/ibm/java-x86_64-80/jre Default locale: en_US, platform encoding: UTF-8 OS name: "linux", version: "2.6.32-642.15.1.el6.x86_64", arch: "amd64", family: "unix" ` I think it is picking up correct java version from maven standpoint of view. – Gaurav Daga Apr 07 '17 at 18:43
  • I think it is not able to compare "pxa6480sr3fp12-20160919_01(SR3 FP12) >= 1.8.0-u40" – prasanth Apr 07 '17 at 18:46
  • That's what I am implying earlier (My first comment) . Though you brought good point where mvn -version detects the JDK version correctly but enforcer plugin detects JDK differently. This is an inconsistency on maven implementation part. – Gaurav Daga Apr 07 '17 at 18:48
  • https://issues.apache.org/jira/browse/IGNITE-663. Take a look at this. I am not sure if it is on maven implementation part. – prasanth Apr 07 '17 at 18:52
  • This is a two year old issue, and I would assume it is taken care in the latest build which is what I am using. – Gaurav Daga Apr 07 '17 at 19:04
  • For now I am moving after installing Oracle JDK on my local machine. Thanks @prasanth for your help in troubleshooting so far. – Gaurav Daga Apr 07 '17 at 19:15
  • You are welcome – prasanth Apr 07 '17 at 19:19

1 Answers1

3

It looks like Maven plugin takes build ID instead of actual Java version. Not sure why it behaves like this.

In any case, Apache Ignite was verified to be running on IBM JDK, but I doubt anyone ever tried to build it. You can give it a try by removing version validation from the POM.

Valentin Kulichenko
  • 8,365
  • 1
  • 16
  • 12
  • Thanks for responding. Yes, I downloaded the binaries of ignite and it does come up with IBM JDK without any problem. – Gaurav Daga Apr 10 '17 at 14:01