Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

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

New Here ,
Apr 13, 2011 Apr 13, 2011

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

5.1K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Apr 13, 2011 Apr 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?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 13, 2011 Apr 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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 15, 2011 Apr 15, 2011

^^bounce^^

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 15, 2011 Apr 15, 2011

^^bounce^^

Are we playing basketball or something?

--

Adam

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 15, 2011 Apr 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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 15, 2011 Apr 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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 18, 2011 Apr 18, 2011
LATEST

This is on CF8 by the way...

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources