Uploaded image for project: 'Batik'
  1. Batik
  2. BATIK-1260

Java11 module-info batik-script/batik-bridge issue w/ RhinoInterpreterFactory

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.11
    • 1.15
    • Bridge, Scripting
    • openjdk 11.0.2 2019-01-15
      OpenJDK Runtime Environment 18.9 (build 11.0.2+9)
      OpenJDK 64-Bit Server VM 18.9 (build 11.0.2+9, mixed mode)

    Description

      Hello Batik devs,

      I'm refreshing a legacy genomics visualization application (IGV) towards Java11 dependencies:

      https://github.com/igvteam/igv/pull/620

      I've found the following Java11+Batik hiccups.

      When I use the following maven artifacts to fix a SVG issue in the application I'm working on:

      https://github.com/igvteam/igv/pull/620/commits/f30bc3699856afa68277595a2392c2f34392c165

      *Everything works in runtime* (as in ./gradlew run and then File->Save Image as SVG, generates a correct .svg).

      But strangely, when running the tests (as in ./gradlew test) I'm faced with this:

       

      Error occurred during initialization of boot layer
      java.lang.module.FindException: Unable to derive module descriptor for /Users/romanvg/.gradle/caches/modules-2/files-2.1/org.apache.xmlgraphics/batik-script/1.11/f7284dabc28aaa7407bef45f31dd204e58a35810/batik-script-1.11.jar
      Caused by: java.lang.module.InvalidModuleDescriptorException: Provider class org.apache.batik.bridge.RhinoInterpreterFactory not in module
      Process 'Gradle Test Executor 46' finished with non-zero exit value 1
      org.gradle.process.internal.ExecException: Process 'Gradle Test Executor 46' finished with non-zero exit value 1
      

      Here's a more detailed TravisCI run and Gradle scan, for reference:

      https://travis-ci.org/umccr/igv/builds/514966124

      https://scans.gradle.com/s/z3oulnfefttkm/console-log

      Then my first attempt is to just exclude batik-bridge and batik-script via Gradle:

      exclude group: 'org.apache.xmlgraphics', module: 'batik-bridge'
      exclude group: 'org.apache.xmlgraphics', module: 'batik-script'  
      

       
      But unfortunately this goes further down the dependencies rabbit hole with xalan, bsf et al:

      Error occurred during initialization of boot layer java.lang.module.FindException: Unable to derive module descriptor for /Users/romanvg/.gradle/caches/modules-2/files-2.1/xalan/xalan/2.7.2/d55d3f02a56ec4c25695fe67e1334ff8c2ecea23/xalan-2.7.2.jar Caused by: java.lang.module.InvalidModuleDescriptorException: Provider class org.apache.bsf.BSFManager not in module Process 'Gradle Test Executor 188' finished with non-zero exit value 1

      Can somebody tell me if in batik-script-1.11.jar the Java11 module-info.class, services, etc... We have not found a module descriptor within the batik-script jar. We suspect that the RhinoInterpreterFactory service reference points to a different jar file, namely:

       

      org.apache.batik.script.InterpreterFactory ->  org.apache.batik.bridge.RhinoInterpreterFactory 
      

      Is there an easy fix so that the RhinoInterpreterFactory error does not show up in the first place?

      Thanks in advance for any hint!

      Attachments

        1. batik.png
          35 kB
          Simon Ochsenreither

        Activity

          People

            ssteiner Simon Steiner
            brainstorm Roman Valls Guimera
            Votes:
            4 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: