[Coldbox 4.3.0][Coldfusion 2016] - Installing to existing Non-Coldbox website

136 views
Skip to first unread message

Mike

unread,
Nov 28, 2017, 4:51:14 PM11/28/17
to ColdBox Platform

I have some experience in programming in Coldbox but no experience in downloading and installing it on an existing site.  The Coldbox examples  spin up a Lucee server which I do not want.

 

I already have a fully functioning non-Coldbox site.  I thought I could simply install Coldbox ( via CommandBox ), create a default layout and all would be fine.  However, I only get errors like “Error building: interceptor-SES…” or “this or that coldbox component can’t be found”.

 

Is it really that difficult to use coldbox on an existing non-coldbox site?  I’ve searched the net extensively but cannot find information on how to do this.  Is there a mapping somewhere that I need to set?


My development web root is c:\inetpub\wwwroot\siteName.


Thanks

br...@bradwood.com

unread,
Nov 28, 2017, 5:13:19 PM11/28/17
to col...@googlegroups.com
I'm a little unclear on exactly what you're trying to do.  There are two things you need installed:
  1. The ColdBox framework itself (usually just placed in the web root in a folder called "coldbox" or somewhere where you can create a /coldbox mapping that points to it
  2. The application itself, or app skeleton.  i.e., your Application.cfc boillerplate, config files, starting handler, views, etc.
You can create both of those in a single step with CommandBox:
 
CommandBox> coldbox create app
 
If you're doing this in a folder of code that already exists, then you might want to be careful so you don't overwrite any existing files in your legacy app, like the Application.cfc.  
Can you explain exactly how you are wanting to integrate Coldbox with your existing application.  You can just dump in the file, but it might make sense to keep them a bit more separated.  There's no automated version of a custom installation like that though once you get off into the weeds of a custom setup.
 
And regarding the Lucee servers, you can still use all the getting started guides, just ignore the part where we have you start a server.  Actually, you may WANT to just follow the full guides as written in a new, empty folder just to familiarize yourself with the framework.  CommandBox can also start up any version of Adobe ColdFusion and it won't interfere with your existing installations either.  When you're done testing, you can just stop the server and delete the files and no harm is done.

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/4b13d722-baa1-48cb-ac5b-4bddff744698%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jon Clausen

unread,
Nov 28, 2017, 7:46:53 PM11/28/17
to col...@googlegroups.com

Mike,

 

At the very minimum, you’re going to need a `coldbox` mapping, if it doesn’t exist in the root of your site. You’ll also make sure that your application start calls the Bootstrap and that you have a config in the conventions directory, or map it using the variables in this Application.cfc:

https://github.com/coldbox-templates/advanced-script/blob/master/Application.cfc

My suggestion would be to take the Application.cfc above and customize it with the items which are in your existing app.  You’ll need to do that with the `onRequestStart` method anyway to be able serve coldbox handlers from your application.

 

Jon

 

From: <col...@googlegroups.com> on behalf of Mike <letsonm...@gmail.com>
Reply-To: "col...@googlegroups.com" <col...@googlegroups.com>
Date: Tuesday, November 28, 2017 at 4:51 PM
To: ColdBox Platform <col...@googlegroups.com>
Subject: [coldbox:26664] [Coldbox 4.3.0][Coldfusion 2016] - Installing to existing Non-Coldbox website

 

I have some experience in programming in Coldbox but no experience in downloading and installing it on an existing site.  The Coldbox examples  spin up a Lucee server which I do not want.

--

mi...@mikeletson.com

unread,
Nov 29, 2017, 10:44:24 AM11/29/17
to ColdBox Platform
Brad,

I already have CF 2016 running on my laptop.  This is the server that I wish to continue using.  Actually, I guess it IS being used since I'm getting all these mapping errors. 

The 'Coldbox' folder is placed right into my site, along with all the other folders (handler,model, view, layout etc). 

I just want to know why I'm getting all these "can't find this and can't find that" type of errors that Coldbox is throwing. 

Sana Ullah

unread,
Nov 29, 2017, 11:03:20 AM11/29/17
to col...@googlegroups.com
Hi Mike

Just guessing that cache setting causing the issue, make sure all these below setting are unchecked at your server.

 

 

 

You might catch me on slack cfml.slack.com and share screen.

Thanks
Sana

To unsubscribe from this group and stop receiving emails from it, send an email to coldbox+unsubscribe@googlegroups.com.

To post to this group, send email to col...@googlegroups.com.

br...@bradwood.com

unread,
Nov 29, 2017, 11:08:23 AM11/29/17
to col...@googlegroups.com
> I already have CF 2016 running on my laptop.  This is the server that I wish to continue using. 
 
I understand and appreciate that.  What I was suggesting was that if you're having issues getting ColdBox running inside your existing server, playing around in a temporary sandbox to get a better understanding of how it works might be beneficial.  You'll also likely find that using CommandBox is way easier than messing with installers.  I haven't "installed" CF or Lucee in years but I use them every day :)
 
> The 'Coldbox' folder is placed right into my site, along with all the other folders (handler,model, view, layout etc). 
 
It's not a requirement that ColdBox be in the same folder as your site.  It's a requirement that /coldbox maps to the coldbox folder.  That means, it either needs to be in the webroot, or you need a mapping.  This isn't a ColdBox thing per se, just the basic way that ColdFusion looks up CFCs.  Since I'm unclear on whether your ColdBox app (handlers, models, etc) are in the web root or in a subfolder off the web root, I can't comment on if you're existing setup should work or not. 
 
> I just want to know why I'm getting all these "can't find this and can't find that" type of errors that Coldbox is throwing. 
 
I'd love to know that too but right now you really haven't provided enough information :)  Start by confirming /coldbox resolves to the framework folder.  It's usually just that simple.  So long as the framework can be found, the app should work.  Without knowing your entire directory structure, the exact URLs you're hitting, and the exact errors you're getting, I can only guess as to what's happening.
 
What I do often times see, is people will try and put their ColdBox app in a subfolder off the web root and they'll stick the ColdBox framework in that subfolder, but neglect to create any sort of mapping.  What will happen is the bootstrap in Application.cfc will "find" the "coldbox.system.Bootstrap" class because it's in the same relative folder which will cause the framework to start to load, but as soon as another file not in the root of the app tries to create a CFC like "coldbox.system.foo" then it errors out because there's still no mapping and the 'same folder" rule doesn't apply.  ColdBox can't control any of that, though.  That's just the rules that ColdFusion uses when trying to resolve CFC paths.
--------- Original Message ---------

mi...@mikeletson.com

unread,
Nov 30, 2017, 12:16:04 PM11/30/17
to col...@googlegroups.com

When I say that all of the Coldbox folders are in my site, what I mean is that they are in c:\inetpub\wwwroot\TopLevelFolder.  The CB folders are in ‘TopLevelFolder’, which is the highest level folder in my website.

 

Does that help?

 

I appreciate your patience.

You received this message because you are subscribed to a topic in the Google Groups "ColdBox Platform" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/coldbox/R2EvgMHjs7g/unsubscribe.
To unsubscribe from this group and all its topics, send an email to coldbox+u...@googlegroups.com.


To post to this group, send email to col...@googlegroups.com.

br...@bradwood.com

unread,
Nov 30, 2017, 12:24:15 PM11/30/17
to col...@googlegroups.com
/coldbox needs to resolve to the folder that contains the coldbox framework. i.e. expandPath( '/coldbox' ).  Or to put it another way, CFC paths such as "coldbox.system.Bootstrap" need to resolve to the actual Bootstrap.cfc file.  I don't know how else to tell you to do it. It's up to you to organize your folders and CF mappings using the rules of ColdFusion so that the above is true.  When you have done that, the framework should work.  
--------- Original Message ---------

mi...@mikeletson.com

unread,
Dec 7, 2017, 2:36:53 PM12/7/17
to col...@googlegroups.com

Finally got it running.  Had to append ‘mySite’ to applicationHelper in Coldbox.cfc like so:

 

applicationHelper = "/mySite/includes/helpers/ApplicationHelper.cfm"

mi...@mikeletson.com

unread,
Dec 7, 2017, 2:36:53 PM12/7/17
to col...@googlegroups.com

That’s how I have it. 

 

I started over by deleting my entire web site so I can start with nothing.  I created my site folder at c:\inetpub\wwwroot\mySite.  I then opened CommandBox and did “coldbox create app name=mySite”.

 

I created the mapping “/coldbox” in the Coldfusion Administrator that points to c:\inetpub\wwwroot\mySite\coldbox.

 

Still no joy.  Nothing resolves.  Just a plethora of “can’t find this or that” errors.

 

If I spin up a Lucee server, no problem.  I don’t understand why it would work on Lucee and not on my already installed CF 16 server.

br...@bradwood.com

unread,
Dec 7, 2017, 2:57:36 PM12/7/17
to col...@googlegroups.com
Don't do that as it means you'll have to change it later if you move your site.  There is a variable already available to you in the CFC called "appmapping" which is a string that contains the path from the web root to where your app lives.  Use that instead.
 
So, what was the fix that got everything working?
--------- Original Message ---------
Reply all
Reply to author
Forward
0 new messages