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

Upgrading break at runtime due to Java Version #888

Closed
fernanluyano opened this issue Sep 26, 2024 · 3 comments
Closed

Upgrading break at runtime due to Java Version #888

fernanluyano opened this issue Sep 26, 2024 · 3 comments

Comments

@fernanluyano
Copy link

Scala Version: 2.12.15
zio version: 2.0.21
zio-logging version: 2.2.2

When I upgrade the the zio-logging version it fails with the following stack trace. There seems to be an underlying dependency that's not compatible with Java 52

UnsupportedClassVersionError: zio/internal/MutableQueueFieldsPadding 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
at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:757)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:473)
	at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:419)
	at com.databricks.backend.daemon.driver.ClassLoaders$LibraryClassLoader.loadClass(ClassLoaders.scala:152)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:352)
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:757)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:473)
	at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:419)
	at com.databricks.backend.daemon.driver.ClassLoaders$LibraryClassLoader.loadClass(ClassLoaders.scala:152)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:352)
	at zio.internal.PartitionedLinkedQueue.<init>(PartitionedLinkedQueue.scala:26)
	at zio.internal.ZScheduler.<init>(ZScheduler.scala:37)
	at zio.internal.DefaultExecutors.makeDefault(DefaultExecutors.scala:29)
	at zio.RuntimePlatformSpecific.$init$(RuntimePlatformSpecific.scala:26)
	at zio.Runtime$.<init>(Runtime.scala:213)
	at zio.Runtime$.<clinit>(Runtime.scala)
@jivanic-demystdata
Copy link

The ZIO env only supports Java 11+ compatibility.

Java 52 seems to be Java8, which we don't support anymore
See also: https://stackoverflow.com/a/35866015/2431728

@fernanluyano
Copy link
Author

fernanluyano commented Sep 26, 2024

Where can I find the java versions compatibility of zio?
It seems Zio supports JDK 8, which I have been using for a long time. Are you referring to Zio logging itself or zio as a whole?

https://zio.dev/overview/platforms/#:~:text=ZIO%20supports%20Java%20versions%208,2.12%2C%202.13%2C%20and%203.

@justcoon justcoon closed this as completed Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants