Skip to main content
Participating Frequently
April 13, 2011
Question

Object undefined in a Java object of type class [Ljava.lang.String; referenced as ''

  • April 13, 2011
  • 2 replies
  • 5445 views

Hi all

Does anyone have any advice to offer on an annoying problem? I've been googling it and although it seems to turn up a lot, no-one seems to know what exactly is happening nor how to stop it.

OnApplicationStart()
I initialise a CFC into the app scope, thus:
application.stuObjs.SecurityManager = createObject("component", "#application.stuConfig.comPath#.SecurityManager").init(dsn=application.stuConfig.dsn);

OnRequestStart()
Because I'm still in development, I re-init the app scope on every request, thus:
<cfset onApplicationStart() />

All is good, the application runs sweetly. Except that every once in a blue-moon, one of my testers gets an error telling him/her that:

Element stuObjs.SecurityManager is undefined in a Java object of type class [Ljava.lang.String; referenced as ''

And on refreshing the browser, the error goes away and the application behaves normally again.

So, what's happening? Is it that the object is just momentarily missing from the app scope? If so, why? And what can I do to guard against it??

/jf

    This topic has been closed for replies.

    2 replies

    Inspiring
    April 15, 2011

    Element stuObjs.SecurityManager is undefined in a Java object of type class [Ljava.lang.String; referenced as ''

    Can you include the entire error mesaage (well: not the whole stack trace, but at least the whole error message).

    --

    Adam

    Participating Frequently
    April 15, 2011

    Are we playing basketball or something?

    Naah, just trying to grab some attention :-)

    Adam - That is the entire error message! The StackTrace commences with, "coldfusion.runtime.UndefinedElementException: Element STUOBJS.SECURITYMANAGER is undefined..." and continues with the same message.

    /jf

    Participating Frequently
    April 18, 2011

    This is on CF8 by the way...

    Owainnorth
    Inspiring
    April 13, 2011

    Do you reference the manager in your App.cfc anywhere other than onApplicationStart()?

    I've seen weirdies before where (for example) onRequestStart fires first, tries to call your securitymanager but the Application has already ended, so it's been deleted. What do you have for your ApplicationTimeout?

    Participating Frequently
    April 13, 2011

    Hi Owain

    >>Do you reference the manager in your App.cfc anywhere other than onApplicationStart()?

    Nope.

    >>What do you have for your ApplicationTimeout?

    1 day.

    /jf

    Participating Frequently
    April 15, 2011

    ^^bounce^^