Object undefined in a Java object of type class [Ljava.lang.String; referenced as ''
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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?
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
^^bounce^^
Copy link to clipboard
Copied
^^bounce^^
Are we playing basketball or something?
--
Adam
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
This is on CF8 by the way...

