Affects: 6.x


If the project java version is set up with a version higher than 17 (eg 21), the component scan is not able to proceed. The following error message is given as cause: Unsupported class file major version 65. It seems the Component scan annotation is not able to handle java versions above 17.

Comment From: sbrannen

What Spring Framework version are you using -- 6.0.x, 6.1.x?

Also, can you please provide a minimal example that reproduces the issue -- for example, a ZIP file attached to this issue or a public Git repository?

Comment From: snicoll

I don't understand the report. Spring Framework 6 is compatible with Java 21. It should be relatively easy to build a small sample that reproduces the error message you've described.

You can attach the project as a zip or push the code to a separate GitHub repository.

Comment From: tronwa

Dang!

I was cloning the last version of the Spring Pet Clinic, and assumed that it was using Spring version 6. Digging into the poms it seems like the Spring version is 5.3.x.

Sorry for the inconvenience!

Yours, Tron

  1. des. 2023 kl. 15:02 skrev Stéphane Nicoll @.***>:

I don't understand the report. Spring Framework 6 is compatible with Java 21. It should be relatively easy to build a small sample that reproduces the error message you've described.

You can attach the project as a zip or push the code to a separate GitHub repository.

— Reply to this email directly, view it on GitHub https://github.com/spring-projects/spring-framework/issues/31794#issuecomment-1847212791, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHBEDNMHXA7HNVFWLAX64O3YIMMWPAVCNFSM6AAAAABAMWEZACVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBXGIYTENZZGE. You are receiving this because you authored the thread.