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

UnsupportedClassVersionError #225

Open
graineri opened this issue Aug 21, 2019 · 8 comments · May be fixed by #239
Open

UnsupportedClassVersionError #225

graineri opened this issue Aug 21, 2019 · 8 comments · May be fixed by #239

Comments

@graineri
Copy link

I'm wondering if version 1.8.0 or 1.9.0 were compiled using JVM 11 since I'm getting the following error when I run it using JVM 8:

java.lang.UnsupportedClassVersionError: redis/util/CRC16 has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0

Thanks!

@farico
Copy link

farico commented Aug 26, 2019

Same here for 1.9.0!

@graineri
Copy link
Author

graineri commented Aug 26, 2019

Re-compiling rediscala with JDK 8 does the trick.

I don't think we can assure that Scala is 100% compatible with JDK 11.

@farico
Copy link

farico commented Aug 27, 2019

Yes, but then you have to re-publish the artifact to use it?

@graineri
Copy link
Author

Yes, that's correct.

@etaty
Copy link
Owner

etaty commented Sep 6, 2019

Yes, the JVM I used to compile is JVM 11.
It seems sbt / scala only support up to JVM 8, and it is the default target.

Also, i checked some of class files in the published jar and they are using version 52 (so JVM 8)

$ file unpack-red/redis/api/servers/Slaveof.class
unpack-red/redis/api/servers/Slaveof.class: compiled Java class data, version 52.0 (Java 1.8)
$ javap -verbose unpack-red/redis/RedisCluster.class | grep version
  minor version: 0
  major version: 52

So I am not sure what to do ...
maybe only one file is breaking it?

@graineri
Copy link
Author

graineri commented Nov 1, 2019

Please check this file: redis/util/CRC16.

I am not sure why you have certain files with version 52.0 and others with 55.0.

@vamsiampolu
Copy link

@graineri Have you (by any chance) re published the artifact on a repository to use Java 8? If not, could you help me do that?

@graineri
Copy link
Author

graineri commented Jun 1, 2020

@vamsiampolu, I haven't re-published it to any public repository.

Sure. What do you need? You can try running sbt publishLocal and that should generate all the artifacts locally.

@zaneli zaneli linked a pull request Aug 26, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants