DSNs broken on latest `ortussolutions/boxlang:miniserver` Docker image

This might be pre-emptive of me as no-one’s said “there are new docker images”, but I saw @jclausen had pushed new images an hour or so ago, so rebuilt my test env.

Datasources are now breaking with:

Unable to create datasource connection:
Datasource configuration must contain a 'driver',
or a valid JDBC connection string in 'url'.

The DSN config I have has not changed since running on the previous image (which we identified was a coupla weeks old). From Application.cfc:

this.datasources["dsn1"] = {
    driver = "mysql",
    properties = {
        host = "database.backend",
        port = 3306,
        database = server.system.environment.MARIADB_DATABASE,
        username = server.system.environment.MARIADB_USER,
        password = server.system.environment.MARIADB_PASSWORD,
        custom = {
            useUnicode = true,
            characterEncoding = "UTF-8",
            noAccessToProcedureBodies = true

this.datasource = "dsn1"

Can provide more info if you like… not sure what would be most helpful…?

And to confirm, I have the bx-mysql modules installed via:

// box.json

And can confirm the files are indeed @ ~/.boxlang/modules/bx-mysql

I think the driver property needs to go inside the properties object. @MichaelBorn can you confirm

1 Like

Happy to move it, but that would be a change from the previous Docker image.

I am basing my current config on @gpickin 's info in https://community.ortussolutions.com/t/where-to-drop-the-mariadb-jar-in-a-docker-container/10118/8 (which he said he got from @MichaelBorn)

This - however - conflicts with Michael’s guidance here:

But, like I said… that exact config I listed above was working until I rebuilt my container using your latest Docker image (updated around 08:00UTC yesterday).

Cheers for looking into this, @jclausen !

we are archiving all posts on the private community, since we now the boxlang.ortusbooks.com is the authoritative way. Good catch.

Sorry about that @adamcameron , yes Jon is correct - the driver should either go inside the properties or, in my preference, you should drop the properties altogether and move the fields to the top level. This was done for simplicity, as well as easier compatibility with Lucee’s datasource definitions.

The official docs for BoxLang datasource definitions are here:

Did you read that post before you wrote this? Because I updated those docs several days ago. See this note under the Datasource Definition section:

NOTE: Datasource configuration no longer requires a properties struct. See the BoxLang Queries documentation for more details.

EDIT: My bad, I see what you were saying. Yes, the documentation is correct here, and Gavin’s comment (while correct at the time) is no longer correct.

Coolness. lemme test that…



Cheers @MichaelBorn & @jclausen

1 Like