RE: Re: Re: [contentbox-version] Re: ContentBox3 installation error on Windows, Lucee5, MSSQL

So it sounds like ORM is failing to kick in and create the tables in the DB. Is there anything in any log files that might explain. Lucee can be horrible at helping troubleshoot things like this. A trace on the DB might also show if CF even tried and if an error happened. Sadly, Lucee never throws an exception for any error that happens while loading the Application.cfc which includes any issues that happen while starting ORM. I’ve pointed this out and it’s been described to me as a “feature” which will not be changed :confused: I do think that Micha was supposed to be adding some extra logging in place in the very latest version of Lucee 5.2 since it makes this sort of error impossible to troubleshoot.

Thanks!

~Brad

ColdBox/CommandBox Developer Advocate
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com

Sorry Brad, I changed my post. It IS creating tables with data. I blew away all tables in the DB and restarted my Lucee server, and filled out the Installer forms again. It created the tables with data in them again, but it still hit the [cbPermission] error.

There is a unique constraint in the cbPermissions table turn that off.

Brad found out that the issue is that for some reason the tables are generated on the master schema.

Luis Majano
CEO
Ortus Solutions, Corp

P/F: 1-888-557-8057

The constraint is not the solution. The issue is that hibernate for some reason creates the tables in the master schema. I am guessing it is a dialect issue. Make sure you add the mssql dialect in application.cfc. Please note also that I cannot replicate on mssql 2016

Luis Majano
CEO
Ortus Solutions, Corp

P/F: 1-888-557-8057

To be clear, I’m not sure if the issue I ran into while testing is also happening for Jim, but yes when I tested on Lucee 4 and SQL Server 2012, all the tables were being created in the master database despite the fact that the datasource had the proper database name put in. Very strange indeed, but it also confused my testing since I thought my DB was still empty, when in reality ContentBox was using a totally different database.

Jim, the other issue we found was that our Travis CI builds weren’t actually running like we thought they were so you were installing the bleeding edge installer, you were actually getting an older installer without the latest code. Please start from scratch in an empty folder with an “install contentbox-installer@be” and an empty database and see how it works. Also, confirm that Hibernate is writing to the tables you think it is. I actually ran a trace on my DB with SQL Profiler to figure out what database it was hitting.

Thanks!

~Brad

ColdBox/CommandBox Developer Advocate
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com

Thanks for the clarification. This sheds more light on what was going on. The tables had already been created in the master DB that was why I was always getting the error about inserting a record that already existed in the cbpermissions db.

I can confirm that the BE version - install contentbox-installer@be - did work this time with SQL Server 2014. I didn’t have to fuss with the dialect either. I got through the installer entirely. I appreciate you guys looking into this. This nasty bug seems to have made its way through several versions of ContentBox. Looks like 3.7 is the really stable version moving forward.

Jim

When I use Adobe CF2016 & Microsoft SQL Server 2014 and I have a data source predefined I get this script error. The CFML compiler was processing:

  • A script statement beginning with boolean on line 44, column 9.

    The error occurred in C:/projects/pmses_docs/modules/contentbox/models/security/AuthorService.cfc: line 44
    Called from C:/projects/pmses_docs/coldbox/system/core/util/Util.cfc: line 222
    Called from C:/projects/pmses_docs/coldbox/system/ioc/config/Mapping.cfc: line 599
    Called from C:/projects/pmses_docs/coldbox/system/ioc/config/Binder.cfc: line 991
    Called from C:/projects/pmses_docs/coldbox/system/web/services/ModuleService.cfc: line 430
    Called from C:/projects/pmses_docs/coldbox/system/web/services/ModuleService.cfc: line 396
    Called from C:/projects/pmses_docs/coldbox/system/web/services/ModuleService.cfc: line 396
    Called from C:/projects/pmses_docs/coldbox/system/web/services/ModuleService.cfc: line 345
    Called from C:/projects/pmses_docs/coldbox/system/web/services/LoaderService.cfc: line 57
    Called from C:/projects/pmses_docs/coldbox/system/Bootstrap.cfc: line 70
    Called from C:/projects/pmses_docs/Application.cfc: line 78


    <br>42 : * This function will encrypt an incoming target string using bcrypt and compare it with another bcrypt string<br>43 : */<br>**44 : boolean function isSameHash( required string in, required string target ){**<br>45 : return variables.bcrypt.checkPassword( [arguments.in](http://arguments.in), arguments.target );<br>46 : }<br>



    <br>Stack Trace <br> at cfUtil2ecfc517813489$funcGETINHERITEDMETADATA.runFunction(C:/projects/pmses_docs/coldbox/system/core/util/Util.cfc:222) at cfMapping2ecfc1885837914$funcPROCESS.runFunction(C:/projects/pmses_docs/coldbox/system/ioc/config/Mapping.cfc:599) at cfBinder2ecfc281857222$funcPROCESSMAPPINGS.runFunction(C:/projects/pmses_docs/coldbox/system/ioc/config/Binder.cfc:991) at cfModuleService2ecfc1269276922$funcACTIVATEMODULE.runFunction(C:/projects/pmses_docs/coldbox/system/web/services/ModuleService.cfc:430) at cfModuleService2ecfc1269276922$funcACTIVATEMODULE.runFunction(C:/projects/pmses_docs/coldbox/system/web/services/ModuleService.cfc:396) at cfModuleService2ecfc1269276922$funcACTIVATEMODULE.runFunction(C:/projects/pmses_docs/coldbox/system/web/services/ModuleService.cfc:396) at cfModuleService2ecfc1269276922$funcACTIVATEALLMODULES.runFunction(C:/projects/pmses_docs/coldbox/system/web/services/ModuleService.cfc:345) at cfLoaderService2ecfc886478620$funcLOADAPPLICATION.runFunction(C:/projects/pmses_docs/coldbox/system/web/services/LoaderService.cfc:57) at cfBootstrap2ecfc2119245344$funcLOADCOLDBOX.runFunction(C:/projects/pmses_docs/coldbox/system/Bootstrap.cfc:70) at cfApplication2ecfc1720643368$funcONAPPLICATIONSTART.runFunction(C:/projects/pmses_docs/Application.cfc:78) <br><br>