Uploaded image for project: 'Apache NiFi'
  1. Apache NiFi
  2. NIFI-11702

Upgrade Jetty to version 12

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 2.0.0-M2
    • None
    • None

    Description

      Motivation

      Support building with packages compiled with Java 17 containing version 61 class files.

      Related Tickets

      Requires:

      • Upgrade Spring Framework to version 6 [1]

      Solves:

      • Support building with version 61 class files [2]

      Past Related Tickets:

      • Upgrade version of Jetty [3]

      Mentioned Tickets:

      • Java 17 Nashorn standalone support [4]

      Versions

      • openjdk 17.0.7 2023-04-18
      • NiFi 2.0.0-SNAPSHOT (fork) [5]
      • Maven 3.9.2 (mvn) [6]

       

      The current version of Jetty (9.4.51.v20230217) does not support version 61 class files. Upgrading to Jetty 11 (11.0.15) will solve this problem as it supports reading version 61 class files.

      While adding Standalone Nashorn to NiFi [4] (in anticipation of Java 17 becoming the recommended version), errors occurred, preventing the building of NiFi. These errors were caused by Jetty's inability to read files compiled using Java 17 (version 61 class files).

       

      Caused by: java.lang.IllegalArgumentException: Unsupported class file major version 61
          at org.objectweb.asm.ClassReader.<init>(ClassReader.java:196)
          at org.objectweb.asm.ClassReader.<init>(ClassReader.java:177)
          at org.objectweb.asm.ClassReader.<init>(ClassReader.java:163)
          at org.objectweb.asm.ClassReader.<init>(ClassReader.java:284)
          at org.eclipse.jetty.annotations.AnnotationParser.scanClass(AnnotationParser.java:932)
          at org.eclipse.jetty.annotations.AnnotationParser.parseJarEntry(AnnotationParser.java:917)
          at org.eclipse.jetty.annotations.AnnotationParser.lambda$parseJar$2(AnnotationParser.java:876)
          ... 9 common frames omitted
       
      Caused by: java.lang.RuntimeException: Error scanning entry com/fasterxml/jackson/core/io/doubleparser/FastDoubleSwar.class from jar file:///<path>/<to>/<nifi>/nifi-assembly/target/nifi-2.0.0-SNAPSHOT-bin/nifi-2.0.0-SNAPSHOT/work/jetty/nifi-standard-content-viewer-2.0.0-SNAPSHOT.war/webapp/WEB-INF/lib/jackson-core-2.15.2.jar
          at org.eclipse.jetty.annotations.AnnotationParser.lambda$parseJar$2(AnnotationParser.java:880)
          at java.base/java.util.TreeMap$ValueSpliterator.forEachRemaining(TreeMap.java:3215)
          at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:762)
          at org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotgradleationParser.java:872)
          at org.eclipse.jetty.annotations.AnnotationParser.parse(AnnotationParser.java:835)
          at org.eclipse.jetty.annotations.AnnotationConfiguration$ParserTask.call(AnnotationConfiguration.java:159)
          at org.eclipse.jetty.annotations.AnnotationConfiguration$1.run(AnnotationConfiguration.java:455)
          at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883)
          at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034)
          at java.base/java.lang.Thread.run(Thread.java:833)
      

       

       

      [1] https://issues.apache.org/jira/browse/NIFI-11703

      [2] https://issues.apache.org/jira/browse/NIFI-11701

      [3] https://issues.apache.org/jira/browse/NIFI-6196

      [4] https://issues.apache.org/jira/browse/NIFI-11700

      [5] https://github.com/Aerilym/nifi/tree/jetty_11

      [6] https://maven.apache.org/install.html

      Attachments

        Issue Links

          Activity

            People

              exceptionfactory David Handermann
              Aerilym Ryan Miller
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: