Closed jordanpadams closed 2 years ago
Thanks for this report. Now that I've finally got a chance to seriously look at this, a couple things stand out.
First, the Roundup already uses openjdk8
by default, so there's no need to add openjdk8
to the packages
. See this line of the base image used by the Roundup.
Second, the compilation and tests for pds4-jparser work for me under openjdk8
. Here's the reproduction, using the same environment as the Roundup:
$ docker container run --rm --tty --interactive alpine:3.12
/ # apk add --no-progress --quiet git openjdk8 maven
/ # which java
/usr/bin/java
/ # java -version
openjdk version "1.8.0_275"
OpenJDK Runtime Environment (IcedTea 3.17.1) (Alpine 8.275.01-r0)
OpenJDK 64-Bit Server VM (build 25.275-b01, mixed mode)
/ # which mvn
/usr/bin/mvn
/ # mvn --version
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: /usr/share/java/maven-3
Java version: 1.8.0_275, vendor: IcedTea, runtime: /usr/lib/jvm/java-1.8-openjdk/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "5.10.25-linuxkit", arch: "amd64", family: "unix"
/ # cd /tmp
/tmp # git clone --quiet https://github.com/NASA-PDS/pds4-jparser.git
/tmp # cd pds4-jparser
/tmp/pds4-jparser # mvn test
[INFO] Scanning for projects...
Downloading from JBoss: https://repository.jboss.org/nexus/content/repositories/thirdparty-releases/gov/nasa/pds/1.12.0/pds-1.12.0.pom
Downloading from geotools: https://download.osgeo.org/webdav/geotools/gov/nasa/pds/1.12.0/pds-1.12.0.pom
Downloading from central: https://repo.maven.apache.org/maven2/gov/nasa/pds/1.12.0/pds-1.12.0.pom
Downloaded from central: https://repo.maven.apache.org/maven2/gov/nasa/pds/1.12.0/pds-1.12.0.pom (11 kB at 30 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/org/sonatype/plugins/nexus-staging-maven-plugin/1.6.8/nexus-staging-maven-plugin-1.6.8.pom
[INFO] Tests run: 672, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 23.599 s - in TestSuite
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 672, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 02:06 min
[INFO] Finished at: 2021-08-04T19:48:08Z
[INFO] ------------------------------------------------------------------------
/tmp/pds4-jparser # echo π
π
I also tried it on CentOS Linux release 8.3.2011 with packages java-1.8.0-openjdk
, maven
, and git
. Worked fine. I also tried it on macOS 11.5 with Oracle Java 1.8.0_161 (with JAVA_HOME
set to /Library/Java/JavaVirtualMachines/jdk1.8.0_161.jdk/Contents/Home
) and it worked great there, too. And it worked with Ubuntu 20.04 with openjdk-8-jdk
as well as Oracle Java 1.8.0_301.
What platform were you using, @jordanpadams?
OS | Dist & Version | Java | Compilation & test |
---|---|---|---|
Linux | Alpine 3.12 | OpenJDK8 | β |
Linux | Centos 8.3 | OpenJDK8 | β |
macOS | 11.5 | Oracle JDK 1.8 | β |
Linux | Ubuntu 20.04 | OpenJDK8 | β |
Linux | Ubuntu 20.04 | Oracle JDK 1.8 | β |
Linux? | Jordans? | ? | π€ |
Because this seems to work under multiple instances (and implementations) of Java 8 I'm tempted to mark this as "Cannot Reproduce". I'll assign it back to you for now but if you think this is still an issue, feel free to toss it back to me with details on how to get it to fail: please include the platform (operating system, release), Java (implementation provenance, versioning), etc. if possible π
EDIT: I think I missed a key step in your instructions: Checkout NASA-PDS/pds4-jparser@1f16315f87af93cc2b0756d12afbb79fd126d954
. If I check out that specific commit, then I do indeed get a compilation error when reproducing it under various environments. However, that's not the commit the Roundup is using. The unstable-cicd.yaml
trigger is to use a push to branch main
βsome distance away from that commit. HALP!
@jordanpadams - this is waiting on your input
π Describe the bug
It may be taking them seriously, but maybe not serious enough?
Per this commit I am trying to set roundup to use java8 to build the software. From the logs, it looks like it is attempting to install the package as expected, but for some reason the environment doesn't get set properly to use Java8 versus the default Java installed.
The reason I know this is the build should be failing under java8.
π To Reproduce
Steps to reproduce the behavior in a local environment:
$ echo $JAVA_HOME /usr/local/opt/openjdk@8/
[INFO] ------------------------------------------------------------- [WARNING] COMPILATION WARNING : [INFO] ------------------------------------------------------------- [WARNING] /Users/jpadams/Documents/proj/pds/pdsen/workspace/pds4-jparser/src/main/java/gov/nasa/pds/label/jaxb/PDSNamespacePrefixMapper.java: Some input files use or override a deprecated API. [WARNING] /Users/jpadams/Documents/proj/pds/pdsen/workspace/pds4-jparser/src/main/java/gov/nasa/pds/label/jaxb/PDSNamespacePrefixMapper.java: Recompile with -Xlint:deprecation for details. [INFO] 2 warnings [INFO] ------------------------------------------------------------- [INFO] ------------------------------------------------------------- [ERROR] COMPILATION ERROR : [INFO] ------------------------------------------------------------- [ERROR] /Users/jpadams/Documents/proj/pds/pdsen/workspace/pds4-jparser/src/main/java/gov/nasa/pds/objectAccess/TableReader.java:[353,33] incompatible types: java.nio.Buffer cannot be converted to java.nio.ByteBuffer [INFO] 1 error [INFO] ------------------------------------------------------------- [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 2.785 s [INFO] Finished at: 2021-05-07T11:22:12-07:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project pds4-jparser: Compilation failure [ERROR] /Users/jpadams/Documents/proj/pds/pdsen/workspace/pds4-jparser/src/main/java/gov/nasa/pds/objectAccess/TableReader.java:[353,33] incompatible types: java.nio.Buffer cannot be converted to java.nio.ByteBuffer [ERROR] [ERROR] -> [Help 1] [ERROR] [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] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException