[jira] [Commented] (NIFI-7505) Add InvokeHTTPRecord processor

2023-12-05 Thread Ryan Miller (Jira)


[ 
https://issues.apache.org/jira/browse/NIFI-7505?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17793510#comment-17793510
 ] 

Ryan Miller commented on NIFI-7505:
---

Continuing from the previous PR [1], I've had a go at implementing the 
following changes to the InvokeHTTPRecord Processor:
 * Use {{WebClientServiceProvider}} instead of manually instantiating an HTTP 
client inside {{{}InvokeHTTPRecord{}}}. This will make the code simpler, reduce 
the number of properties and make it easier to write tests.
 * Remove the functionality for splitting records by success/failure, and just 
have the ability to store the success/failure flag on each record processed. If 
we want to split records, we can do that with a separate {{SplitRecord}} 
processor.

I've created a new PR [2] with these changes for the purposes of feedback and 
additional discussion.

 

[1] [https://github.com/apache/nifi/pull/7532]


[2] 
[https://github.com/apache/nifi/pull/8127|https://github.com/apache/nifi/pull/7532]

> Add InvokeHTTPRecord processor
> --
>
> Key: NIFI-7505
> URL: https://issues.apache.org/jira/browse/NIFI-7505
> Project: Apache NiFi
>  Issue Type: Improvement
>  Components: Extensions
>Affects Versions: 1.11.4
>Reporter: Andy LoPresto
>Priority: Major
>  Labels: Record, http, processor, rest
>  Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> Some users have recently requested being able to invoke a specific URL via 
> {{InvokeHTTP}} on every record in a flowfile. Currently, the {{InvokeHTTP}} 
> processor can only handle one piece of data per flowfile. There are some 
> workarounds available for specific patterns with {{LookupRecord}} + 
> {{RestLookupService}}, but this is not a complete solution. I propose 
> introducing an {{InvokeHTTPRecord}} processor, providing the {{InvokeHTTP}} 
> functionality in conjunction with the record processing behavior. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (NIFI-11700) Java 17 Nashorn standalone support

2023-06-16 Thread Ryan Miller (Jira)


 [ 
https://issues.apache.org/jira/browse/NIFI-11700?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ryan Miller updated NIFI-11700:
---
Description: 
h2. Motivation

Nashorn was removed with the release of JDK 15 and is unavailable in Java 17. 
Standalone Nashorn or a scripting engine alternative is required for scripting 
processors to run ECMAScript.
h2. Related Tickets

Requires:
 * Support building with version 61 class files [1]

Past Related Tickets:
 - Support building with Java 17 [2]

h2. Versions
 - openjdk 17.0.7 2023-04-18

 - NiFi 2.0.0-SNAPSHOT (fork) [3]

 - Maven 3.9.2 (mvn) [4]

h2. Setup
 * Clone NiFi repo v2.0.0
 * Add Nashorn standalone (see fork) [3]

 
{code:java}

org.openjdk.nashorn
nashorn-core
15.4
provided

{code}
 * Add Nashorn to the script engine (see fork) [3]

 * Build NiFi
 * Run NiFi

 

NiFi crashed after startup, nifi-app.log contains the relevant errors.

Adding standalone Nashorn to NiFi caused the following errors to occur:

 
{code:java}
Caused by: java.lang.IllegalArgumentException: Unsupported class file major 
version 61
at org.objectweb.asm.ClassReader.(ClassReader.java:196)
at org.objectweb.asm.ClassReader.(ClassReader.java:177)
at org.objectweb.asm.ClassReader.(ClassReader.java:163)
at org.objectweb.asm.ClassReader.(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://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}
 

These errors were caused by NiFi not supporting the building of version 61 
class files (class files in packages built with Java 17).

 

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

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

[3] [https://github.com/Aerilym/nifi/tree/nashorn]

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

  was:
h2. Motivation

Nashorn was removed with the release of JDK 15 and is unavailable in Java 17. 
Standalone Nashorn or a scripting engine alternative is required for scripting 
processors to run ECMAScript.
h2. Related Tickets

Requires:

 - Support building with version 61 class files [1]

Past Related Tickets:
 - Support building with Java 17 [2]

h2. Versions
 - openjdk 17.0.7 2023-04-18

 - NiFi 2.0.0-SNAPSHOT (fork) [3]

 - Maven 3.9.2 (mvn) [4]

h2. Setup
 * Clone NiFi repo v2.0.0
 * Add Nashorn standalone (see fork) [3]

 
{code:java}

org.openjdk.nashorn
nashorn-core
15.4
provided

{code}
 * Add Nashorn to the script engine (see fork) [3]

 * Build NiFi
 * Run NiFi

 

NiFi crashed after startup, nifi-app.log contains the relevant errors.

Adding standalone Nashorn to NiFi caused the following errors to occur:

 
{code:java}
Caused by: java.lang.IllegalArgumentException: Unsupported class file major 
version 61
at org.objectweb.asm.ClassReader.(ClassReader.java:196)
at org.objectweb.asm.ClassReader.(ClassReader.java:177)
at org.objectweb.asm.ClassReader.(ClassReader.java:163)
at org.objectweb.asm.ClassReader.(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 

[jira] [Updated] (NIFI-11700) Java 17 Nashorn standalone support

2023-06-16 Thread Ryan Miller (Jira)


 [ 
https://issues.apache.org/jira/browse/NIFI-11700?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ryan Miller updated NIFI-11700:
---
Description: 
h2. Motivation

Nashorn was removed with the release of JDK 15 and is unavailable in Java 17. 
Standalone Nashorn or a scripting engine alternative is required for scripting 
processors to run ECMAScript.
h2. Related Tickets

Requires:

 - Support building with version 61 class files [1]

Past Related Tickets:
 - Support building with Java 17 [2]

h2. Versions
 - openjdk 17.0.7 2023-04-18

 - NiFi 2.0.0-SNAPSHOT (fork) [3]

 - Maven 3.9.2 (mvn) [4]

h2. Setup
 * Clone NiFi repo v2.0.0
 * Add Nashorn standalone (see fork) [3]

 
{code:java}

org.openjdk.nashorn
nashorn-core
15.4
provided

{code}
 * Add Nashorn to the script engine (see fork) [3]

 * Build NiFi
 * Run NiFi

 

NiFi crashed after startup, nifi-app.log contains the relevant errors.

Adding standalone Nashorn to NiFi caused the following errors to occur:

 
{code:java}
Caused by: java.lang.IllegalArgumentException: Unsupported class file major 
version 61
at org.objectweb.asm.ClassReader.(ClassReader.java:196)
at org.objectweb.asm.ClassReader.(ClassReader.java:177)
at org.objectweb.asm.ClassReader.(ClassReader.java:163)
at org.objectweb.asm.ClassReader.(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://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}
 

These errors were caused by NiFi not supporting the building of version 61 
class files (class files in packages built with Java 17).

 

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

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

[3] [https://github.com/Aerilym/nifi/tree/nashorn]

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

  was:
h2. Motivation

Nashorn was removed with the release of JDK 15 and is unavailable in Java 17. 
Standalone Nashorn or a scripting engine alternative is required for scripting 
processors to run ECMAScript.
h2. Related Tickets

Requires:

 - Support building with version 61 class files [1]

Past Related Tickets:
 - Support building with Java 17 [2]

h2. Versions
 - openjdk 17.0.7 2023-04-18

 - NiFi 2.0.0-SNAPSHOT (fork) [3]

 - Maven 3.9.2 (mvn) [4]

h2. Setup
 * Clone NiFi repo v2.0.0
 * Add Nashorn standalone (see fork) [3]

 
{code:java}

org.openjdk.nashorn
nashorn-core
15.4
provided

{code}
 * Add Nashorn to the script engine (see fork) [3]

 * Build NiFi
 * Run NiFi

 

NiFi crashed after startup, nifi-app.log contains the relevant errors.

Adding standalone Nashorn to NiFi caused the following errors to occur:

 
{code:java}
Caused by: java.lang.IllegalArgumentException: Unsupported class file major 
version 61
at org.objectweb.asm.ClassReader.(ClassReader.java:196)
at org.objectweb.asm.ClassReader.(ClassReader.java:177)
at org.objectweb.asm.ClassReader.(ClassReader.java:163)
at org.objectweb.asm.ClassReader.(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 

[jira] [Updated] (NIFI-11700) Java 17 Nashorn standalone support

2023-06-16 Thread Ryan Miller (Jira)


 [ 
https://issues.apache.org/jira/browse/NIFI-11700?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ryan Miller updated NIFI-11700:
---
Description: 
h2. Motivation

Nashorn was removed with the release of JDK 15 and is unavailable in Java 17. 
Standalone Nashorn or a scripting engine alternative is required for scripting 
processors to run ECMAScript.
h2. Related Tickets

Requires:

 - Support building with version 61 class files [1]

Past Related Tickets:
 - Support building with Java 17 [2]

h2. Versions
 - openjdk 17.0.7 2023-04-18

 - NiFi 2.0.0-SNAPSHOT (fork) [3]

 - Maven 3.9.2 (mvn) [4]

h2. Setup
 * Clone NiFi repo v2.0.0
 * Add Nashorn standalone (see fork) [3]

 
{code:java}

org.openjdk.nashorn
nashorn-core
15.4
provided

{code}
 * Add Nashorn to the script engine (see fork) [3]

 * Build NiFi
 * Run NiFi

 

NiFi crashed after startup, nifi-app.log contains the relevant errors.

Adding standalone Nashorn to NiFi caused the following errors to occur:

 
{code:java}
Caused by: java.lang.IllegalArgumentException: Unsupported class file major 
version 61
at org.objectweb.asm.ClassReader.(ClassReader.java:196)
at org.objectweb.asm.ClassReader.(ClassReader.java:177)
at org.objectweb.asm.ClassReader.(ClassReader.java:163)
at org.objectweb.asm.ClassReader.(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://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}
 

These errors were caused by NiFi not supporting the building of version 61 
class files (class files in packages built with Java 17).

 

[1] https://issues.apache.org/jira/browse/MCOMPILER-539

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

[3] [https://github.com/Aerilym/nifi/tree/nashorn]

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

  was:
h2. Motivation

Nashorn was removed with the release of JDK 15 and is unavailable in Java 17. 
Standalone Nashorn or a scripting engine alternative is required for scripting 
processors to run ECMAScript.
h2. Related Tickets

Requires:

 - Support building with version 61 class files [1]

Past Related Tickets:
- Support building with Java 17 [2]
h2. Versions

- openjdk 17.0.7 2023-04-18

- NiFi 2.0.0-SNAPSHOT (fork) [3]

- Maven 3.9.2 (mvn) [4]

 
h2. Setup
 * Clone NiFi repo v2.0.0
 * Add Nashorn standalone (see fork) [3]

 
{code:java}

org.openjdk.nashorn
nashorn-core
15.4
provided

{code}
 * Add Nashorn to the script engine (see fork) [3]

 * Build NiFi
 * Run NiFi

 

NiFi crashed after startup, nifi-app.log contains the relevant errors.

Adding standalone Nashorn to NiFi caused the following errors to occur:

 

 
{code:java}
Caused by: java.lang.IllegalArgumentException: Unsupported class file major 
version 61
at org.objectweb.asm.ClassReader.(ClassReader.java:196)
at org.objectweb.asm.ClassReader.(ClassReader.java:177)
at org.objectweb.asm.ClassReader.(ClassReader.java:163)
at org.objectweb.asm.ClassReader.(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 

[jira] [Updated] (NIFI-11703) Upgrade Spring Framework to version 6

2023-06-16 Thread Ryan Miller (Jira)


 [ 
https://issues.apache.org/jira/browse/NIFI-11703?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ryan Miller updated NIFI-11703:
---
Description: 
h2. Motivation

Upgrading Jetty to version 11 requires the API migration of javax.servlet to 
jakarta.servlet making the Spring Framework 5 incompatible with Jetty 11, as 
the Spring Framework 5 uses the javax.servlet api. This migration is complete 
in Spring Framework 6.
h2. Related Tickets

Requires:
 - Upgrade Maven Compiler Plugin to support version 61 class files [1]

Solves: 
 - Upgrade Jetty to version 11 [2]

Past Related Tickets:
 - Upgrade Spring Framework to 5.3.27 and Spring Security to 5.8.3 

 

NiFi uses the Spring Framework in conjunction with Jetty, so both need to be 
upgraded simultaneously, as Spring Framework 5 is incompatible with Jetty 11 
because the upgrade of Jetty 9.4.3 to Jetty 11 [2] requires an API migration of 
javax.servlet to jakarta.servlet, this API is also used by the Spring 
Framework, which made the same API migration in version 6.

In attempting to upgrade Jetty to version 11.0.15 [2] and the Spring Framework 
to 6.0.10 (and Spring Security to 6.1.0), the following errors occurred during 
the building of NiFi:
{code:java}
[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-compiler-plugin:3.11.0:compile (default-compile) 
on project nifi-registry-test: Compilation failure: Compilation failure: 
[ERROR] 
///nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/MariaDB10_3DataSourceFactory.java:[19,45]
 error: cannot access Configuration
[ERROR]   bad class file: 
/home//.m2/repository/org/springframework/spring-context/6.0.10/spring-context-6.0.10.jar(/org/springframework/context/annotation/Configuration.class)
[ERROR]     class file has wrong version 61.0, should be 55.0
[ERROR]     Please remove or make sure it appears in the correct subdirectory 
of the classpath.
[ERROR] 
///nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/MariaDB10_3DataSourceFactory.java:[20,45]
 error: cannot access Profile
[ERROR]   bad class file: 
/home//.m2/repository/org/springframework/spring-context/6.0.10/spring-context-6.0.10.jar(/org/springframework/context/annotation/Profile.class)
[ERROR]     class file has wrong version 61.0, should be 55.0
[ERROR]     Please remove or make sure it appears in the correct subdirectory 
of the classpath.
[ERROR] 
///nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/TestDataSourceFactory.java:[19,45]
 error: cannot access Bean
[ERROR]   bad class file: 
/home//.m2/repository/org/springframework/spring-context/6.0.10/spring-context-6.0.10.jar(/org/springframework/context/annotation/Bean.class)
[ERROR]     class file has wrong version 61.0, should be 55.0
[ERROR]     Please remove or make sure it appears in the correct subdirectory 
of the classpath.
[ERROR] 
///nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/TestDataSourceFactory.java:[21,45]
 error: cannot access Primary
[ERROR]   bad class file: 
/home//.m2/repository/org/springframework/spring-context/6.0.10/spring-context-6.0.10.jar(/org/springframework/context/annotation/Primary.class)
[ERROR]     class file has wrong version 61.0, should be 55.0
[ERROR]     Please remove or make sure it appears in the correct subdirectory 
of the classpath.
[ERROR] 
///nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/TestDataSourceFactory.java:[25,1]
 error: cannot find symbol
[ERROR]   symbol: class Configuration
[ERROR] 
///nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/MariaDB10_3DataSourceFactory.java:[23,1]
 error: cannot find symbol
[ERROR]   symbol: class Configuration
[ERROR] 
///nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/MariaDB10_3DataSourceFactory.java:[24,1]
 error: cannot find symbol
[ERROR]   symbol: class Profile
[ERROR] 
///nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/MySql8DataSourceFactory.java:[23,1]
 error: cannot find symbol
[ERROR]   symbol: class Configuration
[ERROR] 
///nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/MySql8DataSourceFactory.java:[24,1]
 error: cannot find symbol
[ERROR]   symbol: class Profile
[ERROR] 
///nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/Postgres13DataSourceFactory.java:[30,1]
 error: cannot find symbol
[ERROR]   symbol: class Configuration
[ERROR] 
///nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/Postgres13DataSourceFactory.java:[31,1]
 error: cannot find symbol
[ERROR]   symbol: class Profile
[ERROR] 

[jira] [Resolved] (NIFI-11704) Unsupported class file major version 61

2023-06-16 Thread Ryan Miller (Jira)


 [ 
https://issues.apache.org/jira/browse/NIFI-11704?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ryan Miller resolved NIFI-11704.

Resolution: Invalid

> Unsupported class file major version 61
> ---
>
> Key: NIFI-11704
> URL: https://issues.apache.org/jira/browse/NIFI-11704
> Project: Apache NiFi
>  Issue Type: Wish
>Reporter: Ryan Miller
>Priority: Minor
>
> Maven Compiler Plugin does not support classes created by JDK 17 (major 
> version 61). If classes created by JDK 17 are present in your classpath when 
> using Maven Compiler, the following error occurs: (Building Apache NiFi [1])
>  
>  
> {code:java}
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-compiler-plugin:3.11.0:compile 
> (default-compile) on project nifi-registry-test: Compilation failure: 
> Compilation failure: 
> [ERROR] 
> ///nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/MariaDB10_3DataSourceFactory.java:[19,45]
>  error: cannot access Configuration
> [ERROR]   bad class file: 
> /home//.m2/repository/org/springframework/spring-context/6.0.10/spring-context-6.0.10.jar(/org/springframework/context/annotation/Configuration.class)
> [ERROR]     class file has wrong version 61.0, should be 55.0
> [ERROR]     Please remove or make sure it appears in the correct subdirectory 
> of the classpath.
> {code}
>  
>  
> This error occurred when building NiFi after upgrading Spring Framework to 
> version 6.0.10 [2]. Spring Framework 6.0.10 contains version 61 classes.
>  
> See Upgrade Spring Framework to version 6 in NiFi [2] for reproduction
> See past related ticket: Unsupported class file major version 55 [3]
>  
> [1] [https://nifi.apache.org/]
> [2] https://issues.apache.org/jira/browse/NIFI-11703
> [3] https://issues.apache.org/jira/browse/MCOMPILER-342



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (NIFI-11701) Support building with version 61 class files

2023-06-16 Thread Ryan Miller (Jira)


 [ 
https://issues.apache.org/jira/browse/NIFI-11701?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ryan Miller updated NIFI-11701:
---
Description: 
h2. Motivation

Packages built using Java 17 create version 61 class files; these are currently 
unsupported in the Jetty and Maven Compiler Plugin versions used.
h2. Related Tickets

Requires:
 - Upgrade Jetty to version 11 [1]

 - Upgrade Maven Compiler Plugin to support version 61 class files [2]

Solves:
 - Java 17 Nashorn standalone support [3]

 

In attempting to add Standalone Nashorn [4] (a package containing version 61 
class files) to NiFi, the following error occurred:
h2. Related Errors
{code:java}
Caused by: java.lang.IllegalArgumentException: Unsupported class file major 
version 61
at org.objectweb.asm.ClassReader.(ClassReader.java:196)
at org.objectweb.asm.ClassReader.(ClassReader.java:177)
at org.objectweb.asm.ClassReader.(ClassReader.java:163)
at org.objectweb.asm.ClassReader.(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
 
{code}
 

This error occurred because standalone Nashorn was bundled in JDK 17, and 
whatever is reading it and doing code transforms cannot read version 61 class 
files.
h2. Similar issue
{panel}
The problem (as pointed out by @Mark Rotteveel) is that glowroot is failing 
while trying to do some code transformation using ASM. Apparently the 
ClassReader in the version of ASM that is bundled in glowroot 0.13.6 doesn't 
understand version 61 (Java 17) class files.
{panel}
[5]

 

Fixing this issue will likely require updating one or more other NiFI 
dependencies. The error indicates Jetty is likely the issue as it does not 
support version 61 class files. Requiring upgrading Jetty to a version that 
supports version 61 class files [1].

 

Also, note that the Maven Compiler Plugin [6] needs to be upgraded to support 
version 61 class files too [2].

 

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

[2] https://issues.apache.org/jira/browse/MCOMPILER-539

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

[4] [https://mvnrepository.com/artifact/org.openjdk.nashorn/nashorn-core]

[5] 
[https://stackoverflow.com/questions/72227442/unsupported-class-file-major-version-61]

[6] [https://maven.apache.org/plugins/maven-compiler-plugin/]

  was:
h2. Motivation

Packages built using Java 17 create version 61 class files; these are currently 
unsupported in the Jetty and Maven Compiler Plugin versions used.
h2. Related Tickets

Requires:

- Upgrade Jetty to version 11 [1]

- Upgrade Maven Compiler Plugin to support version 61 class files [2]

Solves:

- Java 17 Nashorn standalone support [3]

 

In attempting to add Standalone Nashorn [4] (a package containing version 61 
class files) to NiFi, the following error occurred:

 

Related Errors

 
{code:java}
Caused by: java.lang.IllegalArgumentException: Unsupported class file major 
version 61
at org.objectweb.asm.ClassReader.(ClassReader.java:196)
at org.objectweb.asm.ClassReader.(ClassReader.java:177)
at org.objectweb.asm.ClassReader.(ClassReader.java:163)
at org.objectweb.asm.ClassReader.(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
 
{code}
 

This error occurred because standalone Nashorn was bundled in JDK 17, and 
whatever is reading it and doing code transforms cannot read version 61 class 
files.

 
h2. Similar issue

 
{panel}
The problem (as pointed out by @Mark Rotteveel) is that glowroot is failing 
while trying to do some code transformation using ASM. Apparently the 
ClassReader in the version of ASM that is bundled in glowroot 0.13.6 doesn't 
understand version 61 (Java 17) class files.
{panel}
 

[5]

 

Fixing this issue will likely require updating one or more other NiFI 
dependencies. The error indicates Jetty is likely the issue as it does not 
support version 61 class files. Requiring upgrading Jetty to a version that 
supports version 61 class files [1].

 

Also, note that the Maven Compiler Plugin [6] needs to be upgraded to support 
version 61 class files too [2].

 

[1] TBA: Upgrade Jetty to version 11

[2] TBA: Upgrade Maven Compiler Plugin to support version 61 class files 

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

[4] [https://mvnrepository.com/artifact/org.openjdk.nashorn/nashorn-core]

[5] 

[jira] [Updated] (NIFI-11702) Upgrade Jetty to version 11

2023-06-16 Thread Ryan Miller (Jira)


 [ 
https://issues.apache.org/jira/browse/NIFI-11702?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ryan Miller updated NIFI-11702:
---
Description: 
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.(ClassReader.java:196)
at org.objectweb.asm.ClassReader.(ClassReader.java:177)
at org.objectweb.asm.ClassReader.(ClassReader.java:163)
at org.objectweb.asm.ClassReader.(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://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]

  was:
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).

Caused by: java.lang.IllegalArgumentException: Unsupported class file major 
version 61

at org.objectweb.asm.ClassReader.(ClassReader.java:196)

at org.objectweb.asm.ClassReader.(ClassReader.java:177)

at org.objectweb.asm.ClassReader.(ClassReader.java:163)

at org.objectweb.asm.ClassReader.(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: 

[jira] [Updated] (NIFI-11703) Upgrade Spring Framework to version 6

2023-06-16 Thread Ryan Miller (Jira)


 [ 
https://issues.apache.org/jira/browse/NIFI-11703?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ryan Miller updated NIFI-11703:
---
Description: 
h2. Motivation

Upgrading Jetty to version 11 requires the API migration of javax.servlet to 
jakarta.servlet making the Spring Framework 5 incompatible with Jetty 11, as 
the Spring Framework 5 uses the javax.servlet api. This migration is complete 
in Spring Framework 6.
h2. Related Tickets

Requires:
 - Upgrade Maven Compiler Plugin to support version 61 class files [1]

Solves: 
 - Upgrade Jetty to version 11 [2]

Past Related Tickets:
 - Upgrade Spring Framework to 5.3.27 and Spring Security to 5.8.3 

 

NiFi uses the Spring Framework in conjunction with Jetty, so both need to be 
upgraded simultaneously, as Spring Framework 5 is incompatible with Jetty 11 
because the upgrade of Jetty 9.4.3 to Jetty 11 [2] requires an API migration of 
javax.servlet to jakarta.servlet, this API is also used by the Spring 
Framework, which made the same API migration in version 6.

In attempting to upgrade Jetty to version 11.0.15 [2] and the Spring Framework 
to 6.0.10 (and Spring Security to 6.1.0), the following errors occurred during 
the building of NiFi:
{code:java}
[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-compiler-plugin:3.11.0:compile (default-compile) 
on project nifi-registry-test: Compilation failure: Compilation failure: 
[ERROR] 
///nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/MariaDB10_3DataSourceFactory.java:[19,45]
 error: cannot access Configuration
[ERROR]   bad class file: 
/home//.m2/repository/org/springframework/spring-context/6.0.10/spring-context-6.0.10.jar(/org/springframework/context/annotation/Configuration.class)
[ERROR]     class file has wrong version 61.0, should be 55.0
[ERROR]     Please remove or make sure it appears in the correct subdirectory 
of the classpath.
[ERROR] 
///nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/MariaDB10_3DataSourceFactory.java:[20,45]
 error: cannot access Profile
[ERROR]   bad class file: 
/home//.m2/repository/org/springframework/spring-context/6.0.10/spring-context-6.0.10.jar(/org/springframework/context/annotation/Profile.class)
[ERROR]     class file has wrong version 61.0, should be 55.0
[ERROR]     Please remove or make sure it appears in the correct subdirectory 
of the classpath.
[ERROR] 
///nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/TestDataSourceFactory.java:[19,45]
 error: cannot access Bean
[ERROR]   bad class file: 
/home//.m2/repository/org/springframework/spring-context/6.0.10/spring-context-6.0.10.jar(/org/springframework/context/annotation/Bean.class)
[ERROR]     class file has wrong version 61.0, should be 55.0
[ERROR]     Please remove or make sure it appears in the correct subdirectory 
of the classpath.
[ERROR] 
///nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/TestDataSourceFactory.java:[21,45]
 error: cannot access Primary
[ERROR]   bad class file: 
/home//.m2/repository/org/springframework/spring-context/6.0.10/spring-context-6.0.10.jar(/org/springframework/context/annotation/Primary.class)
[ERROR]     class file has wrong version 61.0, should be 55.0
[ERROR]     Please remove or make sure it appears in the correct subdirectory 
of the classpath.
[ERROR] 
///nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/TestDataSourceFactory.java:[25,1]
 error: cannot find symbol
[ERROR]   symbol: class Configuration
[ERROR] 
///nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/MariaDB10_3DataSourceFactory.java:[23,1]
 error: cannot find symbol
[ERROR]   symbol: class Configuration
[ERROR] 
///nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/MariaDB10_3DataSourceFactory.java:[24,1]
 error: cannot find symbol
[ERROR]   symbol: class Profile
[ERROR] 
///nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/MySql8DataSourceFactory.java:[23,1]
 error: cannot find symbol
[ERROR]   symbol: class Configuration
[ERROR] 
///nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/MySql8DataSourceFactory.java:[24,1]
 error: cannot find symbol
[ERROR]   symbol: class Profile
[ERROR] 
///nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/Postgres13DataSourceFactory.java:[30,1]
 error: cannot find symbol
[ERROR]   symbol: class Configuration
[ERROR] 
///nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/Postgres13DataSourceFactory.java:[31,1]
 error: cannot find symbol
[ERROR]   symbol: class Profile
[ERROR] 

[jira] [Created] (NIFI-11704) Unsupported class file major version 61

2023-06-16 Thread Ryan Miller (Jira)
Ryan Miller created NIFI-11704:
--

 Summary: Unsupported class file major version 61
 Key: NIFI-11704
 URL: https://issues.apache.org/jira/browse/NIFI-11704
 Project: Apache NiFi
  Issue Type: Wish
Reporter: Ryan Miller


Maven Compiler Plugin does not support classes created by JDK 17 (major version 
61). If classes created by JDK 17 are present in your classpath when using 
Maven Compiler, the following error occurs: (Building Apache NiFi [1])

 

 
{code:java}
[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-compiler-plugin:3.11.0:compile (default-compile) 
on project nifi-registry-test: Compilation failure: Compilation failure: 
[ERROR] 
///nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/MariaDB10_3DataSourceFactory.java:[19,45]
 error: cannot access Configuration
[ERROR]   bad class file: 
/home//.m2/repository/org/springframework/spring-context/6.0.10/spring-context-6.0.10.jar(/org/springframework/context/annotation/Configuration.class)
[ERROR]     class file has wrong version 61.0, should be 55.0
[ERROR]     Please remove or make sure it appears in the correct subdirectory 
of the classpath.
{code}
 

 

This error occurred when building NiFi after upgrading Spring Framework to 
version 6.0.10 [2]. Spring Framework 6.0.10 contains version 61 classes.

 

See Upgrade Spring Framework to version 6 in NiFi [2] for reproduction

See past related ticket: Unsupported class file major version 55 [3]

 

[1] [https://nifi.apache.org/]

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

[3] https://issues.apache.org/jira/browse/MCOMPILER-342



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Created] (NIFI-11703) Upgrade Spring Framework to version 6

2023-06-16 Thread Ryan Miller (Jira)
Ryan Miller created NIFI-11703:
--

 Summary: Upgrade Spring Framework to version 6
 Key: NIFI-11703
 URL: https://issues.apache.org/jira/browse/NIFI-11703
 Project: Apache NiFi
  Issue Type: Wish
Reporter: Ryan Miller


h2. Motivation

Upgrading Jetty to version 11 requires the API migration of javax.servlet to 
jakarta.servlet making the Spring Framework 5 incompatible with Jetty 11, as 
the Spring Framework 5 uses the javax.servlet api. This migration is complete 
in Spring Framework 6.
h2. Related Tickets

Requires:

- Upgrade Maven Compiler Plugin to support version 61 class files [1]

Solves: 

- Upgrade Jetty to version 11 [2]

Past Related Tickets:

- Upgrade Spring Framework to 5.3.27 and Spring Security to 5.8.3 

 

NiFi uses the Spring Framework in conjunction with Jetty, so both need to be 
upgraded simultaneously, as Spring Framework 5 is incompatible with Jetty 11 
because the upgrade of Jetty 9.4.3 to Jetty 11 [2] requires an API migration of 
javax.servlet to jakarta.servlet, this API is also used by the Spring 
Framework, which made the same API migration in version 6.

 

In attempting to upgrade Jetty to version 11.0.15 [2] and the Spring Framework 
to 6.0.10 (and Spring Security to 6.1.0), the following errors occurred during 
the building of NiFi:

 

 
{code:java}
[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-compiler-plugin:3.11.0:compile (default-compile) 
on project nifi-registry-test: Compilation failure: Compilation failure: 
[ERROR] 
///nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/MariaDB10_3DataSourceFactory.java:[19,45]
 error: cannot access Configuration
[ERROR]   bad class file: 
/home//.m2/repository/org/springframework/spring-context/6.0.10/spring-context-6.0.10.jar(/org/springframework/context/annotation/Configuration.class)
[ERROR]     class file has wrong version 61.0, should be 55.0
[ERROR]     Please remove or make sure it appears in the correct subdirectory 
of the classpath.
[ERROR] 
///nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/MariaDB10_3DataSourceFactory.java:[20,45]
 error: cannot access Profile
[ERROR]   bad class file: 
/home//.m2/repository/org/springframework/spring-context/6.0.10/spring-context-6.0.10.jar(/org/springframework/context/annotation/Profile.class)
[ERROR]     class file has wrong version 61.0, should be 55.0
[ERROR]     Please remove or make sure it appears in the correct subdirectory 
of the classpath.
[ERROR] 
///nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/TestDataSourceFactory.java:[19,45]
 error: cannot access Bean
[ERROR]   bad class file: 
/home//.m2/repository/org/springframework/spring-context/6.0.10/spring-context-6.0.10.jar(/org/springframework/context/annotation/Bean.class)
[ERROR]     class file has wrong version 61.0, should be 55.0
[ERROR]     Please remove or make sure it appears in the correct subdirectory 
of the classpath.
[ERROR] 
///nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/TestDataSourceFactory.java:[21,45]
 error: cannot access Primary
[ERROR]   bad class file: 
/home//.m2/repository/org/springframework/spring-context/6.0.10/spring-context-6.0.10.jar(/org/springframework/context/annotation/Primary.class)
[ERROR]     class file has wrong version 61.0, should be 55.0
[ERROR]     Please remove or make sure it appears in the correct subdirectory 
of the classpath.
[ERROR] 
///nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/TestDataSourceFactory.java:[25,1]
 error: cannot find symbol
[ERROR]   symbol: class Configuration
[ERROR] 
///nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/MariaDB10_3DataSourceFactory.java:[23,1]
 error: cannot find symbol
[ERROR]   symbol: class Configuration
[ERROR] 
///nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/MariaDB10_3DataSourceFactory.java:[24,1]
 error: cannot find symbol
[ERROR]   symbol: class Profile
[ERROR] 
///nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/MySql8DataSourceFactory.java:[23,1]
 error: cannot find symbol
[ERROR]   symbol: class Configuration
[ERROR] 
///nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/MySql8DataSourceFactory.java:[24,1]
 error: cannot find symbol
[ERROR]   symbol: class Profile
[ERROR] 
///nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/Postgres13DataSourceFactory.java:[30,1]
 error: cannot find symbol
[ERROR]   symbol: class Configuration
[ERROR] 

[jira] [Created] (NIFI-11702) Upgrade Jetty to version 11

2023-06-16 Thread Ryan Miller (Jira)
Ryan Miller created NIFI-11702:
--

 Summary: Upgrade Jetty to version 11
 Key: NIFI-11702
 URL: https://issues.apache.org/jira/browse/NIFI-11702
 Project: Apache NiFi
  Issue Type: Wish
Reporter: Ryan Miller


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).

Caused by: java.lang.IllegalArgumentException: Unsupported class file major 
version 61

at org.objectweb.asm.ClassReader.(ClassReader.java:196)

at org.objectweb.asm.ClassReader.(ClassReader.java:177)

at org.objectweb.asm.ClassReader.(ClassReader.java:163)

at org.objectweb.asm.ClassReader.(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://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] TBA: Upgrade Spring Framework to version 6

[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)


[jira] [Created] (NIFI-11701) Support building with version 61 class files

2023-06-16 Thread Ryan Miller (Jira)
Ryan Miller created NIFI-11701:
--

 Summary: Support building with version 61 class files
 Key: NIFI-11701
 URL: https://issues.apache.org/jira/browse/NIFI-11701
 Project: Apache NiFi
  Issue Type: Wish
Reporter: Ryan Miller


h2. Motivation

Packages built using Java 17 create version 61 class files; these are currently 
unsupported in the Jetty and Maven Compiler Plugin versions used.
h2. Related Tickets

Requires:

- Upgrade Jetty to version 11 [1]

- Upgrade Maven Compiler Plugin to support version 61 class files [2]

Solves:

- Java 17 Nashorn standalone support [3]

 

In attempting to add Standalone Nashorn [4] (a package containing version 61 
class files) to NiFi, the following error occurred:

 

Related Errors

 
{code:java}
Caused by: java.lang.IllegalArgumentException: Unsupported class file major 
version 61
at org.objectweb.asm.ClassReader.(ClassReader.java:196)
at org.objectweb.asm.ClassReader.(ClassReader.java:177)
at org.objectweb.asm.ClassReader.(ClassReader.java:163)
at org.objectweb.asm.ClassReader.(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
 
{code}
 

This error occurred because standalone Nashorn was bundled in JDK 17, and 
whatever is reading it and doing code transforms cannot read version 61 class 
files.

 
h2. Similar issue

 
{panel}
The problem (as pointed out by @Mark Rotteveel) is that glowroot is failing 
while trying to do some code transformation using ASM. Apparently the 
ClassReader in the version of ASM that is bundled in glowroot 0.13.6 doesn't 
understand version 61 (Java 17) class files.
{panel}
 

[5]

 

Fixing this issue will likely require updating one or more other NiFI 
dependencies. The error indicates Jetty is likely the issue as it does not 
support version 61 class files. Requiring upgrading Jetty to a version that 
supports version 61 class files [1].

 

Also, note that the Maven Compiler Plugin [6] needs to be upgraded to support 
version 61 class files too [2].

 

[1] TBA: Upgrade Jetty to version 11

[2] TBA: Upgrade Maven Compiler Plugin to support version 61 class files 

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

[4] [https://mvnrepository.com/artifact/org.openjdk.nashorn/nashorn-core]

[5] 
[https://stackoverflow.com/questions/72227442/unsupported-class-file-major-version-61]

[6] [https://maven.apache.org/plugins/maven-compiler-plugin/]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Created] (NIFI-11700) Java 17 Nashorn standalone support

2023-06-16 Thread Ryan Miller (Jira)
Ryan Miller created NIFI-11700:
--

 Summary: Java 17 Nashorn standalone support
 Key: NIFI-11700
 URL: https://issues.apache.org/jira/browse/NIFI-11700
 Project: Apache NiFi
  Issue Type: Wish
Reporter: Ryan Miller


h2. Motivation

Nashorn was removed with the release of JDK 15 and is unavailable in Java 17. 
Standalone Nashorn or a scripting engine alternative is required for scripting 
processors to run ECMAScript.
h2. Related Tickets

Requires:

 - Support building with version 61 class files [1]

Past Related Tickets:
- Support building with Java 17 [2]
h2. Versions

- openjdk 17.0.7 2023-04-18

- NiFi 2.0.0-SNAPSHOT (fork) [3]

- Maven 3.9.2 (mvn) [4]

 
h2. Setup
 * Clone NiFi repo v2.0.0
 * Add Nashorn standalone (see fork) [3]

 
{code:java}

org.openjdk.nashorn
nashorn-core
15.4
provided

{code}
 * Add Nashorn to the script engine (see fork) [3]

 * Build NiFi
 * Run NiFi

 

NiFi crashed after startup, nifi-app.log contains the relevant errors.

Adding standalone Nashorn to NiFi caused the following errors to occur:

 

 
{code:java}
Caused by: java.lang.IllegalArgumentException: Unsupported class file major 
version 61
at org.objectweb.asm.ClassReader.(ClassReader.java:196)
at org.objectweb.asm.ClassReader.(ClassReader.java:177)
at org.objectweb.asm.ClassReader.(ClassReader.java:163)
at org.objectweb.asm.ClassReader.(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://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}
 

These errors were caused by NiFi not supporting the building of version 61 
class files (class files in packages built with Java 17).

 

[1] TBA: Support building with version 61 class files

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

[3] [https://github.com/Aerilym/nifi/tree/nashorn]

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



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Assigned] (NIFI-10192) LookupRecord attempts first lookup multiple times

2022-09-27 Thread Ryan Miller (Jira)


 [ 
https://issues.apache.org/jira/browse/NIFI-10192?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ryan Miller reassigned NIFI-10192:
--

Assignee: Ryan Miller

> LookupRecord attempts first lookup multiple times
> -
>
> Key: NIFI-10192
> URL: https://issues.apache.org/jira/browse/NIFI-10192
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Core Framework
>Affects Versions: 1.16.1, 1.16.2, 1.16.3
>Reporter: Chris Norton
>Assignee: Ryan Miller
>Priority: Minor
>  Time Spent: 1h 20m
>  Remaining Estimate: 0h
>
> A change was implemented in 
> [NIFI-9903|https://issues.apache.org/jira/browse/NIFI-9903] which results in 
> *lookupService.lookup()* being called twice per record ([at least until the 
> first 
> match|https://github.com/apache/nifi/blob/rel/nifi-1.16.1/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/LookupRecord.java#L350]).
>  For lookup services which are idempotent (CSVRecordLookupService, 
> DistributedMapCacheLookupService, PropertiesFileLookupService) making lookups 
> twice won’t affect the result or have undesired side effects. However, the 
> RestLookupService can make arbitrary HTTP requests for the standard HTTP 
> methods (GET, POST, PUT, DELETE) and there is no guarantee that these 
> requests will be idempotent. POST requests in particular are not expected to 
> be idempotent and may cause undesirable behaviour if invoked multiple times 
> (as in our case).
> As the name suggests, LookupRecord could be expected to be used only to 
> perform lookups which are idempotent and do not have side effects. [Matt 
> Burgess wrote an 
> article|http://funnifi.blogspot.com/2018/08/database-sequence-lookup-with.html]
>  where it seems the expected behaviour was that *lookupService.lookup()* 
> would only be called once. The change in behaviour and being called twice 
> would now cause IDs to be skipped.
> It was suggested by Mark Payne in a Slack discussion that lookup results 
> could be cached up until the first match, which may alleviate the issues we 
> are seeing.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)