Copy link to clipboard
Copied
We have just upgraded the CF2018. When we installed the new build and are having an access issue. Here is the error message below. Can someone shed a light on this? Many thanks.
Message: The getArrClientReportButtonEnabled package method in the D:\Solutions\R_274_8_1-20200610145034.896\Web\Flexible\IpsPhase.cfc component cannot
be accessed from d:\Solutions\R_274_8_1-20200610145034.896\Web\Flexible\IpsPhase.cfm., Template: /Flexible/IpsPhase.cfm, Diagnostics:
The getArrClientReportButtonEnabled package method in the D:\Solutions\R_274_8_1-20200610145034.896\Web\Flexible\IpsPhase.cfc component canno
t be accessed from d:\Solutions\R_274_8_1-20200610145034.896\Web\Flexible\IpsPhase.cfm. <br>The error occurred on line 233.,
Root Cause: coldfusion.runtime.TemplateProxy$InvalidPackageAccessException: The getArrClientReportButtonEnabled package method in the
D:\Solutions\R_274_8_1-20200610145034.896\Web\Flexible\IpsPhase.cfc component cannot be accessed from d:\Solutions\R_274_8_1-20200610145034.896\Web\Flexible\IpsPhase.cfm., Type: coldfusion.runtime.CfErrorWrapper|"
Copy link to clipboard
Copied
I notice that the reference to the cfc used capital D for the drive letter while the cfm calling it is showing as lower case.
We may not expect that to matter, but perhaps it does, even on Windows (due to CF's being converted to Java).
And do you have a mapping or custom tag path pointing to this cfc location, whether as defined in the cf admin or in application.cfc? If you find it, and change it, and restart CF, does the problem go away?
Please let us know either way. If the problem remains, how are you instantiating the cfc?
Copy link to clipboard
Copied
Hi Charlie, thank you so much for your reply. The issue here is the cfm file can't access cfc file in the same folder with same "package".
Copy link to clipboard
Copied
by the way, it is working if i change the code from access="package" to access="public"
Copy link to clipboard
Copied
I assumed you already knew that would "work" but may not have wanted to change you code.
Are you saying that is a satisfactory workaround for you?
If not, thanks first for the earlier note. Again, I knew that the cfm was invoking the cfc. I just wanted to ask how, given what I saw in the error.
And so I will ask: why do you use the Flexible folder name in the createobject call, if they are in the same directory as each other?
I get that "it worked before". And I will assume you did have them both in the same folder before.
But again, do you now or did you in CF11 have a "mapping" or "custom tag path in the cf admin or application cfc/cfm for Flexible? Are you able to check cf11 now? If not, do you still have the cf11 folder?
Copy link to clipboard
Copied
Thanks again for your response. I have figured it out the problem is about the link folder on IIS. Each time when we build the package, new package folder is created and that folder is linked to another folder. This used to work on CF11 but not on CF2018 anymore. Is this something you are aware of?
Copy link to clipboard
Copied
Hey Charlie,
Actual we have followed your advise to change the drive to upper case. It was magically working. I wan't thought that could cause the issue. Thanks for sharing your expertise and support.
Cheers,
Tao