[
https://issues.apache.org/jira/browse/NIFI-11703?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17802876#comment-17802876
]
ASF subversion and git services commented on NIFI-11703:
--------------------------------------------------------
Commit 42547eb60c761331adbda0d23b2791311b40531a in nifi's branch
refs/heads/main from David Handermann
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=42547eb60c ]
NIFI-11703 Upgraded to Spring Framework 6 and Jetty 12
- Upgraded Spring Framework from 5.3.31 to 6.0.15
- Upgraded Spring Security from 5.8.7 to 6.2.0
- Upgraded Spring Vault from 2.3.4 to 3.1.0
- Upgraded Jetty from 10.0.18 to 12.0.5 with EE 10
- Upgraded Jersey from 2.41 to 3.1.4
- Upgraded JAXB from 2.3.9 to 4.0.4
- Upgraded AspectJ from 1.9.20.1 to 1.9.21
- Upgraded JMS API from 2.0.1 to 3.1.0
- Upgraded ActiveMQ Broker from 5.18.2 to 6.0.1 for JMS 3
- Upgraded JJWT from 0.9.1 to 0.12.3
- Replaced jackson-module-jaxb-annotations with
jackson-module-jakarta-xmlbind-annotations
- Replaced maven-jaxb2-plugin with hisrc-higherjaxb40-maven-plugin 2.1.1
- Replaced kongchen swagger-maven-plugin with swagger-codegen-maven-plugin from
Swagger 3
- Replaced com.nickwongdev AspectJ Plugin with Codehaus 1.14.0 for newer Java
versions
- Removed unused cglib-nodep
- Removed references to javax.validation
- Removed custom Jetty ALPN Processor not required for Java 21
- Removed several tests depending on older Jetty and Jakarta libraries
- Removed unnecessary webdefault.xml configurations
- Replaced unsupported cross-context servlet forwarding with HTTP forwarding
- Replaced javax.servlet references with jakarta.servlet
- Replaced javax.xml.bind references with jakarta.xml.bind
- Replaced javax.ws references with jakarata.ws
- Updated Spring Security CSRF implementation for Spring Security 6
- Updated web.xml versions to 6.0
- Updated REST API templates using new swagger-codegen variables
- Removed VALIDATE_DATA property from ParseCEF based on library compatibility
issue with javax.validation
- Added application URL logging to NiFi JettyServer
Signed-off-by: Pierre Villard <[email protected]>
This closes #8197.
> Upgrade Spring Framework to version 6
> -------------------------------------
>
> Key: NIFI-11703
> URL: https://issues.apache.org/jira/browse/NIFI-11703
> Project: Apache NiFi
> Issue Type: Improvement
> Reporter: Ryan Miller
> Assignee: David Handermann
> Priority: Major
> Time Spent: 1h 40m
> Remaining Estimate: 0h
>
> 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]
> /<path>/<to>/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/<user>/.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]
> /<path>/<to>/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/<user>/.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]
> /<path>/<to>/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/<user>/.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]
> /<path>/<to>/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/<user>/.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]
> /<path>/<to>/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]
> /<path>/<to>/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]
> /<path>/<to>/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]
> /<path>/<to>/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]
> /<path>/<to>/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]
> /<path>/<to>/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]
> /<path>/<to>/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]
> /<path>/<to>/nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/Postgres11DataSourceFactory.java:[30,1]
> error: cannot find symbol
> [ERROR] symbol: class Configuration
> [ERROR]
> /<path>/<to>/nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/Postgres11DataSourceFactory.java:[31,1]
> error: cannot find symbol
> [ERROR] symbol: class Profile
> [ERROR]
> /<path>/<to>/nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/DatabaseProfileValueSource.java:[19,42]
> error: cannot access ProfileValueSource
> [ERROR] bad class file:
> /home/<user>/.m2/repository/org/springframework/spring-test/6.0.10/spring-test-6.0.10.jar(/org/springframework/test/annotation/ProfileValueSource.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]
> /<path>/<to>/nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/DatabaseProfileValueSource.java:[29,51]
> error: cannot find symbol
> [ERROR] symbol: class ProfileValueSource
> [ERROR]
> /<path>/<to>/nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/Postgres14DataSourceFactory.java:[31,1]
> error: cannot find symbol
> [ERROR] symbol: class Configuration
> [ERROR]
> /<path>/<to>/nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/Postgres14DataSourceFactory.java:[32,1]
> error: cannot find symbol
> [ERROR] symbol: class Profile
> [ERROR]
> /<path>/<to>/nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/MariaDB10DataSourceFactory.java:[23,1]
> error: cannot find symbol
> [ERROR] symbol: class Configuration
> [ERROR]
> /<path>/<to>/nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/MariaDB10DataSourceFactory.java:[24,1]
> error: cannot find symbol
> [ERROR] symbol: class Profile
> [ERROR]
> /<path>/<to>/nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/Postgres10DataSourceFactory.java:[31,1]
> error: cannot find symbol
> [ERROR] symbol: class Configuration
> [ERROR]
> /<path>/<to>/nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/Postgres10DataSourceFactory.java:[32,1]
> error: cannot find symbol
> [ERROR] symbol: class Profile
> [ERROR]
> /<path>/<to>/nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/MariaDB10_2DataSourceFactory.java:[23,1]
> error: cannot find symbol
> [ERROR] symbol: class Configuration
> [ERROR]
> /<path>/<to>/nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/MariaDB10_2DataSourceFactory.java:[24,1]
> error: cannot find symbol
> [ERROR] symbol: class Profile
> [ERROR]
> /<path>/<to>/nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/Postgres12DataSourceFactory.java:[30,1]
> error: cannot find symbol
> [ERROR] symbol: class Configuration
> [ERROR]
> /<path>/<to>/nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/Postgres12DataSourceFactory.java:[31,1]
> error: cannot find symbol
> [ERROR] symbol: class Profile
> [ERROR]
> /<path>/<to>/nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/TestDataSourceFactory.java:[28,5]
> error: cannot find symbol
> [ERROR] symbol: class Bean
> [ERROR] location: class TestDataSourceFactory
> [ERROR]
> /<path>/<to>/nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/TestDataSourceFactory.java:[29,5]
> error: cannot find symbol
> [ERROR] symbol: class Primary
> [ERROR] location: class TestDataSourceFactory
> [ERROR]
> /<path>/<to>/nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/DatabaseProfileValueSource.java:[52,4]
> error: method does not override or implement a method from a supertype
> {code}
>
> There are some required methods and usage changes to get the Spring Framework
> version 6 migration working, but beyond that, Maven Compiler Plugin [4] is
> incompatible with version 61 class files and will need to be upgraded to
> support them.
>
> [1] https://issues.apache.org/jira/browse/MCOMPILER-539
> [2] https://issues.apache.org/jira/browse/NIFI-11702
> [3] https://issues.apache.org/jira/browse/NIFI-11478
> [4] [https://maven.apache.org/plugins/maven-compiler-plugin/]
--
This message was sent by Atlassian Jira
(v8.20.10#820010)