Skip to main content
Participant
February 8, 2024
Question

CF 2023 REST service registration fails

  • February 8, 2024
  • 2 replies
  • 730 views

We're in the process of migrating from CF2021 to CF2023, and so far everything has been going well except for getting a REST service registered.

 

Using the same path and service mapping as we did in CF2021 we are getting the following error:

Error registering REST service. Please ensure that you have entered a proper mapping and path.
Application Calendar could not be initialized.
Reason: Cannot invoke "java.lang.Boolean.booleanValue()" because "skip" is null
Cannot invoke "java.lang.Boolean.booleanValue()" because "skip" is null

 

In trying to research this, I came across what appeared to be an identical case on the bug tracker (CF-4220013 | Tracker (adobe.com)), which was withdrawn as a duplicate of another issue. However, that other issue (CF-4219459 | Tracker (adobe.com)) loads with a page that says "No issue found."

 

I can't seem to find anything else that helps. Is this an actual bug? Has anyone else run into this? Has anyone else solved it?

2 replies

Participant
July 11, 2025

I'm not sure, but it may happen when the web root cannot be detected due to some problem in the OS environment.
In an environment where the same problem occurred, I once solved it by explicitly setting the Apache web root to the logical path "/" in the CF mapping settings of CFIDE.

BKBK
Community Expert
Community Expert
March 24, 2024

That may indeed be a bug. However, apart from the ColdFusion Administrator, there is an alternative way to register a REST service. Use restInitApplication.

 

Let's assume that you have created an Application.cfc file especially for the REST service, which is highly recommended. Its logical location is: within the same directory as the REST CFC. Then you can register the REST service by including code similar to the following in the Application.cfc file:

public boolean function onRequestStart()
    {   
    	restInitApplication(getDirectoryFromPath(getCurrentTemplatePath()), "name_of_REST_service");
        return true;
    }