Copy link to clipboard
Copied
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?
Copy link to clipboard
Copied
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;
}