Skip to main content
June 11, 2020
Question

CF11 upgrade to CF1028 - package access issue

  • June 11, 2020
  • 1 reply
  • 388 views

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

 

 

    This topic has been closed for replies.

    1 reply

    Charlie Arehart
    Community Expert
    Community Expert
    June 11, 2020

    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?

    /Charlie (troubleshooter, carehart. org)
    June 11, 2020

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

    it is working from another cfc in the same package but not a cfm page in the same package. The code is working on my local pc but not on server after installation.
     
    IpsPhase.cfm file below:
    <cfscript>
        ipsPhase = createobject("component""Flexible.IpsPhase").init();
    </cfscript>
     
    <cfset arrReturnValue = ipsPhase.getSomeFuntion() />
     
     
    IpsPhase,cfc file below:
        <cffunction name="getSomeFuntion(" access="package" returntype="array" output="false">
            <cfreturn variables.Enabled />
        </cffunction>
     
    June 11, 2020

    by the way, it is working if i change the code from  access="package" to access="public"