Random ObserverCollection Errors

14 వీక్షణలు
మొదటి చదవని మెసేజ్‌కు స్కిప్ చేయి

Dylan Miyake

చదవనివి,
11 ఏప్రి, 2014 12:24:29 PM11-04-14
వరకు transf...@googlegroups.com
Hi,

I'm getting random/intermittent errors that read:

Element AFTERNEWOBSERVERCOLLECTION is undefined in a CFML structure referenced as part of an expression.

from

C:\foo\bar\transfer\com\facade\AbstractBaseFacade.cfc , line 207

This seems to happen more frequently when the site is under load.  But I can't for the life of me replicate it at all.  I'm not using any observers, so by observers.cfc is blank.  Could this be causing the issue?  I've attached the AbstractBaseFacade CFC -- I'd be happy to just comment out the observer collections, but don't want to break other stuff in here.

Thanks,

Dylan
AbstractBaseFacade.cfc

Brian G

చదవనివి,
12 జులై, 2014 1:00:08 PM12-07-14
వరకు transf...@googlegroups.com
Dylan,

I have also had these errors.  I'm not sure if they are related to the xmlSearch() thread-safety issues or not, but this code solved the problem for me:

in com/events/EventManager.cfc around line 257:

try {
    // when we frequently run discardAll(), the page then tries to fire afternew events generating:
    // Expression: Element AFTERNEWOBSERVERCOLLECTION is undefined in a CFML structure referenced as part of an expression.
    // should be safe to ignore it as if it doesn't run; I don't think we have any afternew advice anyways
    getObserverCollection(arguments.transfer, arguments.type).fireEvent(event);
} catch (any e) {
    // record in logfile for testing
    writeLog(type="Error", file="transfer-advice-error.log", text="[#e.type#] fireEvent #arguments.type#: #e.message#");
}

You could obviously remove the logging and just silently ignore it (since, if the thing doesn't exist, it can't fire the advice).


Brian
అందరికీ రిప్లయి పంపు
రచయితకు రిప్లయి ఇవ్వు
ఫార్వర్డ్ చేయి
0 కొత్త మెసేజ్‌లు