I am using Coldfusion 9 MX, Windows Server 2008 and Java 1.6.0_30 with JRE6 and Coldbox just does not work right.
If I follow the examples and use CommandBox to create a new app then add a handler/view, when I try and hit the site from the outside world I get HandlerService.EventHandlerNotRegisteredExceptio.
And I have to include the entire Coldbox folder in my application folder in order for anything to work, even trying to run the app from CommandBox. Without the Coldbox folder in the application folder, using the start command simply causes an exception, with the folder it runs from CommandBox.
What might be pertinent is that the application is not at the root level. We run a multitude of application in IIS and they all run from within subfolders within a main folder in our root. IE:
http://ourdomain.com/mainsubfolder/applicationfolder/index.cfm
I know this is not the norm, but I feel ColdBox should handle it no problem. I did but the entire ColdBox folder in our root folder, but it didn’t seem to make a difference.
So are all my issues caused by an outdated Java and JRE? Or are other issues at play here?
Thanks,
Jim Hunter
Your issues have nothing to do with Java. They’re just related to misunderstanding how to set up ColdBox. “/coldbox” needs to resolve to the folder that ColdBox is installed to. Whether you do that by an Application.cfc mapping, a CF server mapping, or literally just dumping the coldbox folder in the webroot is up to you.
For the the most part, ColdBox should work just fine in a sub folder. In some cases, you may need to set the app mapping and config file path manually in your ColdBox app’s Application.cfc.
I don’t know caused your handler service error since you haven’t provided enough information, but chances are, the URL you were hitting in the browser wasn’t correct.
Thanks!
~Brad
ColdBox Platform Evangelist
Ortus Solutions, Corp
E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com
Thanks for the quick reply! I am a Coldfusion novice so my questions may sound odd, but for the COLDBOX_APP_ROOT_PATH and the COLDBOX_CONFIG_FILE, I am assuming that the path here is a relative path to the application root? Or is the APP_PATH an absolute path on the file system?
Looks like an issue I had, that was not obvious, was that the video I was watching on creating handlers, does not 100% work in the version of CommandBox that I am using (just installed it a few weeks ago). In the video the command to create a new handler was:
coldbox create handler myHandler index foo
when I did that, I did not see that it failed in my version so when I was trying to hit the myHandler route, it was failing. I had to use:
coldbox create handler myHandler index,foo,bar
I added the bar, but with a space between the index and foo it fails, a comma and it works.
So for now it looks like I am moving forward.
I am attaching a snap of my commandbox screen, any idea on how to make it display correctly?
Thanks again for your assistance!
Jim
As for the URL I was trying to hit, it was taken from your tutorial video, and I tried both …/approot/newHandler and …/approot/index.cfm/newHandler both give the same result.
Those config settings are documented here:
http://coldbox.ortusbooks.com/content/configuration/bootstrapper.html
The actions parameter has always been a comma delimited list. Where did you see a video showing otherwise. See the help for that command by running “coldbox create handler help” or visiting the API command docs:
http://apidocs.ortussolutions.com/commandbox/3.0.1/index.html?commandbox/system/modules/coldbox-commands/commands/coldbox/create/controller.html
Regarding your screenshot of CommandBox, the ANSI formatting isn’t being handled correctly. What operating system are you on and what program are you using to launch CommandBox (DOS, powershell, Cygwin, etc)? What exact version of CommandBox are you using? Use the “version” command to find out.
Thanks!
~Brad
ColdBox Platform Evangelist
Ortus Solutions, Corp
E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com
My bad, I went back and watched the video again and in fact you do (it was a video by you) include a comma between the parameters. I could swear that I actually paused the video while I was working through your example and there was no comma, but I was wrong.
Thanks for the links, they are very helpful!
As for CommandBox, I am running version 3.0.1+00292 on Windows Server 2008. I am using the Windows Command Prompt window to execute it.
****** update *****
I just found a program called Ansicon which is a replacement console for Windows that supports ansi characters and Commandbox looks correct now, what a difference!
Thanks again for your assistance and for such a nice product!
Jim
Glad to hear it’s working better for you. I use CommandBox on DOS with Windows 7/8 all the time and the ANSI formatting works. It looks like you’re on an older version of the CommandBox 3.1 beta so you might want to update to the latest bleeding edge:
http://integration.stg.ortussolutions.com/artifacts/ortussolutions/commandbox/3.1.0/commandbox-win-3.1.0.zip
Thanks!
~Brad
ColdBox Platform Evangelist
Ortus Solutions, Corp
E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com
If this is an old version of Commandbox then you need to update your website. I just downloaded it again from the Commandbox page on your site and I still got the same version. www.ortussolutions.com/products/commandbox , then scroll to the bottom and download the Windows Binary without the JRE and you get the version I have. I did download the version from your link and got 3.1.0+00363
Thanks again, Jim
Oh sorry, when I looked at the version I thought it said 3.1.0 instead of 3.0.1. You were on the latest stable version which should be find on DOS. The link I provided was to the bleeding edge version of CommandBox which is 3.1.0.
Thanks!
~Brad
ColdBox Platform Evangelist
Ortus Solutions, Corp
E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com