Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.lang.UnsupportedClassVersionError: org/simpleflatmapper/util/CheckedConsumer has been compiled by a more recent version of the Java Runtime (class file version 53.0), this version of the Java Runtime only recognizes class file versions up to 52.0 #673

Closed
arnzel opened this issue Aug 2, 2019 · 7 comments
Milestone

Comments

@arnzel
Copy link

@arnzel arnzel commented Aug 2, 2019

Hi , i have a strange error currently. When running some tests for a software which has a depnedency to simpleflat mapper jdbc (Version 6.7.0) i get this error

"java.lang.UnsupportedClassVersionError: org/simpleflatmapper/util/CheckedConsumer has been compiled by a more recent version of the Java Runtime (class file version 53.0), this version of the Java Runtime only recognizes class file versions up to 52.0"

I use Intellij and set

  • Project SDK to Java 1.8.0_151
  • Project Language Level to Java 8
  • Target Byte Code Version to Level 8

So i wonder why this file is compiled with Java 9.

a few weeks ago i run the same version of the software with an olde rIntellij version and everything was fine. Also on gitlab ci this error does not happen.

Has anyone a clue what happened ?

@arnaudroger
Copy link
Owner

@arnaudroger arnaudroger commented Aug 2, 2019

is this error in intellij? does the build work from the command line with java8?
in the maven preferences -> Importer what is the vm setup?

the artifact version is managed via profiles that depends on the vm that is ran, somenody recently at an issue in intellij running with sdk 7...
I think it would be better to have an alternative approach to make sure all the dep are in the same classifier... but I don't know of any with maven

Loading

@arnaudroger arnaudroger added this to the 7.0.2 milestone Aug 2, 2019
@arnaudroger arnaudroger removed this from the 7.0.2 milestone Aug 2, 2019
@arnzel
Copy link
Author

@arnzel arnzel commented Aug 2, 2019

Hi running "mvn test" from the command line does not produce this error.

The jdk for import is "Use Internal JRE (java version 11.0.3+12)". even when i switch do a OpenJdk8 version from my computer the error occurs.Same with Oracle JDK 8 version

Loading

@arnaudroger
Copy link
Owner

@arnaudroger arnaudroger commented Aug 2, 2019

have you tried reimporting the maven project after changing the importer? the dependency classifier is selected depending the the jvm running - I tried to see if there is a way to force the classifier down the dependency tree to no avail so far.

Loading

@arnzel
Copy link
Author

@arnzel arnzel commented Aug 2, 2019

Hi @arnaudroger thanks for the help. After reimport everything works as expected :) Tests run from Intellij runs successfully :)

Loading

@arnaudroger
Copy link
Owner

@arnaudroger arnaudroger commented Aug 2, 2019

🍾 will need to document that, it's a bit of pain that I can't seem to be able to solve that in maven ...
might see if I can raise a ticket in intellij to use the sdk of the project for the maven import.

Loading

@arnaudroger
Copy link
Owner

@arnaudroger arnaudroger commented Aug 2, 2019

Loading

@arnaudroger
Copy link
Owner

@arnaudroger arnaudroger commented Sep 2, 2019

that should be fixed in 8
https://simpleflatmapper.org/2019/09/01/v8.0.0.html
I changed the build and I don't use the classifier anymore, instead it generate different artifactId for each jre version

Loading

@arnaudroger arnaudroger closed this Sep 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants