scijava / pom-scijava

Friendly base POM for all SciJava-based software
https://imagej.net/BOM
The Unlicense
25 stars 34 forks source link

Melting-pot failures with Java 11 #193

Open hinerm opened 2 years ago

hinerm commented 2 years ago

I ran into the following failures when building the melting pot with a J11 JDK:

[FAILURE] io.scif/scifio
[FAILURE] io.scif/scifio-hdf5
[FAILURE] io.scif/scifio-jai-imageio
[FAILURE] net.imagej/ij1-patcher
[FAILURE] net.imagej/imagej-tensorflow
[FAILURE] net.imglib2/imglib2-label-multisets
[FAILURE] net.imglib2/imglib2-unsafe
[FAILURE] org.scijava/native-lib-loader
[FAILURE] org.scijava/parsington
[FAILURE] org.scijava/scijava-common
[FAILURE] org.scijava/scripting-java
[FAILURE] sc.fiji/IO_
[FAILURE] sc.fiji/LSM_Toolbox
[FAILURE] sc.fiji/Vaa3d_Reader
[FAILURE] sc.fiji/bigwarp_fiji
[FAILURE] sc.fiji/fiji-lib
[FAILURE] sc.fiji/labkit-ui

I was testing J11 because ImageJ 1.x requires J9+ for module-info processing. A future enhancement for the melting pot would be to add logic that detects the declared Java version in the pom and builds with that version.

ctrueden commented 2 years ago

@hinerm Thanks. Do you still have the build logs for those failures? Would it be possible to post some abbreviated summary of each failure? Only if it's easy though—of course when pursuing this issue we'll have to reproduce the failures regardless.

ctrueden commented 2 years ago

io.scif:scifio:

[ERROR] Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 0.019 s <<< FAILURE! - in io.scif.formats.JPEG2000FormatTest
[ERROR] testOne(io.scif.formats.JPEG2000FormatTest)  Time elapsed: 0.001 s  <<< ERROR!
java.lang.NoClassDefFoundError: javax/xml/bind/DatatypeConverter
    at io.scif.formats.JPEG2000FormatTest.testOne(JPEG2000FormatTest.java:54)

io.scif:scifio-jhdf5: builds for me with Zulu JDK 11 on macOS:

$ java -version
openjdk version "11.0.12" 2021-07-20 LTS
OpenJDK Runtime Environment Zulu11.50+19-CA (build 11.0.12+7-LTS)
OpenJDK 64-Bit Server VM Zulu11.50+19-CA (build 11.0.12+7-LTS, mixed mode)

io.scif:scifio-jai-imageio:

[WARNING] Rule 2: org.apache.maven.plugins.enforcer.RequireJavaVersion failed with message:
Detected JDK Version: 11.0.12 is not in the allowed range [1.8.0-101,1.8.9999].

So it may actually be that a bunch of these just need a pom-scijava parent update to support the downward cross-compilation from 11 to 8.

ctrueden commented 2 years ago

io.scif:scifio-jai-imageio: Targets Java 1.5, so it can't use OpenJDK 11 to build because OpenJDK's minimum target version is 8.

sc.fiji:IO_:

[ERROR] /Volumes/Code/fiji/IO/src/main/java/sc/fiji/io/SVG_Reader.java:[76,34] cannot access org.w3c.dom.css.ViewCSS
  class file for org.w3c.dom.css.ViewCSS not found
[ERROR] /Volumes/Code/fiji/IO/src/main/java/sc/fiji/io/SVG_Reader.java:[77,34] cannot access org.w3c.dom.css.DocumentCSS
  class file for org.w3c.dom.css.DocumentCSS not found

sc.fiji:LSM_Toolbox:

sc.fiji:Vaa3d_Reader: Fixed with fiji/Vaa3d_Reader@680c26df05e493e8a3e1188ca44ea7bc0a523483

[ERROR] Tests run: 9, Failures: 0, Errors: 8, Skipped: 0, Time elapsed: 0.101 s <<< FAILURE! - in org.janelia.vaa3d.reader.TestVaa3d_Reader
[ERROR] testVaa3dPbdRawSameDataSmallRead(org.janelia.vaa3d.reader.TestVaa3d_Reader)  Time elapsed: 0.018 s  <<< ERROR!
java.lang.NullPointerException
    at org.janelia.vaa3d.reader.TestVaa3d_Reader.testVaa3dDataEquality(TestVaa3d_Reader.java:88)
    at org.janelia.vaa3d.reader.TestVaa3d_Reader.testVaa3dPbdRawSameDataSmallRead(TestVaa3d_Reader.java:15)

sc.fiji:bigwarp_fiji:

[ERROR] /Volumes/Code/fiji-ext/bigwarp/src/main/java/bigwarp/BigWarpInit.java:[478,109] incompatible types: java.lang.Object cannot be converted to net.imglib2.type.numeric.NumericType
[ERROR] /Volumes/Code/fiji-ext/bigwarp/src/main/java/bigwarp/BigWarpInit.java:[482,109] incompatible types: java.lang.Object cannot be converted to net.imglib2.type.numeric.NumericType
[ERROR] /Volumes/Code/fiji-ext/bigwarp/src/main/java/bigwarp/BigWarpInit.java:[524,57] incompatible types: java.lang.Object cannot be converted to net.imglib2.type.numeric.NumericType

sc.fiji:fiji-lib:

[ERROR] runPlugInTest(fiji.DebugTest)  Time elapsed: 1.583 s  <<< ERROR!
java.lang.IllegalArgumentException:
Cannot add class path from ClassLoader of type jdk.internal.loader.ClassLoaders$AppClassLoader

    at fiji.DebugTest.runPlugInTest(DebugTest.java:60)

(net.imagej:ij1-patcher has this same problem)