Our application tends to get this error under load i.e. Not while a single user is just clicking away. We have been looking into this trying to figure it out but we are somewhat baffled. Here is what we know so far:
* When the exception happens we see stack traces that look like the following java.lang.IllegalStateException: Cannot fire array fault with a null handler. at com.webobjects.eoaccess.EODatabaseContext._fireArrayFault(EODatabaseContext. java:4218) at com.webobjects.eoaccess.EOAccessArrayFaultHandler.completeInitializationOfOb ject(EOAccessArrayFaultHandler.java:77) at com.webobjects.eocontrol._EOCheapCopyMutableArray.willRead(_EOCheapCopyMutab leArray.java:45) at com.webobjects.eocontrol._EOCheapCopyMutableArray.objectEnumerator(_EOCheapC opyMutableArray.java:115) at com.mycompany.myClass(MyClass.java:101) ... The source code for this particular stack trace looks like if (type != null && forum != null && forum.privileges() != null) { Enumeration e = forum.privileges().objectEnumerator(); <--- this line threw the exception while (e.hasMoreElements()) { DBPrivilege nextPrivilege = (DBPrivilege) e.nextElement(); if (nextPrivilege.privilegeType().equals(type)) { result = nextPrivilege; break; } } } We have seen similar IllegalStateExceptions in code like: NSArray roles = user.securityRoles(); if (roles != null) { for (int i = 0; i < roles.count(); ++i) { <-- this line throws the error below under load SecurityRole role = (SecurityRole) roles.objectAtIndex(i); NSArray tags = role.tags(); ... java.lang.IllegalStateException: Cannot fire array fault with a null handler. at com.webobjects.eoaccess.EODatabaseContext._fireArrayFault(EODatabaseContext. java:4218) at com.webobjects.eoaccess.EOAccessArrayFaultHandler.completeInitializationOfOb ject(EOAccessArrayFaultHandler.java:77) at com.webobjects.eocontrol._EOCheapCopyMutableArray.willRead(_EOCheapCopyMutab leArray.java:45) at com.webobjects.eocontrol._EOCheapCopyMutableArray.count(_EOCheapCopyMutableA rray.java:103) In both cases we are accessing a relationship in an EO, but the null checks do not prevent the error. It seems like the NSArrays are present but when we try to access a method of the NSArray (count or objectEnumerator) under load it throws the error. It seems that somehow accessing the array is causing EOF to try to resolve the fault before returning it to us and in the process the data is not available. We don¹t throw these errors if we try to debug and step thru the code only under load. These particular EO¹s come from the infamous SharedEditingContext. We use the SharedEditingContext because this portion of the app is READONLY and it allows us to share the data between sessions instead of having to refetch is for every session. Any thoughts would be appreciated Thanks in advance Dov Rosenberg
_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com