rediscala
rediscala copied to clipboard
UnsupportedClassVersionError
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!
Same here for 1.9.0!
Re-compiling rediscala
with JDK 8 does the trick.
I don't think we can assure that Scala is 100% compatible with JDK 11.
Yes, but then you have to re-publish the artifact to use it?
Yes, that's correct.
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?
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.
@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?
@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.