Hi Brad,
I managed to fix the problem by re-creating the datasource in the CF administrator. As a lesson learnt, I installed commandbox-cfconfig to avoid a repeat of this problem in the future. For server.json, I decided not to pin the adobe version for as long as I am in development mode. I believe it is good to know if something breaks when a new server is released.
I just started my migration from ColdFusion to Coldbox MVC CF2016 engine three months ago, now. I must admit there are a lot of moving parts in Coldbox and the learning curve, to me at least, is not trivial. I totally overlook the server.json configuration settings to pin the Adobe version and even more so the commandbox- cfconfig installation. I have read the full documentation multiple times and do not recall having found anything or warning about this. Maybe, my focus was on other issues. I would nevertheless suggest you guys emphasise more on this in the documentation as part of "deployment guidelines".
As for the "CFCATCH.queryError" message, it was called from my baseDAO.cfc which reported, as expected, a database error since the datasource could not be found as a result of the new server having no datasource mappings. For each query, I caught the database error in a base DAO component. Under "normal circumstances", it bubbles up the error all the way to the handler and displays a nice error message at the bottom of the corresponding view. But, these are not normal circumstances, in my opinion...the server was washed up. To be honest I only made unit tests for all my components so far, but no integration tests yet. I simply do not know how to build an integration test at the moment, because I am using modules and for some reasons my tests always return an error saying that my handlers are not registered, although the application seems to work fine.
I caught the basic database errors (Insert, Update, Read, Delete) in the baseDAO component
<!--- if any database error occur during the above query,... --->
<cfcatch type="database" >
<!--- Build the error message and capture it to a variable --->
<cfset var errorMsg = "#CFCATCH.sqlState#: #CFCATCH.message# #CFCATCH.queryError#" />
<!--- Throw the exception and pass the error message variable for the controller to handle--->
<cfthrow type="DBreadError" message="#errorMsg#" >
All my other DAOs neatly inherit from this baseDAO component, so I believe that the error handling process is pretty streamlined.
Thanks for the feedback.
On Friday, April 13, 2018 at 11:41:22 AM UTC+8, Brad Wood wrote