CFCONFIG: Unable to create a PostgreSql datasource

Hi everyone,
I am having an issue configuring a PostgreSql datasource using cfconfig.json

I am not sure if it is correct or not - but the Lucee Administrator has the following text, to be used in Application.cfc - after I have manually created the datasource;

this.datasources["myDSN"] = {
	class: "org.postgresql.Driver", 
	bundleName: "org.postgresql.jdbc", 
	bundleVersion: "42.7.3",
	connectionString: "jdbc:postgresql://127.0.0.1:5432/myDSN",
	username: "postgres",
	password: "encrypted:f9b7f69697ad4cf96e40ea8571efa9f32771def52e7c69049fd77b3948f62a38",
	
	// optional settings
	blob:true, // default: false
	clob:true, // default: false
	connectionLimit:-1, // default:-1
	liveTimeout:10, // default: -1; unit: minutes
	timezone:'GMT'
	storage:true, // default: false
	validate:true, // default: false
};

(lets just ignore the fact that the timezone attribute does NOT have a comma - and the the validate one DOES…)

If I use JUST these attributes only in my cfconfig.json

"datasources": {
        "myDSN": {
            "class": "org.postgresql.Driver",
            "bundleName": "org.postgresql.jdbc",
            "bundleVersion": "42.7.3",
            "connectionString": "jdbc:postgresql://127.0.0.1:5432/myDSN",
            "username": "postgres",
            "password": "encrypted:5b0561563ff06c7e721d32812335a1bf1acd110c4132cef3a1db2ff76ae5e2cb",
            "blob": true,
            "clob": true,
            "connectionLimit": -1,
            "liveTimeout": 10,
            "timezone": "GMT",
            "storage": true,
            "validate": true
        }
    },

Then the datasource is NOT created.

If I manually create the datasource - and then EXPORT the config to disk - I get different attributes - and significantly more of them, too.

"datasources": {
        "myDSN":{
            "allow":"511",
            "blob":"true",
            "class":"org.postgresql.Driver",
            "clob":"true",
            "connectionLimit":"-1",
            "connectionTimeout":"1",
            "custom":"",
            "database":"myDSN",
            "dbdriver":"PostgreSql",
            "dsn":"jdbc:postgresql://{host}:{port}/{database}",
            "host":"localhost",
            "liveTimeout":"15",
            "metaCacheTimeout":"60000",
            "paramDelimiter":"&",
            "paramLeadingDelimiter":"?",
            "paramSeparator":"=",
            "password":"myPassword",
            "port":"5432",
            "storage":"true",
            "timezone":"GMT",
            "username":"postgres",
            "validate":"true"
        }
}

Doing a copy/paste of this - into my own cfconfig.json:

  • Does create a working datasource for application.

BUT - it is not a PostgreSQL datasource it is:

  • Other - JDBC Driver

I am using:

  • Commandbox 6.1
  • Lucee 6.1.0.243