Skip to main content
sysops26283666
Participant
January 28, 2021
Question

2021 cfsetup datasource export not working with custom driver?

  • January 28, 2021
  • 2 replies
  • 1372 views

I tried to automate my installation and configuration for CF2021 on a docker container but i´m stuck with importing the exported configuration of datasources type "other" ( Custom Microsoft JDBC Driver provided through .jar in cfusion/lib folder).

My steps where:

1. Start Docker Container & import .jar file in lib

2. Create the datasource on CFAdmin - connection established - everything green and connection works with cfquery.

3. cfsetup export datasource datasource.json cfusion

4. Throw away docker container & Start new

5. cfsetup import datasource datasource.json cfusion

Error Message:

ERR: Validation failed for following setting(s) in DATASOURCE:
DRIVER.
ERR: Import of datasource_test in DATASOURCE is unsuccessful.
ERR: Import of DATASOURCE is unsuccessful.

As the error messages mentiones "DRIVER" i looked at the json to find this line:

"DRIVER""Microsoft JDBC 7.4.1 Driver",
I already tried to remove the . and whitespaces - same results.
 
I also tried the exact same thing with the builtin Microsoft SQL Server Driver - this works fine.
 
Someone has an Idea why this is not working?
This topic has been closed for replies.

2 replies

BKBK
Community Expert
Community Expert
April 1, 2022

@sysops26283666 ,

Since you want to use Oracle, wouldn't an Oracle JDBC driver then be preferable to a Microsoft one?

Inspiring
March 30, 2022

We're seeing the same issue, albeit that when the data source with a Driver Type of Other is exported, the value of DRIVER (in the exported JSON) is an empty string.

 

Importing that file via import datasource datasource.json results in:

ERR: Provide the required setting key(s): DRIVER

 

Editing the empty string value to "other" in the hope that might work, results in:

ERR: Validation failed for following setting(s) in DATASOURCE:
DRIVER.

 

Dear Adobe: Can you please address this? Making the setup entirely scriptable is a tremendous benefit, and this is the only blip.

Thank you!

BKBK
Community Expert
Community Expert
April 1, 2022

Is the driver "Microsoft SQL Server"?

Inspiring
April 1, 2022

No, it's a connection to Oracle created using the Driver type Other.

 

We're using ColdFusion Standard 2021. I reaslised only after purchasing that the Standard licence doesn't permit you to use the Oracle driver that ships with ColdFusion. Attempting to do so causes the ColdFusion Administrator to display the message:

 

java.sql.SQLException: Use of Adobe JDBC Drivers is restricted. Drivers can only be used with Adobe server products. Please check that your license supports the requested driver.

 

So we've put a copy of ojdbc11.jar in {cfroot}/cfusion/bin, created a DSN with a driver type set to Other and a JDBC URL that points to the Oracle database.

 

The DSN connects to Oracle fine, but after being exported, it can't be subsquently imported via cfsetup. As commented before, the value of the DRIVER field in the exported JSON is an empty string, and the import routine doesn't recognise the empty string implies Other.

 

Thanks.