• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
EOEditing Context Error
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

EOEditing Context Error


  • Subject: EOEditing Context Error
  • From: Robyn Hughes <email@hidden>
  • Date: Wed, 7 Jun 2006 10:00:51 +1000

I am trying to save changes to the the editing context using this code and get the error below. Can anyone help?

try
{
//fetch the three primary keys needs for creating the subTopicResults instance
TrackingObject trackingObject = (TrackingObject) com.webobjects.eoaccess.EOUtilities.objectMatchingKeyAndValue (ec,"TrackingObject","trackingObjectName","Performance Planner");
TopicName topicName = (TopicName) com.webobjects.eoaccess.EOUtilities.objectMatchingKeyAndValue (ec,"TopicName","topicName","Performance Planner");
SubTopicName subTopicName = (SubTopicName) com.webobjects.eoaccess.EOUtilities.objectMatchingKeyAndValue (ec,"SubTopicName","subTopicName",subTopicPageName);

if (trackingObject != null && topicName != null && subTopicName != null)
{
//create a new instance of subTopicResults
subTopicResults = ( SubTopicResults) com.webobjects.eoaccess.EOUtilities.createAndInsertInstance (ec,"SubTopicResults");
//add the relationships
subTopicResults.addObjectToBothSidesOfRelationshipWithKey (trackingObject,"trackingObject");
subTopicResults.addObjectToBothSidesOfRelationshipWithKey(((Session) session()).currentUser,"recipient");
subTopicResults.addObjectToBothSidesOfRelationshipWithKey (topicName,"topicName");
subTopicResults.addObjectToBothSidesOfRelationshipWithKey (subTopicName,"subTopicName");
}
save();
}
catch (Exception e)
{
throw e;
}




Error:
java.lang.IllegalStateException: prepareForSaveWithCoordinator: com.webobjects.eoaccess.EODatabaseContext@ad552c is currently saving for com.webobjects.eocontrol.EOEditingContext@6e119d so it cannot prepare to save for com.webobjects.eocontrol.EOEditingContext@6e119d. com.webobjects.eocontrol.EOObjectStoreCoordinator@86684c has sources (com.webobjects.eoaccess.EODatabaseContext@ad552c, com.webobjects.eoaccess.EODatabaseContext@b248c8)
Reason:
prepareForSaveWithCoordinator: com.webobjects.eoaccess.EODatabaseContext@ad552c is currently saving for com.webobjects.eocontrol.EOEditingContext@6e119d so it cannot prepare to save for com.webobjects.eocontrol.EOEditingContext@6e119d. com.webobjects.eocontrol.EOObjectStoreCoordinator@86684c has sources (com.webobjects.eoaccess.EODatabaseContext@ad552c, com.webobjects.eoaccess.EODatabaseContext@b248c8)
Stack trace:
File Line# Method Package
EODatabaseContext.java 5790 prepareForSaveWithCoordinator com.webobjects.eoaccess
EOObjectStoreCoordinator.java 409 saveChangesInEditingContext com.webobjects.eocontrol
EOEditingContext.java 3226 saveChanges com.webobjects.eocontrol
PerformanceComponent.java 277 save PerformanceComponent
PerformanceComponent.java 168 createNewSubTopicResults PerformanceComponent


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: EOEditing Context Error
      • From: Chuck Hill <email@hidden>
  • Prev by Date: Re: Running WO
  • Next by Date: Re: EOEditing Context Error
  • Previous by thread: Re: Running WO
  • Next by thread: Re: EOEditing Context Error
  • Index(es):
    • Date
    • Thread