-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Description
I notice that ZIO uses the deprecated sun.misc.SignalHandler:
final def addSignalHandler(signal: String, action: () => Unit)(implicit unsafe: zio.Unsafe): Unit = {
import sun.misc.Signal
import sun.misc.SignalHandler
I'm building a plugin (written in ZIO) that conforms to the Smithy plugin SPI, but when it's loaded by a Java 17 JVM and executed, it crashes:
Projection api-gw-transformer failed: java.lang.NoClassDefFoundError: sun/misc/SignalHandler
java.lang.NoClassDefFoundError: sun/misc/SignalHandler
at zio.VersionSpecific.$init$(VersionSpecific.scala:78)
at zio.package$.<clinit>(package.scala:24)
at zio.ZLogger$.<clinit>(ZLogger.scala:108)
at zio.RuntimePlatformSpecific.$init$(RuntimePlatformSpecific.scala:35)
at zio.Runtime$.<clinit>(Runtime.scala:213)
The stack trace doesn't match, but I'm pretty sure the above code in PlatformSpecific is the problem.
All my plugin code does for now is:
zio.Unsafe.unsafe { implicit u =>
zio.Runtime.default.unsafe.run(ZIO.log("Test")).getOrThrowFiberFailure()
}
I've even tried building with nearly the exact same version of Java (Corretto-17.0.12, whereas Smithy uses Corretto-17.0.12.7.1).
khajavi
Metadata
Metadata
Assignees
Labels
No labels