ilastik / ilastik4ij

ImageJ plugins to run ilastik workflows
MIT License
22 stars 17 forks source link

tests failing after hdf5 update #91

Closed k-dominik closed 1 year ago

k-dominik commented 2 years ago

now with CI back up running, the tests stopped working.

[INFO] -------------------------------------------------------
  [INFO]  T E S T S
  [INFO] -------------------------------------------------------
  [INFO] Running org.ilastik.ilastik4ij.ui.IlastikImportMacroOptionsParserTest
  [INFO] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.024 s - in org.ilastik.ilastik4ij.ui.IlastikImportMacroOptionsParserTest
  [INFO] Running org.ilastik.ilastik4ij.ui.IlastikImportModelTest
  [ECLIPSE HELPER] Indexing annotations...
  log4j:WARN No appenders could be found for logger (org.bushe.swing.event.EventService).
  log4j:WARN Please initialize the log4j system properly.
  log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
  Error:  Tests run: 5, Failures: 0, Errors: 5, Skipped: 0, Time elapsed: 3.558 s <<< FAILURE! - in org.ilastik.ilastik4ij.ui.IlastikImportModelTest
  Error:  testSettingDataset(org.ilastik.ilastik4ij.ui.IlastikImportModelTest)  Time elapsed: 3.236 s  <<< ERROR!
  java.lang.IllegalArgumentException: Invalid service: net.imagej.legacy.LegacyService
    at org.ilastik.ilastik4ij.ui.IlastikImportModelTest.setUp(IlastikImportModelTest.java:29)
  Caused by: java.lang.ExceptionInInitializerError
    at org.ilastik.ilastik4ij.ui.IlastikImportModelTest.setUp(IlastikImportModelTest.java:29)
  Caused by: java.lang.RuntimeException: Found incompatible ij.IJ class
    at org.ilastik.ilastik4ij.ui.IlastikImportModelTest.setUp(IlastikImportModelTest.java:29)
  Caused by: java.lang.RuntimeException: 
  Cannot load class: ij.Macro (loader: sun.misc.Launcher$AppClassLoader@3d4eac69)
  It appears that this class was already defined in the class loader!
  Please make sure that you initialize the LegacyService before using
  any ImageJ 1.x class. You can do that by adding this static initializer:

    static {
        LegacyInjector.preinit();
    }

  To debug this issue, start the JVM with the option:

    -javaagent:/home/runner/.m2/repository/net/imagej/ij1-patcher/0.12.9/ij1-patcher-0.12.9.jar

  To enforce pre-initialization, start the JVM with the option:

    -javaagent:/home/runner/.m2/repository/net/imagej/ij1-patcher/0.12.9/ij1-patcher-0.12.9.jar=init

    at org.ilastik.ilastik4ij.ui.IlastikImportModelTest.setUp(IlastikImportModelTest.java:29)
  Caused by: java.lang.ClassFormatError: loader (instance of  sun/misc/Launcher$AppClassLoader): attempted  duplicate class definition for name: "ij/Macro"
    at org.ilastik.ilastik4ij.ui.IlastikImportModelTest.setUp(IlastikImportModelTest.java:29)

  Error:  testSettingDatasetAxisTagsWithEmptyAxes(org.ilastik.ilastik4ij.ui.IlastikImportModelTest)  Time elapsed: 0.088 s  <<< ERROR!
  java.lang.IllegalArgumentException: Invalid service: net.imagej.legacy.LegacyService
    at org.ilastik.ilastik4ij.ui.IlastikImportModelTest.setUp(IlastikImportModelTest.java:29)
  Caused by: java.lang.NoClassDefFoundError: Could not initialize class net.imagej.legacy.LegacyService
    at org.ilastik.ilastik4ij.ui.IlastikImportModelTest.setUp(IlastikImportModelTest.java:29)

  Error:  testSettingDatasetAxisTagsWithTooManyAxes(org.ilastik.ilastik4ij.ui.IlastikImportModelTest)  Time elapsed: 0.082 s  <<< ERROR!
  java.lang.IllegalArgumentException: Invalid service: net.imagej.legacy.LegacyService
    at org.ilastik.ilastik4ij.ui.IlastikImportModelTest.setUp(IlastikImportModelTest.java:29)
  Caused by: java.lang.NoClassDefFoundError: Could not initialize class net.imagej.legacy.LegacyService
    at org.ilastik.ilastik4ij.ui.IlastikImportModelTest.setUp(IlastikImportModelTest.java:29)

  Error:  testSettingDatasetAxisTagsWithDuplicateAxes(org.ilastik.ilastik4ij.ui.IlastikImportModelTest)  Time elapsed: 0.079 s  <<< ERROR!
  java.lang.IllegalArgumentException: Invalid service: net.imagej.legacy.LegacyService
    at org.ilastik.ilastik4ij.ui.IlastikImportModelTest.setUp(IlastikImportModelTest.java:29)
  Caused by: java.lang.NoClassDefFoundError: Could not initialize class net.imagej.legacy.LegacyService
    at org.ilastik.ilastik4ij.ui.IlastikImportModelTest.setUp(IlastikImportModelTest.java:29)

  Error:  testSettingDatasetAxisTags(org.ilastik.ilastik4ij.ui.IlastikImportModelTest)  Time elapsed: 0.071 s  <<< ERROR!
  java.lang.IllegalArgumentException: Invalid service: net.imagej.legacy.LegacyService
    at org.ilastik.ilastik4ij.ui.IlastikImportModelTest.setUp(IlastikImportModelTest.java:29)
  Caused by: java.lang.NoClassDefFoundError: Could not initialize class net.imagej.legacy.LegacyService
    at org.ilastik.ilastik4ij.ui.IlastikImportModelTest.setUp(IlastikImportModelTest.java:29)

  [INFO] Running org.ilastik.ilastik4ij.hdf5.HDF5DatasetEntryProviderTest
  Error:  Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 0.127 s <<< FAILURE! - in org.ilastik.ilastik4ij.hdf5.HDF5DatasetEntryProviderTest
  Error:  testFindAvailableDatasets(org.ilastik.ilastik4ij.hdf5.HDF5DatasetEntryProviderTest)  Time elapsed: 0.072 s  <<< ERROR!
  java.lang.IllegalArgumentException: Invalid service: net.imagej.legacy.LegacyService
    at org.ilastik.ilastik4ij.hdf5.HDF5DatasetEntryProviderTest.setUp(HDF5DatasetEntryProviderTest.java:21)
  Caused by: java.lang.NoClassDefFoundError: Could not initialize class net.imagej.legacy.LegacyService
    at org.ilastik.ilastik4ij.hdf5.HDF5DatasetEntryProviderTest.setUp(HDF5DatasetEntryProviderTest.java:21)

  Error:  testFindAvailableDatasetsNoAxes(org.ilastik.ilastik4ij.hdf5.HDF5DatasetEntryProviderTest)  Time elapsed: 0.055 s  <<< ERROR!
  java.lang.IllegalArgumentException: Invalid service: net.imagej.legacy.LegacyService
    at org.ilastik.ilastik4ij.hdf5.HDF5DatasetEntryProviderTest.setUp(HDF5DatasetEntryProviderTest.java:21)
  Caused by: java.lang.NoClassDefFoundError: Could not initialize class net.imagej.legacy.LegacyService
    at org.ilastik.ilastik4ij.hdf5.HDF5DatasetEntryProviderTest.setUp(HDF5DatasetEntryProviderTest.java:21)

  [INFO] Running org.ilastik.ilastik4ij.Hdf5DataSetReaderTest
  Feb 16, 2022 10:07:12 AM java.util.prefs.FileSystemPreferences$1 run
  INFO: Created user preferences directory.
  Error:  Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 0.244 s <<< FAILURE! - in org.ilastik.ilastik4ij.Hdf5DataSetReaderTest
  Error:  org.ilastik.ilastik4ij.Hdf5DataSetReaderTest  Time elapsed: 0.243 s  <<< ERROR!
  java.lang.IllegalArgumentException: Invalid service: net.imagej.legacy.LegacyService
    at org.ilastik.ilastik4ij.Hdf5DataSetReaderTest.setUpClass(Hdf5DataSetReaderTest.java:54)
  Caused by: java.lang.NoClassDefFoundError: Could not initialize class net.imagej.legacy.LegacyService
    at org.ilastik.ilastik4ij.Hdf5DataSetReaderTest.setUpClass(Hdf5DataSetReaderTest.java:54)

  Error:  org.ilastik.ilastik4ij.Hdf5DataSetReaderTest  Time elapsed: 0.244 s  <<< ERROR!
  java.lang.NullPointerException
    at org.ilastik.ilastik4ij.Hdf5DataSetReaderTest.tearDownClass(Hdf5DataSetReaderTest.java:63)

  [INFO] 
  [INFO] Results:
  [INFO] 
  Error:  Errors: 
  Error:  org.ilastik.ilastik4ij.Hdf5DataSetReaderTest.org.ilastik.ilastik4ij.Hdf5DataSetReaderTest
  Error:    Run 1: Hdf5DataSetReaderTest.setUpClass:54 » IllegalArgument Invalid service: net.ima...
  Error:    Run 2: Hdf5DataSetReaderTest.tearDownClass:63 NullPointer
  [INFO] 
  Error:    HDF5DatasetEntryProviderTest.setUp:21 » IllegalArgument Invalid service: net.i...
  Error:    HDF5DatasetEntryProviderTest.setUp:21 » IllegalArgument Invalid service: net.i...
  Error:    IlastikImportModelTest.setUp:29 » IllegalArgument Invalid service: net.imagej....
  Error:    IlastikImportModelTest.setUp:29 » IllegalArgument Invalid service: net.imagej....
  Error:    IlastikImportModelTest.setUp:29 » IllegalArgument Invalid service: net.imagej....
  Error:    IlastikImportModelTest.setUp:29 » IllegalArgument Invalid service: net.imagej....
  Error:    IlastikImportModelTest.setUp:29 » IllegalArgument Invalid service: net.imagej....
  [INFO] 
  Error:  Tests run: 14, Failures: 0, Errors: 8, Skipped: 0
  [INFO] 
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD FAILURE
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time:  22.180 s
  [INFO] Finished at: 2022-02-16T10:07:13Z
  [INFO] ------------------------------------------------------------------------
  Error:  Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.21.0:test (default-test) on project ilastik4ij: There are test failures.
  Error:  
  Error:  Please refer to /home/runner/work/ilastik4ij/ilastik4ij/target/surefire-reports for the individual test results.
  Error:  Please refer to dump files (if any exist) [date]-jvmRun[N].dump, [date].dumpstream and [date]-jvmRun[N].dumpstream.
  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
  ==> FAILED: EXIT CODE 1
k-dominik commented 2 years ago

cc @emilmelnikov

emilmelnikov commented 2 years ago

We still use Travis CI, but SciJava migrated to GitHub Actions.

k-dominik commented 2 years ago

We still use Travis CI, but SciJava migrated to GitHub Actions.

hmmm, i did the migration last week... maybe pull/rebase?

emilmelnikov commented 2 years ago

hmmm, i did the migration last week... maybe pull/rebase?

Yes, that is correct, sorry.

I'll try to remove an ImageJ1 dependency and switch to SciJava completely. Otherwise, I'm afraid we'll get more trouble in the future...

k-dominik commented 1 year ago

the tests run :)