Quantcast
Channel: Lucee Dev - Latest topics
Viewing all articles
Browse latest Browse all 536

CFadmin UpdateDatasource syntax

$
0
0

Still on my journey to launch a server instance from a user data script, I’m getting there, but I’m stuck in the adding a datasource step.
I’m creating a temporary .cfm
file to run once then be deleted, this contains:

<cfadmin
    action="updateDatasource"
    type="server"
    password="adminpass"
    classname="com.mysql.cj.jdbc.Driver"
    dbdriver="mysql"
    dsn="mydsn"
    name="mydsn"
    newName="mydsn"
    host="mydburl"
    database="sql5"
    port="3306"
    dbusername="myuser"
    dbpassword="mypass"
    allowMultiQueries = "true"
    blob="false"
    clob="false"
    allowed_select="true"
    allowed_insert="true"
    allowed_update="true"
    allowed_delete="true"
    allowed_alter="false"
    allowed_drop="false"
    allowed_revoke="false"
    allowed_create="false"
    allowed_grant="false"
    remoteClients="arrayOfClients"
>

But this now throws the error:

Cannot invoke "java.sql.Connection.close()" because "this.connection" is null

Which is nort terribly informative. and the documentation is not 100% clear… any ideas?
Don’t forget to tell us about your stack!

OS: Alma Linux 9
Java Version: 21.0.6
Tomcat Version: 10.1.36
Lucee Version: 6.2.0.321

9 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 536