[Coldbox 4.3.0] Getting the initial settings right

60 views
Skip to first unread message

Michael Casey

unread,
Sep 16, 2017, 7:04:26 AM9/16/17
to ColdBox Platform
Having had significant difficulties with various shared hosting companies (way too long and boring to go into) I am forced to refactor the location of the Coldbox files in relation to my application files. And I can't get the application to fire up.

The coldbox directory is no longer at the webroot but is now a directory inside my site root.

My Application.cfc settings are these:

// COLDBOX STATIC PROPERTY, DO NOT CHANGE UNLESS THIS IS NOT THE ROOT OF YOUR COLDBOX APP

COLDBOX_APP_ROOT_PATH = getDirectoryFromPath( getCurrentTemplatePath() );

// The web server mapping to this application. Used for remote purposes or static purposes

COLDBOX_APP_MAPPING   = ""; 

// COLDBOX PROPERTIES

COLDBOX_CONFIG_FILE  = "";

// COLDBOX APPLICATION KEY OVERRIDE

COLDBOX_APP_KEY  = "";


getDirectoryFromPath( getCurrentTemplatePath() ) resolves to "/Applications/ColdFusion11/cfusion/wwwroot/myApp/"

And here's the error:


Could not find the ColdFusion component or interface /Applications/ColdFusion11/cfusion/wwwroot/coldbox/system/Bootstrap.cfc.

 
The error occurred in /Applications/ColdFusion11/cfusion/wwwroot/myApp/Application.cfc: line 34
32 : 	// application start
33 : 	public boolean function onApplicationStart(){
34 : 		application.cbBootstrap = new coldbox.system.Bootstrap( COLDBOX_CONFIG_FILE, COLDBOX_APP_ROOT_PATH, COLDBOX_APP_KEY, COLDBOX_APP_MAPPING );


What setting do I need to change??

br...@bradwood.com

unread,
Sep 16, 2017, 10:27:36 AM9/16/17
to col...@googlegroups.com
Is there a mapping called "/coldbox" that points to the roof of where the Coldbox framework lives?  Also, when you say "ColdBox files", I'm unclear on whether you mean the ColdBox framework, or your app itself.

Thanks!

~Brad

ColdBox/CommandBox Developer Advocate
Ortus Solutions, Corp

E-mail: br...@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com 
 
 
--------- Original Message ---------
--
--
You received this message because you are subscribed to the Google Groups "ColdBox Platform" group.
For News, visit http://blog.coldbox.org
For Documentation, visit http://wiki.coldbox.org
For Bug Reports, visit https://ortussolutions.atlassian.net/browse/COLDBOX
---
You received this message because you are subscribed to the Google Groups "ColdBox Platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to coldbox+u...@googlegroups.com.
To post to this group, send email to col...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/coldbox/4d55cb3a-a5ad-4807-8ba9-67e7857c2c46%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Michael Casey

unread,
Sep 16, 2017, 10:35:43 AM9/16/17
to ColdBox Platform
Hi Brad

>>Is there a mapping called "/coldbox" that points to the roof of where the Coldbox framework lives?  

No. Do I need one? Something like this?

this.mappings[ '/coldbox' ] = "???";


>>Also, when you say "ColdBox files", I'm unclear on whether you mean the ColdBox framework, or your app itself. 

The coldbox framework files are in a directory called 'coldbox' which is inside my application, so the at the same level as the Application.cfc.


br...@bradwood.com

unread,
Sep 16, 2017, 10:47:06 AM9/16/17
to col...@googlegroups.com
> No. Do I need one? 
 
If it's not in the web root, yes.
 
> The coldbox framework files are in a directory called 'coldbox' which is inside my application, so the at the same level as the Application.cfc.
 
Unless it's in the web root, you need a mapping.  That's just how CF works

Thanks!

~Brad

ColdBox/CommandBox Developer Advocate
Ortus Solutions, Corp

E-mail: br...@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com 
 
 
--------- Original Message ---------
Subject: [coldbox:26569] Re: [Coldbox 4.3.0] Getting the initial settings right
From: "Michael Casey" <mrjung...@gmail.com>
Date: 9/16/17 9:35 am
To: "ColdBox Platform" <col...@googlegroups.com>

--
--
You received this message because you are subscribed to the Google Groups "ColdBox Platform" group.
For News, visit http://blog.coldbox.org
For Documentation, visit http://wiki.coldbox.org
For Bug Reports, visit https://ortussolutions.atlassian.net/browse/COLDBOX
---
You received this message because you are subscribed to the Google Groups "ColdBox Platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to coldbox+u...@googlegroups.com.
To post to this group, send email to col...@googlegroups.com.

Michael Casey

unread,
Sep 16, 2017, 11:40:06 AM9/16/17
to ColdBox Platform
Okay, so I added a mapping:

this.mappings[ '/coldbox' ] = COLDBOX_APP_ROOT_PATH & "coldbox/";


This resolves to:
        /Applications/ColdFusion11/cfusion/wwwroot/myApp/coldbox/
which is correct.


Yet, I still get the same error

Could not find the ColdFusion component or interface /Applications/ColdFusion11/cfusion/wwwroot/coldbox/system/Bootstrap.cfc.


The error occurred in /Applications/ColdFusion11/cfusion/wwwroot/zazzu/Application.cfc: line 39
37 : 	// application start
38 : 	public boolean function onApplicationStart(){
39 : 		application.cbBootstrap = new coldbox.system.Bootstrap( COLDBOX_CONFIG_FILE, COLDBOX_APP_ROOT_PATH, COLDBOX_APP_KEY, COLDBOX_APP_MAPPING );




Is there another setting that needs to change?

Michael Casey

unread,
Sep 18, 2017, 11:16:41 AM9/18/17
to ColdBox Platform
I have tried experimenting with the following settings:

COLDBOX_APP_MAPPING = COLDBOX_APP_ROOT_PATH;

COLDBOX_CONFIG_FILE = COLDBOX_APP_ROOT_PATH & "config/ColdBox.cfc";


Everything seems to point to the right places, yet the same error persists. The Application.cfc is still looking 'one level up' for the coldbox directory.


This is just SO frustrating. There must be an answer, it must be a simple one, but I can't find it...

Michael Casey

unread,
Sep 21, 2017, 4:42:11 AM9/21/17
to ColdBox Platform
Okay, I gave up on this, and reverted to an older configuration I had that was working on a shared server (Linux). This application and configuration has been deployed on a new shared server (Windows) and again there seems to be some sort of problem.

The coldbox directory is located at the first level inside the application root as before.

The error is:
Security: The requested template has been denied access to D:/Inetpub/tcbader/cbsys/system.
The following is the internal exception message: access denied ("java.io.FilePermission" "D:/Inetpub/tcbader/cbsys/system" "read")

The stacktrace looks like this:
java.security.AccessControlException: access denied ("java.io.FilePermission" "D:/Inetpub/tcbader/cbsys/system" "read") at cfController2ecfc1578177641$funcLOADCOLDBOXSETTINGS.runFunction(D:/Inetpub/zazzu/coldbox/system/web/Controller.cfc:739) at cfController2ecfc1578177641$funcINIT.runFunction(D:/Inetpub/zazzu/coldbox/system/web/Controller.cfc:104) at cfBootstrap2ecfc1389562529$funcLOADCOLDBOX.runFunction(D:/Inetpub/zazzu/coldbox/system/Bootstrap.cfc:68) at cfApplication2ecfc415942325$funcONAPPLICATIONSTART.runFunction(D:/Inetpub/zazzu/Application.cfc:27)

And my question is, why is the 'coldbox/system/web/Controller.cfc:739' suddenly trying to find a coldbox file several levels up the tree? And what can I do in my settings to correct this?

Reply all
Reply to author
Forward
0 new messages