Hi Raymond,

I have come across those as well some time ago, and it turned out that I didn't 
strictly obey all the EOF commandments back then.

http://wiki.wocommunity.org/display/documentation/EOF-Using+EOF-The+EOF+Commandments

If you don't follow those, EOF will fight back with all sorts of strange 
effects, like those NullPointerExceptions, or missing snapshot exceptions and 
the like. So I suggest you doublecheck those thoroughly.

Maik



Am 18.06.2013 um 09:44 schrieb Raymond NANEON <[email protected]>:

> Hi List,
> 
> I have a big problem to save my data. When I set the relastionship 
> entity1.setEntity2Relationship(entity2), I get a java NullPointerException at 
> the method who set the relation :
> 
> addObjectToBothSidesOfRelationshipWithKey(entity2, _Enity1.ENTITY2_KEY); 
> <-----
> 
> When I try another way entity1.setEntity2(enity2) I get the same java 
> NullPointerException when I want to save entity1.
> 
> juin 18 09:34:38 PreProjets[8484] ERROR 
> er.extensions.appserver.ERXApplication  - 
> NullPointerException
>   at 
> com.webobjects.eoaccess.EODatabaseContext._objectFaultWithSnapshotRelationshipEditingContext(EODatabaseContext.java:2356)
>      ... skipped 1 stack elements
>   at 
> com.webobjects.eoaccess.EOAccessDeferredFaultHandler.createFaultForDeferredFault(EOAccessDeferredFaultHandler.java:49)
>   at 
> com.webobjects.eocontrol.EOCustomObject.willReadRelationship(EOCustomObject.java:1279)
>   at 
> er.extensions.eof.ERXGenericRecord.willReadRelationship(ERXGenericRecord.java:378)
>   at 
> com.webobjects.eocontrol._EOMutableKnownKeyDictionary$Initializer$_LazyGenericRecordBinding.valueInObject(_EOMutableKnownKeyDictionary.java:614)
>   at 
> er.extensions.eof.ERXGenericRecord$TouchingBinding.valueInObject(ERXGenericRecord.java:207)
>   at 
> com.webobjects.eocontrol.EOCustomObject.storedValueForKey(EOCustomObject.java:1634)
>      ... skipped 2 stack elements
>   at 
> com.webobjects.eocontrol.EOObjectStoreCoordinator.valuesForKeys(EOObjectStoreCoordinator.java:326)
>      ... skipped 4 stack elements
>   at 
> com.webobjects.eocontrol.EOObjectStoreCoordinator.saveChangesInEditingContext(EOObjectStoreCoordinator.java:373)
>   at 
> com.webobjects.eocontrol.EOEditingContext.saveChanges(EOEditingContext.java:3192)
>   at er.extensions.eof.ERXEC._saveChanges(ERXEC.java:1176)
>   at er.extensions.eof.ERXEC.saveChanges(ERXEC.java:1099)
> 
> Thanks for your help.
> Envoyé depuis iCloud
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list      ([email protected])
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/webobjects-dev/maik%40selbstdenker.ag
> 
> This email sent to [email protected]

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

This email sent to [email protected]

Reply via email to