• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

cfcompile webroot error

Community Beginner ,
Feb 09, 2017 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

Views

594

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
community guidelines

correct answers 1 Correct answer

Community Beginner , Feb 13, 2017 Feb 13, 2017

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

Votes

Translate

Translate
Community Expert ,
Feb 09, 2017 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

Votes

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
community guidelines
Community Beginner ,
Feb 10, 2017 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

Votes

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
community guidelines
Community Expert ,
Feb 11, 2017 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

Votes

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
community guidelines
Community Beginner ,
Feb 13, 2017 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

Votes

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
community guidelines
Community Expert ,
Feb 13, 2017 Feb 13, 2017

Copy link to clipboard

Copied

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

Votes

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
community guidelines
Community Expert ,
Feb 13, 2017 Feb 13, 2017

Copy link to clipboard

Copied

LATEST

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".

Votes

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
community guidelines
Resources
Documentation