Skip to main content
Inspiring
July 23, 2012
Question

getSession method was not found

  • July 23, 2012
  • 1 reply
  • 616 views

Hi,

I am getting an error when I am trying a page

The getSession method was not found. Either there are no methods with the specified method name and argument types or the getSession method is overloaded with argument types that ColdFusion cannot decipher reliably. ColdFusion found 0 methods that match the provided arguments.

Earlier I was using coldfusion 7 and now I am using coldfusion 10. So I think coldfusion 10 now is not supporting. below is the code set where I am trying to use it. Is there any other way to overcome this?

<cfscript>

function getSessionList(){

     var obj = "";

    var i = 1;

    var sessionlist = ArrayNew(1);

    var enum = "";

   

     obj = CreateObject("java","coldfusion.runtime.SessionTracker");

    enum = obj.getSessionKeys();

   

    for(;i lte obj.getSessionCount();i = i+1){

            arrayAppend(sessionlist,obj.getSession(enum.next()));   

    }

    return sessionlist;

}

</cfscript>

    This topic has been closed for replies.

    1 reply

    Inspiring
    July 23, 2012

    Do a dump of the obj variable and see what methods are available.