On Jul 29, 2007, at 8:35 PM, Lachlan Deck wrote:

Hi there,

On 28/07/2007, at 1:04 AM, Chuck Hill wrote:

No. Has your model changed and the Java not been regenerated?

Good suggestion.... double checking...

The only other thing I can think of is a bad call to takeValueForKey on this EO that is overwriting sessions() with something else. Try overriding setSessions to log a stack trace if the value is not instanceof NSArray.

The issue seems to be the current value of sessions() rather than the value being taken. i.e., null is neither an instance of either NSArray or NSMutableArray...

Are you sure it is null? If it is null, you may have forgotten to call super in awakeFromInsertion or awakeFromFetch. Or see my guess further down.


Actually I'm now seeing a number of these errors... what's the usual cause for 'no database snapshot available'?

You mucking with EOF's head. :-) Or perhaps a reference counting bug in EOF, but I rater doubt that in 2007.



I've seen it at other times also.

java.lang.IllegalStateException: There is no database snapshot available for the object {values = {<....>; entityType = "CourseClass"; this = "<ish.willowservices.soap.eoaccess.CourseClass 1117cc0 _EOIntegralKeyGlobalID[CourseClass (java.lang.Long)928]>"; } with GlobalID _EOIntegralKeyGlobalID[CourseClass (java.lang.Long)928]

Here it is complaining that it can't find a CourseClass...

at com.webobjects.eoaccess.EODatabaseContext.objectsForSourceGlobalID (EODatabaseContext.java:4205) at com.webobjects.eocontrol.EOObjectStoreCoordinator.objectsForSourceGlob alID(EOObjectStoreCoordinator.java:682) at com.webobjects.eocontrol.EOEditingContext.objectsForSourceGlobalID (EOEditingContext.java:3904) at com.webobjects.eocontrol.EOEditingContext.objectsForSourceGlobalID (EOEditingContext.java:3904) at com.webobjects.eoaccess.EODatabaseContext._fireArrayFault (EODatabaseContext.java:4418) at com.webobjects.eoaccess.EOAccessArrayFaultHandler.completeInitializati onOfObject(EOAccessArrayFaultHandler.java:70) at com.webobjects.eocontrol._EOCheapCopyMutableArray.willRead (_EOCheapCopyMutableArray.java:38) at com.webobjects.eocontrol._EOCheapCopyMutableArray.count (_EOCheapCopyMutableArray.java:92) at com.webobjects.foundation.NSArray.containsObject (NSArray.java:601) at com.ish.webobjects.eocontrol.ISHGenericRecord.excludeObjectFromPropert yWithKey(ISHGenericRecord.java:75) at com.ish.willow.eoaccess.model._CourseClass.removeFromSessions (_CourseClass.java:560)

And here it seems to be firing an array fault of courseClass.sessions. Is sessions() an array of CourseClass?


        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
at com.webobjects.foundation.NSSelector._safeInvokeMethod (NSSelector.java:120) at com.webobjects.eocontrol.EOCustomObject.removeObjectFromPropertyWithKe y(EOCustomObject.java:1011) at com.webobjects.eocontrol.EOCustomObject.addObjectToBothSidesOfRelation shipWithKey(EOCustomObject.java:1066)

The other possibility that I'll need to check out is whether this is another /feature/ of vertical inheritance (as its reverse relationship is mandatory from the sub-entity).

Looking at this, my suspicion is that you have messed up the restricting qualifiers on the entities (or something) and EOF is getting confused about which class an entity is for. That also ties into the error below. If you call sessions() on an CourseClass object that EOF thinks is some other Entity, it probably did not put a value for sessions in its dictionary, thus it would be null. Try printing out the entityName() when sessions() == null and see what EOF says. Also log out the global ID.

And yes, it could be something related to vertical inheritance. I hope your use of VI is mandated by a legacy schema. Otherwise you are causing yourself all sort of pain.

Chuck



On Jul 27, 2007, at 12:43 AM, Lachlan Deck wrote:

anyone seen something similar to the below before?

java.lang.IllegalArgumentException: removeObjectToPropertyWithKey: the key sessions is not a Array or one of its subclasses - unable to remove the value. at com.webobjects.eocontrol.EOCustomObject.excludeObjectFromPropertyWit hKey(EOCustomObject.java:987) at com.ish.willow.eoaccess.model._CourseClass.removeFromSessions (_CourseClass.java:560) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
at com.webobjects.foundation.NSSelector._safeInvokeMethod (NSSelector.java:120) at com.webobjects.eocontrol.EOCustomObject.removeObjectFromPropertyWith Key(EOCustomObject.java:1011) at com.webobjects.eocontrol.EOCustomObject.addObjectToBothSidesOfRelati onshipWithKey(EOCustomObject.java:1066)

with regards,
--

Lachlan Deck



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/chill% 40global-village.net

This email sent to [EMAIL PROTECTED]


--

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects





_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to