Are there changes to the nuxeoctl script between version 5.8 and 5.9.5 for detecting Java?

Hi All,

Just wondering if there's been a change in the nuxeoctl startup script between these two Nuxeo versions, specifically in the way it checks for the presence of a JRE.

I'm on an OpenIndiana system. Oracle Java 7u67 is in the launching user's path and can be detected:

java -version
java version "1.7.0_67"
Java(TM) SE Runtime Environment (build 1.7.0_67-b01)
Java HotSpot(TM) Server VM (build 24.65-b04, mixed mode)

I've extracted the Nuxeo 5.9.5 zip file to /opt/nuxeo. When attempting to launch the Nuxeo control panel GUI, I see this:

/opt/nuxeo# ./bin/nuxeoctl gui
awk: can't open /version/{print $2}
ERROR: Nuxeo requires Java 1.7+ (detected )

Now, on the same host system without any changes, but unzipping Nuxeo 5.8 to the same location and running the same command, the Nuxeo control panel app runs fine:

alt text

Any pointers as to what's changed? Please let me know if you need more information :)

Cheers, Dave

0 votes

2 answers

1455 views

ANSWER



Hi Julien/Florent,

Thanks for the information – I'll do some digging and see :)

Cheers, Dave

0 votes



Hi,

Indeed, the change is tracked by NXP-14534: the detection has been moved from Java code to Shell code. It seems the new code is sadly not compliant with your system:

# Check Java version
: ${REQUIRED_JAVA_VERSION:=1.7}
JAVA_VERSION=`java -version 2>&1 | awk -F '"' '/version/{print $2}'`
if [ "$JAVA_VERSION" \< "$REQUIRED_JAVA_VERSION" ]; then
  die "Nuxeo requires Java $REQUIRED_JAVA_VERSION+ (detected $JAVA_VERSION)"
fi

See nuxeo-distribution/commit/b0ef5ed31a4a5450965aebd14ab0276d9e73f3cf.
An improving pull-request would be very welcome!

Regards,

0 votes



We've never tested Solaris derivatives. There must be changes, probably in ask syntax or shell capabilities. @davenz please debug the above script that Julien pasted and we can include a fix.
09/26/2014