Skip to main content
Inspiring
September 17, 2024
Answered

ColdFusion 2021 Update 16 - RESTful services no longer work

  • September 17, 2024
  • 1 reply
  • 562 views

I updated from ColdFusion 2021 Update 10 to the latest (16), and now none of my RESTful services work.  The error I'm getting when I refresh them is:

 

Error registering REST service. Please ensure that you have entered a proper mapping and path.
Application [service mapping] could not be initialized.
Reason: null

 

 

    This topic has been closed for replies.
    Correct answer Tom Woo

    Thanks -- turns out it is indeed application.cfc...the fact that I didn't have one!  I have one for the overall site, but in the root of the directory where the REST services are, I only had an application.cfm.  So after Update 10, this becomes a requirement, apparently.

    1 reply

    BKBK
    Community Expert
    Community Expert
    September 18, 2024

    Three suggestions:

     

    1.  Ensure that the this.restSettings.cfcLocation variable in Application.cfc points to the correct location of the directory containing the REST CFC;
    2.  Open the ColdFusion Administrator, go to Data & Services > REST Services and verify whether the REST service is registered there. If it is, then click on the service's "Refresh" button. If it is not, then add the service.
    3.   Is the REST service registered by means of the function restInitApplication() ?  If so, then ensure that:
          (a) the restInitApplication() call is in the onApplicationStart event-handler of Application.cfc;
          (b) the path and serviceMapping arguments used by restInitApplication are correct;
        
      If you follow any of the suggestions, you will have to restart ColdFusion for the change to take effect.
       

       
    Tom WooAuthorCorrect answer
    Inspiring
    September 18, 2024

    Thanks -- turns out it is indeed application.cfc...the fact that I didn't have one!  I have one for the overall site, but in the root of the directory where the REST services are, I only had an application.cfm.  So after Update 10, this becomes a requirement, apparently.