[ 
https://issues.apache.org/jira/browse/MCOMPILER-539?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17735229#comment-17735229
 ] 

Elliotte Rusty Harold commented on MCOMPILER-539:
-------------------------------------------------

I understand what you're saying,. However, I find it unlikely that the issue is 
in the maven-compiler-plugin. We have JDK 17 in our test matrix.I'll look, but 
it seems more likely you were simply using a pre-17 JDK. Either that, or 
there's something weird going on in Spring. 

> Unsupported class file major version 61
> ---------------------------------------
>
>                 Key: MCOMPILER-539
>                 URL: https://issues.apache.org/jira/browse/MCOMPILER-539
>             Project: Maven Compiler Plugin
>          Issue Type: Wish
>            Reporter: Ryan Miller
>            Priority: Major
>
> 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] 
> /<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.
> {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)

Reply via email to