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

ColdFusion 2021 Update 16 - RESTful services no longer work

Explorer ,
Sep 17, 2024 Sep 17, 2024

Copy link to clipboard

Copied

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

 

 

Views

148

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 2 Correct answers

Community Expert , Sep 18, 2024 Sep 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:
...

Votes

Translate

Translate
Explorer , Sep 18, 2024 Sep 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.

Votes

Translate

Translate
Community Expert ,
Sep 18, 2024 Sep 18, 2024

Copy link to clipboard

Copied

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.
     

     

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
Explorer ,
Sep 18, 2024 Sep 18, 2024

Copy link to clipboard

Copied

LATEST

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.

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