tooling around a wee bit on something old and re-working a site with
Angular + Bootstrap...its fun.  So I figured I'd make use of the fancy new
REST stuff in CF10.  Simple to set up, no need to use the CFAdmin to setup,
and bamm!  Deploy to shared host, bamm!  well, maybe not.  Seems to
consistently fail after initial success.  I push up the CFC, test, all is
good.  Come back 1,2, or 12 hours later, its random, and the REST call is
failing with

HTTP Error 500.0 - object is not an instance of declaring class


Anyone have any clues?  No access to CFAdmin of course.  It never fails on
the local server.

Its a really simple thing too.  When this REST call fails, a test page
using the model.Content.ContentService runs fine.  So it has something to
do with the REST gimmickery.

component restpath="/content" rest="true" {

    remote any function getAll() httpMethod="GET"
 produces="application/json"    {

        var service = "";
        var entries = "";
        var works = "";

        service = CreateObject("component",
"model.Content.ContentService").init();
        entries = service.getAllItems();
        response = serializeJSON( entries );
        return response;
    }

}

Douglas Knudsen
http://www.cubicleman.com
this is my signature, like it?

Reply via email to