Skip to main content
Inspiring
March 2, 2018
Question

Weird Error Message

  • March 2, 2018
  • 2 replies
  • 790 views

I am setting up a new site and getting this cryptic error message. 500 error

Element NAME is undefined in a Java object of type class coldfusion.runtime.StructBean. The specific sequence of files included or processed is:

I cant get any pages to run. It looks like the session vars aren't getting set. Any idea what this is? Maybe some server settings arent correct?

    This topic has been closed for replies.

    2 replies

    Community Expert
    March 2, 2018

    We're going to need more information than that. I have no idea what code is being run prior to receiving that error.

    Dave Watts, Fig Leaf Software

    Dave Watts, Eidolon LLC
    weezerboyAuthor
    Inspiring
    March 2, 2018

    More info.

    I am migrating this code from Railo ( I know!!) to CF2016.
    Code worked in railo just fine. Cant get it to do the most basic thing on CF server.

    I think this may be the problem code.

    <cfscript>

                    app = application.getApplicationSettings().name;

                    sessiontracker = createObject("java","coldfusion.runtime.SessionTracker");

                    sessionCollection = sessionTracker.getSessionCollection(app);

                </cfscript>

          <cfloop collection="#sessionCollection#" item="sessionId">

            <cfset thisSession = sessionCollection[sessionId]>

            <cfif not StructIsEmpty(thisSession) and StructKeyExists(thisSession,"USER")>

              <cfif thisSession.USER.ID eq #getUser.WEBUSER_ID#>

                <cfset StructClear(thisSession)>

              </cfif>

            </cfif>

          </cfloop>


    Is this CF2016 compliant or does CF need this to be rewritten?

    WolfShade
    Legend
    March 2, 2018

    I assume that the error message contains a document and line number indicating where the error is happening.  Are you setting up a Bean for anything?  Does the CFAdmin error log give any more information?

    V/r,

    ^ _ ^

    weezerboyAuthor
    Inspiring
    March 2, 2018

    More info.

    I am migrating this code from Railo ( I know!!) to CF2016.
    Code worked in railo just fine. Cant get it to do the most basic thing on CF server.

    I think this may be the problem code.

    <cfscript>

                    app = application.getApplicationSettings().name;

                    sessiontracker = createObject("java","coldfusion.runtime.SessionTracker");

                    sessionCollection = sessionTracker.getSessionCollection(app);

                </cfscript>

          <cfloop collection="#sessionCollection#" item="sessionId">

            <cfset thisSession = sessionCollection[sessionId]>

            <cfif not StructIsEmpty(thisSession) and StructKeyExists(thisSession,"USER")>

              <cfif thisSession.USER.ID eq #getUser.WEBUSER_ID#>

                <cfset StructClear(thisSession)>

              </cfif>

            </cfif>

          </cfloop>


    Is this CF2016 compliant or does CF need this to be rewritten?