I am currently starting a new project and I have decided to use the ColdBox framework. However…, I am running into some issues during the initial setup. I have followed the documentation…, but I am unsure about a few key steps that might be causing problems in my environment.
Specifically…, I am having trouble configuring the datasource in the ColdBox configuration file. I have tried different settings…, but it seems like the application isn’t connecting properly to the database.
Could anyone with experience using ColdBox give me some guidance on how to correctly configure this: ?? Any tips on common pitfalls to avoid during the initial setup would be greatly appreciated.
Can you give us an example of what you are setting in the config/Coldbox.cfc file?
While the coldbox.cfc file may have references to the datasource name, it does not set the datasource for the application. This is done in Application.cfc. There are a few ways it can be handled. The most common are:
One, you create the datasource in the ACF/LUCEE admin and set datasource name in the application.cfc
this.datasource = "AppDataSource";
Or two, define the datasource in the Application.cfc file as well and then set the default datasource
A quick tip that may seem obvious but remember to verify that you can connect to the database using something other than ColdFusion. Much easier to troubleshoot access and authentication issues.
One of the great things about Ortus is the large quantity of training, documentation and references that are available. Here are a few that I would suggest other than the obvious, this site.