[
https://issues.apache.org/jira/browse/NIFI-11702?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Pierre Villard updated NIFI-11702:
----------------------------------
Fix Version/s: 2.0.0
Resolution: Fixed
Status: Resolved (was: Patch Available)
> Upgrade Jetty to version 12
> ---------------------------
>
> Key: NIFI-11702
> URL: https://issues.apache.org/jira/browse/NIFI-11702
> Project: Apache NiFi
> Issue Type: Improvement
> Reporter: Ryan Miller
> Assignee: David Handermann
> Priority: Minor
> Fix For: 2.0.0
>
>
> h2. Motivation
> Support building with packages compiled with Java 17 containing version 61
> class files.
> h2. 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]
> h2. 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).
>
> {code:java}
> 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)
> {code}
>
>
> [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]
--
This message was sent by Atlassian Jira
(v8.20.10#820010)