BoxLang: Our new JVM Dynamic Language made by Ortus! Check it out: https://www.boxlang.io

Params sendStringParametersAsUnicode in datasource dsn config is not working

Description

i'm using version 1.0.1

exporting datasources with "Enable High ASCII Characters" enabled from a server
with the command

"cfconfig export from=[fromPath] to=[toPath] fromFormat=adobe@10"

i'm getting json with datasource settings with "sendStringParametersAsUnicode=true"

But when I start a server with the exported configuration, the datasources with sendStringParametersAsUnicode enabled have "Enable High ASCII Characters" disabled

Environment

None

Attachments

1
  • 02 Nov 2018, 08:08 PM

Activity

Show:

Ben FerdinandusOctober 18, 2019 at 9:31 AM

Hi,

We encoutered the same problem. I’m going to try and fix this.

Former userNovember 2, 2018 at 8:54 PM

Unfortunately I won't be able to work on this

Brad WoodNovember 2, 2018 at 8:38 PM

Thanks for the additional research. It looks like CFConfig tracks maxPooledStatements and queryTimeout for each datasource, so that may just be a matter of making sure we're extracting the setting and putting it back into the JDBC URL. Then it sounds like we need to add the new unicode property to the baseConfig's addDatasource method and then need to implement the logic to use it for Lucee, Railo, and Adobe CF providers. I would recommend using the same placeholders I used for port and database, etc here.

Note, we also need to update the commandbox-cfconfig repo and modify the cfconfig datasource save command as well to account for this new property.

Would you like to take a stab at this and send a pull request?

Former userNovember 2, 2018 at 8:32 PM
Edited

hi ,

the only difference between the neo-datasources.xml with DSN imported and the one with the one manually modified is the value true/false of sendStringParametersAsUnicode (the one manually modified having the value true)

querytimeout and MaxPooledStatements have the same issue

Brad WoodNovember 2, 2018 at 7:11 PM
Edited

hi can you update the ticket to not have as much config redacted? Or maybe attach a full JSON file (with any passwords removed) that shows the issue. Also, can you compare the neo-datasources.xml file in your install between the CFConfig imported DSN and one added manually so we can determine exactly what is different between the two.

There's a good chance it's coming from the default setting here:
https://github.com/Ortus-Solutions/cfconfig/blob/master/models/BaseAdobeDSNMapper.cfc#L343

CFConfig attempts to build the JDBC URL from scratch for any of the built-in DSN types since Lucee and Adobe have different URLs. I'm curious if querytimeout and MaxPooledStatements have the same issue since they are part of that URL and there may not be any special code to handle them right now.

It looks like sendStringParametersAsUnicode is a top level setting for Adobe DSN's so I think we need to create a key in the CFConfig JSON for it and make sure the URL gets updated correctly.

Also, we need to research how Lucee handles this same setting and see if it has the same issue there. Here's the line that seems to have the default MSSQL JDBC URL for Lucee
https://github.com/Ortus-Solutions/cfconfig/blob/master/models/BaseLucee.cfc#L541

Note: Adobe has a sendStringParametersAsUnicode setting for both MSSQL and Oracle, but I'm not sure if Lucee does the same.

Fixed
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Priority

Sentry

Created November 2, 2018 at 6:18 PM
Updated January 23, 2020 at 6:06 AM
Resolved January 23, 2020 at 6:06 AM

Flag notifications