I set up the correct database in MySQL (pain as I use SQL Server) and
the datasource transfersample2 in CF Administrator and then ran the
application from the the samples directory:
http://127.0.0.1/coldbox/samples/applications/TransferSample2/transfersample2/transfersample2/index.cfm
... And yes I re-inited the framework.
1) In Coldbox.cfc:
//Datasources
datasources = {
MyDSN = {name="transfersample2", dbType="mysql"}
};
// custom settings
settings = {
//Transfer ORM settings
TransferSettings.datasourcePath = "config/datasource.xml.cfm",
TransferSettings.configPath = "config/transfer.xml.cfm",
TransferSettings.definitionPath = "/#appMapping#/config/
definitions"
};
//IOC Integration
ioc = {
framework = "coldspring",
reload = true,
objectCaching = false,
definitionFile = "/#AppMapping#/config/coldspring.xml.cfm"
};
2) In coldspring.xml.cfm:
<bean id="transferFactory" class="transfer.TransferFactory"
singeleton="true">
<constructor-arg name="datasourcePath">
<value>${TransferSettings.datasourcePath}</value>
</constructor-arg>
<constructor-arg name="configPath">
<value>${TransferSettings.configPath}</value>
</constructor-arg>
<constructor-arg name="definitionPath">
<value>${TransferSettings.definitionPath}</value>
</constructor-arg>
</bean>
The following exception occurs on all database operations: I must
point out that the readme.txt for the app does say:
Application Execution Exception
Error Type: coldspring.beanCreationException : [N/A]
Error Messages: Bean creation exception during init() of
transfer.TransferFactory
An error occurred when performing a file operation read on file C:
\Inetpub\wwwroot\coldbox\samples\applications
\TransferSample2\transfersample2\transfersample2\$
{TransferSettings.datasourcePath}.:The cause of this exception was:
java.io.FileNotFoundException: C:\Inetpub\wwwroot\coldbox\samples
\applications\TransferSample2\transfersample2\transfersample2\$
{TransferSettings.datasourcePath} (The system cannot find the file
specified).
I must point out that the readme.txt for the app does say the
following (But these are all old versions, and I have the latest???):
What you need