Fixed
Details
Assignee
UnassignedUnassignedReporter
Ryan CovertRyan CovertPriority
NewLabels
New Issue warning screen
Before you create a new Issue, please post to the mailing list first https://dev.lucee.org
Once the issue has been verified, one of the Lucee team will ask you to file an issue
Affects versions
Details
Details
Assignee
Unassigned
UnassignedReporter
Ryan Covert
Ryan CovertPriority
Labels
New Issue warning screen
Before you create a new Issue, please post to the mailing list first https://dev.lucee.org
Once the issue has been verified, one of the Lucee team will ask you to file an issue
Affects versions
Created 9 November 2021 at 15:48
Updated 6 January 2022 at 06:07
Resolved 17 November 2021 at 12:27
I'm hoping someone can shed some light on this issue. I'm attempting to programmatically add datasources to the Lucee Server context (ie. not on a per-application basis, but rather datasources that are made available to all web contexts on the server). The following call to the <cfadmin> tag to create the datasource (NOTE: "updateDatasource" creates datasources if they don't already exist) or later update the same datasource results in the connectionString never being saved correctly.
<cfadmin action="updateDatasource" type="server" password="F4K31234" bundlename="org.lucee.mssql" bundleversion="8.4.1.jre8" classname="com.microsoft.sqlserver.jdbc.SQLServerDriver" dsn="my_new_datasource" name="my_new_datasource" newName="my_new_datasource" connectionString="jdbc:sqlserver://SQLSERVERNAME\MSSQLSERVER2019;DATABASENAME=my_database;sendStringParametersAsUnicode=true;SelectMethod=direct" dbusername="Temp1234" dbpassword="F4K31234" connectionLimit="100" alwaysSetTimeout="true" validate="false" allowed_select="true" allowed_insert="true" allowed_update="true" allowed_delete="true" allowed_create="true" allowed_revoke="true" allowed_alter="true" allowed_grant="true" clob="true" lineTimeout="60">
Every time this operation is attempted, the Connection String is stored as "my_database". In other words, it appears to ignore the string provided in the connectionString attribute and instead stores the database name or one of the values from the "dsn", "name", or "newName" attributes for the datasource connection string.
This invalid value is proven by editing the datasource within the Lucee Server administrative area or by running another call to <cfadmin> "getDatasource".