Running from sbt works fine, but if trying to run the jar gotten from the assembly task, I get this instead.
Exception in thread "main" java.lang.BootstrapMethodError: call site initialization exception
at java.lang.invoke.CallSite.makeSite(CallSite.java:341)
at java.lang.invoke.MethodHandleNatives.linkCallSiteImpl(MethodHandleNatives.java:307)
at java.lang.invoke.MethodHandleNatives.linkCallSite(MethodHandleNatives.java:297)
at shadetest.SymbolUser$.main(SymbolUser.scala:5)
at shadetest.SymbolUser.main(SymbolUser.scala)
Caused by: java.lang.TypeNotPresentException: Type scala.Symbol not present
at sun.invoke.util.BytecodeDescriptor.parseSig(BytecodeDescriptor.java:85)
at sun.invoke.util.BytecodeDescriptor.parseMethod(BytecodeDescriptor.java:63)
at sun.invoke.util.BytecodeDescriptor.parseMethod(BytecodeDescriptor.java:41)
at java.lang.invoke.MethodType.fromMethodDescriptorString(MethodType.java:1067)
at shadetest.shade.scala.runtime.SymbolLiteral.bootstrap(SymbolLiteral.java:25)
at java.lang.invoke.CallSite.makeSite(CallSite.java:294)
... 4 more
Caused by: java.lang.ClassNotFoundException: scala.Symbol
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at sun.invoke.util.BytecodeDescriptor.parseSig(BytecodeDescriptor.java:83)
... 9 more
I can't seem to be able to shade Scala 2.12.8 in a way that doesn't break when running if I'm using symbols.
With a rule like this
And a scala file like this
Running from sbt works fine, but if trying to run the jar gotten from the assembly task, I get this instead.
I've created a small repo to reproduce the error here https://github.com/Katrix/SbtAssemblyError