Highlighted

cfcompile webroot error

Community Beginner ,
Feb 09, 2017

Copy link to clipboard

Copied

I'm getting the following error when trying to use cfcompile: "Webroot specified does not exist"

This is the command I've used: 

cfcompile –deploy D:\website D:\website\cfcompilein D:\website\cfcompileout

My default website which I would think would be my webroot is defined in IIS as D:\website. I've defined the same path as "\" in CF mappings.

ColdFusion is installed in C:\coldFusion2016

I'm getting the same result on our CF9 installation.

Any idea what I'm doing wrong?

Thanks

Bob

Community Beginner
Correct answer by bobk07 | Community Beginner

Found the problem. It turns out that the dash in front of -deploy was a long dash not a normal dash. I think I picked up when copying the command line from a web page. So of course the test for "%arg1%"=="-deploy" would always fail. Your suggestion to edit the batch file put me on the right track.

Many thanks for your help.

Bob

Views

346

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

cfcompile webroot error

Community Beginner ,
Feb 09, 2017

Copy link to clipboard

Copied

I'm getting the following error when trying to use cfcompile: "Webroot specified does not exist"

This is the command I've used: 

cfcompile –deploy D:\website D:\website\cfcompilein D:\website\cfcompileout

My default website which I would think would be my webroot is defined in IIS as D:\website. I've defined the same path as "\" in CF mappings.

ColdFusion is installed in C:\coldFusion2016

I'm getting the same result on our CF9 installation.

Any idea what I'm doing wrong?

Thanks

Bob

Community Beginner
Correct answer by bobk07 | Community Beginner

Found the problem. It turns out that the dash in front of -deploy was a long dash not a normal dash. I think I picked up when copying the command line from a web page. So of course the test for "%arg1%"=="-deploy" would always fail. Your suggestion to edit the batch file put me on the right track.

Many thanks for your help.

Bob

Views

347

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Feb 09, 2017 0
Adobe Community Professional ,
Feb 09, 2017

Copy link to clipboard

Copied

Copy the directory containing the files to be compiled, cfcompilein, to the root, C:\coldFusion2016\cfusion\wwwroot. The cfcompile tool is located in C:\coldFusion2016\cfusion\bin. So open MS DOS and change directories till you get to C:\coldFusion2016\cfusion\bin.

Then run

cfcompile -deploy C:\ColdFusion2016\cfusion\wwwroot C:\ColdFusion2016\cfusion\wwwroot\cfcompilein D:\website\cfcompileout

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 09, 2017 0
Community Beginner ,
Feb 10, 2017

Copy link to clipboard

Copied

Thanks,

I tried that suggestion and I still get the same error: “Webroot specified does not exist”

I would have thought that the "webroot" would be the path to the default website as defined in IIS, i.e., D:\website, but it doesn't like that either.

Maybe it needs to be defined somehow to Java, e.g.  in server.xml, just not sure how. I'm hesitant to touch anything though because CF is working fine and using the default website.

Bob

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 10, 2017 0
Adobe Community Professional ,
Feb 11, 2017

Copy link to clipboard

Copied

Strange. I wouldn't go looking into server.xml. Instead, I would look at C:\coldFusion2016\cfusion\bin\cfcompile.bat. There is a possible workaround.

Open the cfcompile.bat file in a text editor. Copy all its contents into a new file, which you then save, as MYcfcompile.bat, in the same directory.

Now, locate in MYcfcompile.bat the code the following code excerpt:

:sourceless_deploy

set webroot=%~f2

set srcdir=%~f3

set deploydir=%~f4

Modify this excerpt to

:sourceless_deploy

set webroot=C:\ColdFusion2016\cfusion\wwwroot

set srcdir=C:\ColdFusion2016\cfusion\wwwroot\cfcompilein

set deploydir=D:\website\cfcompileout

Then run (in DOS):

MYcfcompile -deploy C:\ColdFusion2016\cfusion\wwwroot C:\ColdFusion2016\cfusion\wwwroot\cfcompilein D:\website\cfcompileout

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 11, 2017 0
Community Beginner ,
Feb 13, 2017

Copy link to clipboard

Copied

Found the problem. It turns out that the dash in front of -deploy was a long dash not a normal dash. I think I picked up when copying the command line from a web page. So of course the test for "%arg1%"=="-deploy" would always fail. Your suggestion to edit the batch file put me on the right track.

Many thanks for your help.

Bob

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 13, 2017 0
Adobe Community Professional ,
Feb 13, 2017

Copy link to clipboard

Copied

Aha! What a cracker! Incidentally, if only you had just cut and pasted my first suggestion.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 13, 2017 0
BKBK LATEST
Adobe Community Professional ,
Feb 13, 2017

Copy link to clipboard

Copied

You may wish to report what you have observed as a bug. The error message is itself a ColdFusion bug.

Using the long dash ( –deploy) should produce an error message about the deploy option or about flags in general. Not "Webroot specified does not exist".

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 13, 2017 0