Issues
- mssql can't connect in 5.4, throws the driver couldn't connect - 12.2.0.jre8LDEV-4525Resolved issue: LDEV-4525Michael Offner
- Redis Extension failure - com.fasterxml.jackson jarsLDEV-4516Resolved issue: LDEV-4516Pothys - MitrahSoft
- memcached broken due to log4j with 5.4LDEV-4512Resolved issue: LDEV-4512Zac Spitzer
- OSGI error with memcached driver extension 4.0.0.7-SNAPSHOTLDEV-4466Resolved issue: LDEV-4466Michael Offner
mssql can't connect in 5.4, throws the driver couldn't connect - 12.2.0.jre8
Description
Environment
Attachments
Details
Assignee
Michael OffnerMichael OffnerReporter
Zac SpitzerZac SpitzerPriority
NewNew Issue warning screen
Before you create a new Issue, please post to the mailing list first https://dev.lucee.org
Once the issue has been verified, one of the Lucee team will ask you to file an issue
Affects versions
Details
Details
Assignee
Reporter
Priority
New Issue warning screen
Before you create a new Issue, please post to the mailing list first https://dev.lucee.org
Once the issue has been verified, one of the Lucee team will ask you to file an issue
Affects versions
Activity
Zac Spitzer9 June 2023 at 13:45
created to address this
Martin Webb9 June 2023 at 13:26
I have just run through a couple of scenarios.
On Lucee 5.3.10.120 creating a datasource in Lucee admin using v9.4.1 MSSQL driver and verifying the connection. Then updating the MSSQL driver to 12.2.0. The datasource fails to validate with
The driver could not establish a secure connection
. Just clicking ‘update’ on the datasource allows it to verify, but no further updates to it can be made due to the error thrown that I detailed earlier.On Lucee 5.3.10.120 creating a datasource in Lucee admin using v9.4.1 MSSQL driver and verifying the connection. Then updating to Lucee 5.4.0.65-RC. The datasource now fails to verify with
The driver could not establish a secure connection
. Again, I can get this working by just clicking ‘update’ on the datasource, but no further updates can be made to it without the same error that I detailed earlier. Obviously this could cause problems for people updating to 5.4 from 5.3 that use the admin to defined MSSQL datasources as all those datasources will stop working until they are re-saved.
When you create a new datasource with the 12.2.0 driver the admin form does set a default value via the checkboxes. The problem is that when updating from a driver that does not have these settings, they do not exist until the datasource is re-saved. When creating the connection string, no default value is used if the field is not defined.
After updating from Lucee 5.3.10.120 to Lucee 5.4.0.65-RC, my test datasource config looks like this (taken from the code snippet presented at the bottom of the admin page):
This obviously fails as the connection string does not include the ‘Encrypt’ and ‘TrustServerCertificate’ options.
After clicking ‘update’ un the admin, the config looks like this:
This does connect OK as it now contains the ‘Encrypt’ and ‘TrustServerCertificate’ options.
Clicking ‘update’ again, then gives the The property trustServerCertificate does not contain a valid boolean value. Only true or false can be used.
error.
Zac Spitzer9 June 2023 at 11:48Edited
what does you datasource config look like?
as mentioned Lucee 5.4 automatically sets these params if not set
Martin Webb9 June 2023 at 08:03Edited
I have been following the MSSQL driver problem and have just tried out the updated 12.2.0.jre11 driver on our dev server running Lucee 5.3.10.120 with the following observations.
After updating the driver, any MSSQL datasource that is already defined via the admin no longer worked due to the ‘
The driver could not establish a secure connection
' error that we already know about. Maybe the connection string could use a default value for the two new ‘Encrypt’ and 'TrustServerCertificate’ fields if they are not defined?I went through the datasources and re-saved them, making no changes, so that they then picked up the ‘Encrypt' and ‘TrustServerCertificate’ values. This got the datasources working. However, I can now no longer make any changes to the datasource. Clicking ‘update’ results in an error:
The property trustServerCertificate does not contain a valid boolean value. Only true or false can be used.
I have struggled to find the github repository for the MSSQL extension. There is this one: , but it does not appear to contain any of these updates. I presume I am missing something here. Is this the repository from which the extension is built?
Pothys - MitrahSoft7 June 2023 at 09:57
I checked this issue with lucee versions 5.4.0.74-SNAPSHOT and 6.0.0.432-SNAPSHOT. When I tried to create a datasource connection with MSSQL extension version 12.2.0.jre8, it didn't cause any error and created the datasource successfully. The issue is solved.
[INFO] [java] [script] ERROR Service [ MSsql ] threw [ The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer ( SSL) encryption. Error: "PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target". ClientConnectionId:ca96fa2d-7dfc-432a-a537-41c24158303e ]
this is a build regression due to the newer JDBC driver checking the cert is valid