Skip to main content
Participant
March 10, 2015
Question

The value returned from the onApplicationStart function is not of type boolean

  • March 10, 2015
  • 2 replies
  • 1499 views

getting the following error when using this statement:

The value returned from the onApplicationStart function is not of type boolean. 

  If the component name is specified as a return type, it is possible that either a definition file for the component cannot be found or is not accessible.    

component

 

this.name = "customoptionexample1";

this.wschannels = [{name="bidchannel", cfclistener="bidListener"}];

 

boolean function onApplicationStart()

 

  application.bidvalue = 1;

    This topic has been closed for replies.

    2 replies

    Dave Ferguson
    Participating Frequently
    March 10, 2015

    As shown here... Application.cfc | Learn CF in a Week

    You should just have the below.  You don't shouldn't set a return type.

    function onApplicationStart() {

        // your code here

           return true;

    }

    Inspiring
    March 10, 2015

    Where is your return value ?

    This function requires a true or false return.

    Chaz__WAuthor
    Participant
    March 10, 2015

    I am not changing the return value this is coming from application.cfc

    Inspiring
    March 10, 2015

    What I mean is where is that part  of the code. This function should looks something like this:

    public boolean function onApplicationStart(){

         application.bidvalue = 1;

         //other stuff

         return true;

    }