Jake Hendy
Jake Hendy

Reputation: 313

Something wrong in Application.CFC

Just writing out my own blog in ColdFusion and all of a sudden, I open up eclipse on my dev machine, check the site in Chrome and it doesn't load. So I tried moving Application.cfc to another folder, voila the page works.

The exact error message is:

The system has attempted to use an undefined value, which usually indicates a programming error, either in your code or some system code. Null Pointers are another name for undefined values.

The contents of Application.cfc is as follows :

component 
    {
        this.name="Jake Hendy";
        this.datasource="Store";
        this.ORMenabled="true";
        this.ORMsettings.DBCreate="Update";
        ORMreload();
        void function onRequestStart(target) {
            if(structKeyexists(url,"reload-app")) {
                ORMreload();
            }
        }
    }

Any ideas people?

Many thanks,

Jake

Upvotes: 0

Views: 355

Answers (3)

Jake Hendy
Jake Hendy

Reputation: 313

Removed return true from the Application.CFC, and increased memory from 256 to 512. Error now fixed....

Thanks all for your help. It has been much appreciated!

Regards,

Jake

Upvotes: 0

Dave Ferguson
Dave Ferguson

Reputation: 773

I ran the code above and it ran without error. Are you sure the error is coming from from that block of code?

Upvotes: 2

Vincent Buck
Vincent Buck

Reputation: 17132

How about:

       void function onRequestStart(target) {
            if(structKeyexists(url,"reload-app")) {
                ORMreload();
            }
              return true;
        }

Upvotes: 0

Related Questions