Uploaded image for project: 'Apache Jena'
  1. Apache Jena
  2. JENA-2149

Java18 JDK + Mockito causes problems

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Done
    • None
    • Jena 4.2.0
    • None
    • None

    Description

      Java18 is showing a problem with mockito in jena-core contract tests, jena-permissions and jena-querybuilder.

      They look similar - some kind of mockito init problem:

      ...
      Caused by: java.lang.NullPointerException: Cannot invoke "org.mockito.internal.configuration.plugins.PluginRegistry.getStackTraceCleanerProvider()" because "org.mockito.internal.configuration.plugins.Plugins.registry" is null
      

      The "cannot invoke" changes - the "org.mockito.internal.configuration.plugins.Plugins.registry" is null does not.

      One example:

      https://ci-builds.apache.org/job/Jena/job/Jena_JDK18/org.apache.jena$jena-core/3/testReport/org.apache.jena.graph.impl/SimpleEventManager_CS/testGeneralEvent_GraphEventManagerContractTest_/

      tests:

      https://ci-builds.apache.org/job/Jena/job/Jena_JDK18/org.apache.jena$jena-permissions/3/testReport/

      https://ci-builds.apache.org/job/Jena/job/Jena_JDK18/org.apache.jena$jena-core/3/testReport/

      https://ci-builds.apache.org/job/Jena/job/Jena_JDK18/org.apache.jena$jena-querybuilder/3/testReport/

      The dependency is mockito 3.11.2 (which is latest : 2021-06-21).

      I didn't find any online reports of problems nor a report at the mockito project on github.

      This is only on our java18 build - the other JDK versions pass.

      Attachments

        Activity

          People

            andy Andy Seaborne
            andy Andy Seaborne
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: