Cannot register RESTful service
I'm running CF 10 Developer (64-bit) (using IIS) on top of Windows 2008R2 (64-bit). This server is running in a Virtualbox VM on my Windows 7 Pro (64-bit) workstation.
Everytime I attempt to add a RESTful service (even the most minimalistic), I get an error.
For instance, this very simple CFC:
/RestExample/HelloWorld.cfc
<cfcomponent rest="true" restPath="/hello">
<cffunction name="sayHello" access="remote" returnType="String" httpMethod="GET">
<cfset res="Hello World">
<cfreturn res>
</cffunction>
</cfcomponent>
I then proceed to register the service in CF admin:
Root Path: C:/websites/test/RestExample/
Service Mapping: Example
This will produce this error:
Error registering REST service. Please ensure that you have entered a proper mapping and path.
Application Example could not be initialized.
Reason: The application does not contain any rest enabled CFCs.
The application does not contain any rest enabled CFCs.
Note, if I run the following code, it will add the service.
<cfscript>
restInitApplication(getDirectoryFromPath(getCurrentTemplatePath()).concat("main\"), "Example");
<cfscript>
However, when I attempt to reach the service using its URL, I get the following error:
"Error","ajp-bio-8012-exec-4","03/01/13","16:51:58","RestSample","object is not an instance of declaring class
Funny enough, this same code worked when I installed CF10 64-bit on my other Windows 7 64-bit workstation without any issue. I wasn't going through IIS in this case (not that I think it makes a difference).
