Highlighted

Could not find the ColdFusion component or interface model.statistics.

New Here ,
Sep 06, 2018

Copy link to clipboard

Copied

Hi,

I'm getting that error even though statistics.cfc is present in model directory, I installed coldfusion 2018 and this code was written in cf10 and it was working fine only changed cf version cos I migrated my site to other hosting server where I installed latest coldfusion 2018 and getting that error now PFA.  Screen Shot 2018-09-06 at 9.13.28 PM.png

Some syntax has changed in latest version ?

Please help !
Best,

Sikander

Views

1.5K

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

Could not find the ColdFusion component or interface model.statistics.

New Here ,
Sep 06, 2018

Copy link to clipboard

Copied

Hi,

I'm getting that error even though statistics.cfc is present in model directory, I installed coldfusion 2018 and this code was written in cf10 and it was working fine only changed cf version cos I migrated my site to other hosting server where I installed latest coldfusion 2018 and getting that error now PFA.  Screen Shot 2018-09-06 at 9.13.28 PM.png

Some syntax has changed in latest version ?

Please help !
Best,

Sikander

Views

1.5K

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
Sep 06, 2018 0
LEGEND ,
Sep 06, 2018

Copy link to clipboard

Copied

Did you map to model?  You can do it either in CFAdmin or by code.

HTH,

^ _ ^

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...
Sep 06, 2018 0
New Here ,
Sep 06, 2018

Copy link to clipboard

Copied

Never had to do any explicit mapping before for this same code. Anyways how can I do this mapping ?

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...
Sep 06, 2018 0
LEGEND ,
Sep 06, 2018

Copy link to clipboard

Copied

Well, you can do it in code (in application.cfc)

this.mappings['/model'] = "D:/path/to/model/folder/";

or

<cfset this.mappings['/model'] = "D:/path/to/model/folder/" />

Or you can do it in CFAdmin.  I forget exactly where it is, but you can browse the left nav and find it.  Create a new one, call it "model" and click to find the folder.  The caveat is that this will be available to all projects, not just one.  That could be good or bad, depending.

HTH,

^ _ ^

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...
Sep 06, 2018 0
LEGEND ,
Sep 06, 2018

Copy link to clipboard

Copied

Oh, and also, just in case your DEV and PRODUCTION environments are not identical, you can also use ExpandPath() and some regex to dynamically set the value of the mapping, as long as the model folder is under the web root folder.

HTH,

^ _ ^

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...
Sep 06, 2018 0
Adobe Community Professional ,
Sep 06, 2018

Copy link to clipboard

Copied

sikandera93427573  wrote

Never had to do any explicit mapping before for this same code. Anyways how can I do this mapping ?

This implies that you should place your component, statistics.cfc, either in

C:\ColdFusion2018\cfusion\wwwroot\model\

or in

C:\ColdFusion2018\cfusion\wwwroot\r2m\a\model\

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...
Sep 06, 2018 0
New Here ,
Dec 06, 2018

Copy link to clipboard

Copied

Can we get an answer as to WHY this is suddenly necessary in CF2018?

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...
Dec 06, 2018 0
Adobe Community Professional ,
Dec 06, 2018

Copy link to clipboard

Copied

JTech​, as far as I know, it has always been like that.

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...
Dec 06, 2018 0
New Here ,
Dec 07, 2018

Copy link to clipboard

Copied

We have the application running on ColdFusion 2016 and ColdFusion 2018 and I can demonstrate that this was definitely NOT required before ColdFusion 2018.  This application has gone through at least 3 ColdFusion upgrades and this is the first I've had to add a mapping to instantiate my CFCs.

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...
Dec 07, 2018 0
Adobe Community Professional ,
Dec 08, 2018

Copy link to clipboard

Copied

Jtech, first, can you help us by saying if you work with Sikander and are referring to his same issue, or one of your own that is similar? It's just not clear from your responses in this thread.

And can either of you tell us where the model folder is (and was in 2016)? And Sikander you show the calling code being in the cfusion/wwwroot. Was that there in your 2016 setup?

And in both cases, were you using cf's built in web server  or an external web server like iis or apache (set to use this cfusion/wwwroot, as some people do, though it's not necessary to put the code there then) 

Answers for all these may help us (or you) better understand what's up (or what's changed, in case it's not that "nothing" has).

One last thing: if none of the above helps connect dots to a solution, what happens if you change the model folder name and the call to it to be model? I'm not saying you should HAVE to. I'm simply asking what happens if you do. It's a potentially useful point of diagnosis.

/charlie

/Charlie (server troubleshooter, carehart.org)

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...
Dec 08, 2018 0
New Here ,
Dec 08, 2018

Copy link to clipboard

Copied

@Charlie I'm not 100% certain it's the same issue, but adding a mapping fixed the error for me too.  In my case it appears that ColdFusion 2018 was failing on an extends="component" even though the component that was being extended was in the same folder as the component extending it.  Both components previously mentioned were in this folder in my case: mobile2\sys\.   They have been in this folder since at least CF10.  The error I got was similiar:  Could not find the ColdFusion component or interface mobile2.sys.component

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...
Dec 08, 2018 0
New Here ,
Dec 08, 2018

Copy link to clipboard

Copied

@Charlie as I think about this more here is some additional info that may be useful:
1. There are other applications that have been migrated to ColdFusion 2018 instantiating CFCs as they always have (i.e. no problems).
2. We are using IIS (Windows Server 2019)
3. The root of the mobile2 application is actually as subfolder of another configured ColdFusion site.  One IIS site rooted within another each configured as seperate sites in IIS and with the Web Connector.

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...
Dec 08, 2018 0
Adobe Community Professional ,
Dec 08, 2018

Copy link to clipboard

Copied

Jtech, it would be helpful then for you also to answer all the questions I'd raised to Sikander.

You both are asserting that this is a problem new in 2018, and fair enough. But I'll say I've not seen it among others running it--and lest anyone assert that "maybe no one is using it yet", that's not so. I have many clients running it in production (for example).

So let's see if we can find what you two may share about your configuration that may be causing this, or perhaps exposing some bug.

/Charlie (server troubleshooter, carehart.org)

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...
Dec 08, 2018 0
Adobe Community Professional ,
Dec 08, 2018

Copy link to clipboard

Copied

Ah, ok. Thanks. You must have been writing that as I was writing my reply to your first note. I do t see anything immediately but perhaps someone else will. And let's see what Sikander says, to see if there's some common denominator 

/Charlie (server troubleshooter, carehart.org)

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...
Dec 08, 2018 0
Adobe Community Professional ,
Dec 09, 2018

Copy link to clipboard

Copied

Perhaps it is a new issue in ColdFusion but, then again, perhaps not. Hence, my question earlier about the paths

C:\ColdFusion2018\cfusion\wwwroot\model\statistics.cfc

C:\ColdFusion2018\cfusion\wwwroot\r2m\a\model\statistics.cfc

Do these paths exist? Could it be that you inadvertently changed the location of the calling page, log.cfm?

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...
Dec 09, 2018 0
New Here ,
Dec 10, 2018

Copy link to clipboard

Copied

@BKBK in my case the application is running outside of the cfusion/wwwroot folder and does not use this path for anything I'm aware.  The error appears to occur on an extends="component" statement.  Where the extended component and the component extending it exist in the same path.

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...
Dec 10, 2018 0
BKBK LATEST
Adobe Community Professional ,
Dec 10, 2018

Copy link to clipboard

Copied

JTech​, it would perhaps be more convenient if you could start your own thread, giving details of your file system..

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...
Dec 10, 2018 0