Hello Alan and Mandy.
I appreciate your explanation and action.
Also I read Lance's mail.
http://mail.openjdk.java.net/pipermail/core-libs-dev/2018-September/055780.html
I verified Lance's patch, it worked...
Many thanks,
Ichiroh Takiguchi
IBM Japan, Ltd.
On 2018-09-29 09:35, Mandy Chung wrote:
On 9/28/18 1:59 AM, Alan Bateman wrote:
On 28/09/2018 08:28, Ichiroh Takiguchi wrote:
Hello.
One of JDBC application with JavaDB did not work on JDK12.
Following exception happened:
java.sql.SQLException: No suitable driver found for
jdbc:derby:xxxxxx
I assume, this issue related Modularity feature...
I could not solve this issue by myself.
I suspect this is related to the de-privileging of the java.sql.rowset
module in JDK 9. The java.sql.rowset module is mapped to the platform
class loader whereas historically the types in this module were
defined by the boot class loader. This is relevant because
java.sql.rowset is making use of the java.sql.DriverManager (in the
java.sql module) and DriverManager is caller sensitive so it sees the
caller coming from java.sql.rowset. This is problematic because the
JDBC driver is on the class path and is not visible to the caller's
class loader. The visibility check has always been in JDBC and I
suspect this usage in the JDBC Rowset implementation only worked by
accident in the past because DriverManager used the TCCL when called
from code defined to the bootstrap class loader. I'm sure Lance will
jump in but all previous investigations into changing behavior going
back 20+ has come to nothing due to compatibility concerns.
It does look like related to the de-privileging of java.sql.rowset
module. JDBC rowset implementation just happened to work in the past
as it was defined to the bootstrap class loader.
I have created JBS issue for this:
https://bugs.openjdk.java.net/browse/JDK-8211295
Mandy