Client Variables - Database creation failed on MSSQL

Description

Brought over from
https://issues.jboss.org/browse/RAILO-1830

  • Added a new Client Variables Database to Lucee.

  • Checked that Storage is yes, and defined this Database to be used.

  • First cfm execution gives an Error, the Create Table on the Database fails

Environment

None

Attachments

3

Activity

Michael Offner 20 March 2017 at 16:35

"solved" issue following suggestion (see above), this fix does not really solve the issue, you will still have a exception, but the exception should now report in more details, why this issue happening. for example because the user used has no right to create the necessary table.

Michael Offner 20 March 2017 at 15:57

FYI as you can see next to the Ansi92 class is a MSSQL and MySQL class. it was planned to make an independent implementation for this datasource types. wanted to implement them ...

Pothys - MitrahSoft 21 December 2016 at 09:04

Yes, I've already noticed it & i agree with it. Surely we need to show the original error which happened in the first try/catch. But the first error may not relevant to the issue in some cases. each try/catch is related to a specific set of DBMS like MSSQL, MySql, Oracle & MS Access( with different versions). Better we can check what error is happening at the moment, if the error is a permission issue, then we can just throw the error. Otherwise we can proceed with next try/catch. This is the correct way to fix this issue, I think.

I've uploaded a sample test file(test.cfm) to explain the scenario in a better way. But for producing the error, we need to create a sql login/user with lack of permission, as i explained in my previous comment. Also please look at the Error.png image file. If we're experiencing permission issue on a try/catch, There should be no reason to proceed with next try/catch.

Brad Wood 20 December 2016 at 15:54

Did you see my last comment on this ticket where I explained what was happening? This basically happens when you have incorrect permissions, but the way we're catching and discarding errors causes the real issue to be obfuscated. Minimally, the code needs improved to let the user know when there is a permissions error. Ideally the code needs rewritten to better detect the database and not just start throwing code at it until something doesn't error. The way it is now, there's no good way to tell the difference between an error caused by trying SQL that doesn't work on a given engine and an error caused by an actual mis-configuration. In the case of this ticket, the issue was a misconfiguration, but the error messages masked that fact.

Fixed

Details

Assignee

Reporter

Priority

Fix versions

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

Sprint

Affects versions

Created 10 September 2015 at 23:41
Updated 28 March 2017 at 22:38
Resolved 27 March 2017 at 16:39