Derby driver class name v10.15.1.3

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Derby driver class name v10.15.1.3

Kerry
Hi,

I've been trying to configure a Spring boot application to work with version 10.15.1.3 of Derby client and I need to specify the driver name in the applications.properties file (spring.datasource.driver-class-name= *****). Prior to this version I would have used org.apache.derby.jdbc.ClientDriver in the derbyclient.jar .. but it not longer exists in 10.15.1.3 of Derby? I've looked through all the other Derby artifacts for this version and cannot find the class.

Should I be doing something different with this version of Derby? (because of the modularisation introduced in Java 9?) I couldn't see anything in the documentation for v10.15.1.3.

Thanks

Kerry


Reply | Threaded
Open this post in threaded view
|

RE: Derby driver class name v10.15.1.3

Jerry Lampi
Kerry,
Looks like it moved to derbytools.jar.
lib\derbytools.jar->class=org/apache/derby/jdbc/ClientDriver.class
Jerry

-----Original Message-----
From: Kerry <[hidden email]>
Sent: Tuesday, October 22, 2019 3:56 PM
To: [hidden email]
Subject: Derby driver class name v10.15.1.3

Hi,

I've been trying to configure a Spring boot application to work with version 10.15.1.3 of Derby client and I need to specify the driver name in the applications.properties file (spring.datasource.driver-class-name= *****). Prior to this version I would have used org.apache.derby.jdbc.ClientDriver in the derbyclient.jar .. but it not longer exists in 10.15.1.3 of Derby? I've looked through all the other Derby artifacts for this version and cannot find the class.

Should I be doing something different with this version of Derby? (because of the modularisation introduced in Java 9?) I couldn't see anything in the documentation for v10.15.1.3.

Thanks

Kerry


Reply | Threaded
Open this post in threaded view
|

Re: Derby driver class name v10.15.1.3

Kerry
Thanks Jerry,

The one artefact I didn't check, but that doesn't seem right somehow now .. seeing as there is still derbyclient? Should documentation be updated too to reflect that?:

https://db.apache.org/derby/docs/10.15/getstart/rgslib46043.html

I can see if I can raise a ticket if that;s the case

Kerry

On 22/10/2019 22:24, Jerry Lampi wrote:

> Kerry,
> Looks like it moved to derbytools.jar.
> lib\derbytools.jar->class=org/apache/derby/jdbc/ClientDriver.class
> Jerry
>
> -----Original Message-----
> From: Kerry <[hidden email]>
> Sent: Tuesday, October 22, 2019 3:56 PM
> To: [hidden email]
> Subject: Derby driver class name v10.15.1.3
>
> Hi,
>
> I've been trying to configure a Spring boot application to work with version 10.15.1.3 of Derby client and I need to specify the driver name in the applications.properties file (spring.datasource.driver-class-name= *****). Prior to this version I would have used org.apache.derby.jdbc.ClientDriver in the derbyclient.jar .. but it not longer exists in 10.15.1.3 of Derby? I've looked through all the other Derby artifacts for this version and cannot find the class.
>
> Should I be doing something different with this version of Derby? (because of the modularisation introduced in Java 9?) I couldn't see anything in the documentation for v10.15.1.3.
>
> Thanks
>
> Kerry
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Derby driver class name v10.15.1.3

Rick Hillegas-3
Thanks for this discussion, Kerry and Jerry. Please file a docs bug and
suggest how this can be described better.

You are right, it is the modularization of Derby which broke this
behavior for you. Before modularization, the two drivers (embedded and
network) lived in the same package but separate jar files (derby.jar and
derbyclient.jar). That had to be untangled in order to achieve
jigsaw-ready partitioning of packages across jars.

If you rely on driver autoloading and simply connect via
DriverManager.getConnection() using a JDBC URL, then the tools jar is
NOT needed. But if you connect via a DataSource, then you need
derbytools.jar, which contains the old drivers.

You also need derbytools.jar if you boot the drivers the very
old-fashioned way via Class.forName(). I believe that the original
Spring framework pre-dates the driver autoloading introduced by Java 6.
It seems that you still have to tell Spring the driver class name. Our
documentation should say more about this old usage pattern. Thanks in
advance for the doc issue and for your recommendations.

-Rick

On 10/22/19 2:48 PM, Kerry wrote:

> Thanks Jerry,
>
> The one artefact I didn't check, but that doesn't seem right somehow now .. seeing as there is still derbyclient? Should documentation be updated too to reflect that?:
>
> https://db.apache.org/derby/docs/10.15/getstart/rgslib46043.html
>
> I can see if I can raise a ticket if that;s the case
>
> Kerry
>
> On 22/10/2019 22:24, Jerry Lampi wrote:
>> Kerry,
>> Looks like it moved to derbytools.jar.
>> lib\derbytools.jar->class=org/apache/derby/jdbc/ClientDriver.class
>> Jerry
>>
>> -----Original Message-----
>> From: Kerry <[hidden email]>
>> Sent: Tuesday, October 22, 2019 3:56 PM
>> To: [hidden email]
>> Subject: Derby driver class name v10.15.1.3
>>
>> Hi,
>>
>> I've been trying to configure a Spring boot application to work with version 10.15.1.3 of Derby client and I need to specify the driver name in the applications.properties file (spring.datasource.driver-class-name= *****). Prior to this version I would have used org.apache.derby.jdbc.ClientDriver in the derbyclient.jar .. but it not longer exists in 10.15.1.3 of Derby? I've looked through all the other Derby artifacts for this version and cannot find the class.
>>
>> Should I be doing something different with this version of Derby? (because of the modularisation introduced in Java 9?) I couldn't see anything in the documentation for v10.15.1.3.
>>
>> Thanks
>>
>> Kerry
>>
>>

Reply | Threaded
Open this post in threaded view
|

Re: Derby driver class name v10.15.1.3

Kerry
hi Rick,

I'll look into raising a defect - when I tried changing my dependency to the derbytools I ended up with a different error (which I also think is related to the modularisation of Derby) but I didn't have time to investigate further because this was paid work so just downgraded to the java 8 version, but I'll look into this later in the week and make suggestions to suit.

Kerry

On 23/10/2019 02:33, Rick Hillegas wrote:

> Thanks for this discussion, Kerry and Jerry. Please file a docs bug and suggest how this can be described better.
>
> You are right, it is the modularization of Derby which broke this behavior for you. Before modularization, the two drivers (embedded and network) lived in the same package but separate jar files (derby.jar and derbyclient.jar). That had to be untangled in order to achieve jigsaw-ready partitioning of packages across jars.
>
> If you rely on driver autoloading and simply connect via DriverManager.getConnection() using a JDBC URL, then the tools jar is NOT needed. But if you connect via a DataSource, then you need derbytools.jar, which contains the old drivers.
>
> You also need derbytools.jar if you boot the drivers the very old-fashioned way via Class.forName(). I believe that the original Spring framework pre-dates the driver autoloading introduced by Java 6. It seems that you still have to tell Spring the driver class name. Our documentation should say more about this old usage pattern. Thanks in advance for the doc issue and for your recommendations.
>
> -Rick
>
> On 10/22/19 2:48 PM, Kerry wrote:
>> Thanks Jerry,
>>
>> The one artefact I didn't check, but that doesn't seem right somehow now .. seeing as there is still derbyclient? Should documentation be updated too to reflect that?:
>>
>> https://db.apache.org/derby/docs/10.15/getstart/rgslib46043.html
>>
>> I can see if I can raise a ticket if that;s the case
>>
>> Kerry
>>
>> On 22/10/2019 22:24, Jerry Lampi wrote:
>>> Kerry,
>>> Looks like it moved to derbytools.jar.
>>> lib\derbytools.jar->class=org/apache/derby/jdbc/ClientDriver.class
>>> Jerry
>>>
>>> -----Original Message-----
>>> From: Kerry <[hidden email]>
>>> Sent: Tuesday, October 22, 2019 3:56 PM
>>> To: [hidden email]
>>> Subject: Derby driver class name v10.15.1.3
>>>
>>> Hi,
>>>
>>> I've been trying to configure a Spring boot application to work with version 10.15.1.3 of Derby client and I need to specify the driver name in the applications.properties file (spring.datasource.driver-class-name= *****). Prior to this version I would have used org.apache.derby.jdbc.ClientDriver in the derbyclient.jar .. but it not longer exists in 10.15.1.3 of Derby? I've looked through all the other Derby artifacts for this version and cannot find the class.
>>>
>>> Should I be doing something different with this version of Derby? (because of the modularisation introduced in Java 9?) I couldn't see anything in the documentation for v10.15.1.3.
>>>
>>> Thanks
>>>
>>> Kerry
>>>
>>>
>
>