-
Notifications
You must be signed in to change notification settings - Fork 1.1k
ClassNotFoundException when using java.sql package of JDK11 #11646
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
Comments
It would be good to have more info what could be the possible cause if this. Could it be a setup problem? |
The OS information and setup procedure are as follows. OS(VM):CentOS Linux release 7.6.1810 (Core) 3.10.0-957.el7.x86_64
After that, setting the I found out later, it doesn't seem to occur unless it's on the REPL. // Test.scala
object Test {
def main(args: Array[String]): Unit = {
val d: java.sql.Date = new java.sql.Date(100L) // Compile and execution is successfully.
println(d)
}
}
|
On Java 9+, `null` as a parent of a URLClassLoader means the parent is the bootstrap classloader which doesn't contain modules like `java.sql`, explicitly use the system classloader instead. Fixes scala#11646.
On Java 9+, `null` as a parent of a URLClassLoader means the parent is the bootstrap classloader which doesn't contain modules like `java.sql`, explicitly use the system classloader instead. Fixes scala#11646.
On Java 9+, `null` as a parent of a URLClassLoader means the parent is the bootstrap classloader which doesn't contain modules like `java.sql`, explicitly use the platform classloader instead. Fixes scala#11646.
Compiler version
3.0.0-RC1 with Java SE Development Kit 11.0.9
Minimized code
Output
Expectation
You should be able to use the
java.sql
package without any problems.There is no problem with JDK8 or Scala 2.13.5.
In addition, although it was JDK11 that observed the error, strictly speaking, it seems to occur in JDK9 or later versions.
The text was updated successfully, but these errors were encountered: