• 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
Re: valid global ID could not be obtained for entity
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: valid global ID could not be obtained for entity


  • Subject: Re: valid global ID could not be obtained for entity
  • From: Chuck Hill <email@hidden>
  • Date: Tue, 25 Dec 2007 17:13:58 -0800

I'd guess that these are not compatible with having a single, EOF generated, PK attribute. I think that once you go the route you have, you need to create and relate (addObjectToBothSidesOfRelationshipWithKey) the join eo manually.

Chuck


On Dec 25, 2007, at 10:53 AM, Scott Lopatin wrote:

Yes, they both have "own destination" and "propagate primary key" checked. The relationships to join table from both sides, not the flattened properties.

Thanks,
Scott


On Dec 24, 2007, at 3:17 PM, Chuck Hill wrote:

Look at the relationships in the related entities that point to this join entity. Are they marked Proprogates Primary Key?

Chuck


On Dec 22, 2007, at 11:56 PM, Scott Lopatin wrote:

I even rebuilt the model and checked the database, all should be using the new model with one PK, but the error still shows 2 PK's: primary key dictionary {prefid = 10965; userid = 10001; }

I've been through it a few times and it is just not making sense as to why it still thinks there are 2 PK's, even though I reset up the flattened properties.

Totally stumped.



>>>>> | dtm=2007-12-22 23:52:12.752 PST | priority=DEBUG | app= {h=Scotts-MacBook-Pro.local;a=ProductManager;p=8888;pid=null;} | caller=({h=Scotts-MacBook- Pro.local;a=ProductManager;p=8888;pid=null;s=P6dz9soSooevm7QKKay2gM; pg='com.xxxx.xxxx.app.pim.page.AdminSavedListsPage';c='com.xxxx.xxxx .app.pim.component.SavedPreferenceListEditor';}) | thread=WorkerThread1 | logger=com.webobjects.foundation.NSLog.debug | source=com.webobjects.foundation.NSLog$Log4JLogger.appendln (NSLog.java:1546) |
java.lang.IllegalStateException: A valid global ID could not be obtained for entity named AppUserPrefs, relationship named preferences, primary key dictionary {prefid = 10965; userid = 10001; }.
at com.webobjects.eoaccess.EODatabaseContext.databaseOperationForInterm ediateRowFromSourceObject(EODatabaseContext.java:5061)
at com.webobjects.eoaccess.EODatabaseContext.recordInsertForIntermediat eRowFromSourceObject(EODatabaseContext.java:5077)
at com.webobjects.eoaccess.EODatabaseContext.relayAttributesInRelations hipSourceObjectDestinationObject(EODatabaseContext.java:5103)
at com.webobjects.eoaccess.EODatabaseContext.relayAttributesInRelations hipSourceObjectDestinationObjects(EODatabaseContext.java:5157)
at com.webobjects.eoaccess.EODatabaseContext.recordChangesInEditingCont ext(EODatabaseContext.java:6203)
at com.webobjects.eocontrol.EOObjectStoreCoordinator.saveChangesInEditi ngContext(EOObjectStoreCoordinator.java:412)
at com.webobjects.eocontrol.EOEditingContext.saveChanges (EOEditingContext.java:3226)
at com.apple.store.toolkit.eo.ASEOEditingContext.saveChanges (ASEOEditingContext.java:237)
at com.apple.store.app.pim.component.SavedPreferenceListEditor.convertT oUserPref(SavedPreferenceListEditor.java:42)
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:585)
at com.webobjects.foundation.NSKeyValueCoding$ValueAccessor $1.methodValue(NSKeyValueCoding.java:684)
at com.webobjects.foundation.NSKeyValueCoding $_MethodBinding.valueInObject(NSKeyValueCoding.java:1160)
at com.webobjects.foundation.NSKeyValueCoding $DefaultImplementation.valueForKey(NSKeyValueCoding.java:1268)
at com.webobjects.appserver.WOComponent.valueForKey (WOComponent.java:1539)
at com.webobjects.foundation.NSKeyValueCoding$Utility.valueForKey (NSKeyValueCoding.java:498)
at com.webobjects.foundation.NSKeyValueCodingAdditions $DefaultImplementation.valueForKeyPath (NSKeyValueCodingAdditions.java:212)
at com.webobjects.appserver.WOComponent.valueForKeyPath (WOComponent.java:1600)
at com.webobjects.appserver._private.WOKeyValueAssociation.valueInCompo nent(WOKeyValueAssociation.java:46)
at com.webobjects.appserver._private.WOHyperlink.invokeAction (WOHyperlink.java:76)
at com.webobjects.appserver._private.WODynamicGroup.invokeChildrenActio n(WODynamicGroup.java:101)
at com.webobjects.appserver._private.WODynamicGroup.invokeAction (WODynamicGroup.java:110)
at com.webobjects.appserver._private.WOConditional.invokeAction (WOConditional.java:55)
at com.webobjects.appserver._private.WODynamicGroup.invokeChildrenActio n(WODynamicGroup.java:101)
at com.webobjects.appserver._private.WOGenericContainer.invokeAction (WOGenericContainer.java:23)
at com.webobjects.appserver._private.WODynamicGroup.invokeChildrenActio n(WODynamicGroup.java:101)
at com.webobjects.appserver._private.WOGenericContainer.invokeAction (WOGenericContainer.java:23)
at com.webobjects.appserver._private.WODynamicGroup.invokeChildrenActio n(WODynamicGroup.java:101)
at com.webobjects.appserver._private.WODynamicGroup.invokeAction (WODynamicGroup.java:110)
at com.webobjects.appserver._private.WORepetition.invokeAction (WORepetition.java:196)
at com.webobjects.appserver._private.WODynamicGroup.invokeChildrenActio n(WODynamicGroup.java:101)
at com.webobjects.appserver._private.WODynamicGroup.invokeAction (WODynamicGroup.java:110)
at com.webobjects.appserver.WOComponent.invokeAction (WOComponent.java:945)
at com.webobjects.appserver._private.WOComponentReference.invokeAction( WOComponentReference.java:104)
at com.webobjects.appserver._private.WODynamicGroup.invokeChildrenActio n(WODynamicGroup.java:101)
at com.webobjects.appserver._private.WODynamicGroup.invokeAction (WODynamicGroup.java:110)
at com.webobjects.appserver._private.WOComponentContent.invokeAction (WOComponentContent.java:31)
at com.webobjects.appserver._private.WODynamicGroup.invokeChildrenActio n(WODynamicGroup.java:101)
at com.webobjects.appserver._private.WODynamicGroup.invokeAction (WODynamicGroup.java:110)
at com.webobjects.appserver._private.WOConditional.invokeAction (WOConditional.java:55)
at com.webobjects.appserver._private.WODynamicGroup.invokeChildrenActio n(WODynamicGroup.java:101)
at com.webobjects.appserver._private.WODynamicGroup.invokeAction (WODynamicGroup.java:110)
at com.webobjects.appserver.WOComponent.invokeAction (WOComponent.java:945)
at com.webobjects.appserver._private.WOComponentReference.invokeAction( WOComponentReference.java:104)
at com.webobjects.appserver._private.WODynamicGroup.invokeChildrenActio n(WODynamicGroup.java:101)
at com.webobjects.appserver._private.WODynamicGroup.invokeAction (WODynamicGroup.java:110)
at com.webobjects.appserver._private.WOForm.invokeAction (WOForm.java:82)
at com.webobjects.appserver._private.WODynamicGroup.invokeChildrenActio n(WODynamicGroup.java:101)
at com.webobjects.appserver._private.WODynamicGroup.invokeAction (WODynamicGroup.java:110)
at com.webobjects.appserver.WOComponent.invokeAction (WOComponent.java:945)
at com.webobjects.appserver._private.WOComponentReference.invokeAction( WOComponentReference.java:104)
at com.webobjects.appserver._private.WODynamicGroup.invokeChildrenActio n(WODynamicGroup.java:101)
at com.webobjects.appserver._private.WODynamicGroup.invokeAction (WODynamicGroup.java:110)
at com.webobjects.appserver._private.WOComponentContent.invokeAction (WOComponentContent.java:31)
at com.webobjects.appserver._private.WODynamicGroup.invokeChildrenActio n(WODynamicGroup.java:101)
at com.webobjects.appserver._private.WOGenericContainer.invokeAction (WOGenericContainer.java:23)
at com.webobjects.appserver._private.WODynamicGroup.invokeChildrenActio n(WODynamicGroup.java:101)
at com.webobjects.appserver._private.WODynamicGroup.invokeAction (WODynamicGroup.java:110)
at com.webobjects.appserver.WOComponent.invokeAction (WOComponent.java:945)
at com.webobjects.appserver._private.WOComponentReference.invokeAction( WOComponentReference.java:104)
at com.webobjects.appserver._private.WODynamicGroup.invokeChildrenActio n(WODynamicGroup.java:101)
at com.webobjects.appserver._private.WODynamicGroup.invokeAction (WODynamicGroup.java:110)
at com.webobjects.appserver._private.WOComponentContent.invokeAction (WOComponentContent.java:31)
at com.webobjects.appserver._private.WODynamicGroup.invokeChildrenActio n(WODynamicGroup.java:101)
at com.webobjects.appserver._private.WODynamicGroup.invokeAction (WODynamicGroup.java:110)
at com.webobjects.appserver._private.WOConditional.invokeAction (WOConditional.java:55)
at com.webobjects.appserver._private.WODynamicGroup.invokeChildrenActio n(WODynamicGroup.java:101)
at com.webobjects.appserver._private.WODynamicGroup.invokeAction (WODynamicGroup.java:110)
at com.webobjects.appserver.WOComponent.invokeAction (WOComponent.java:945)
at com.webobjects.appserver._private.WOComponentReference.invokeAction( WOComponentReference.java:104)
at com.webobjects.appserver._private.WODynamicGroup.invokeChildrenActio n(WODynamicGroup.java:101)
at com.webobjects.appserver._private.WODynamicGroup.invokeAction (WODynamicGroup.java:110)
at com.webobjects.appserver.WOComponent.invokeAction (WOComponent.java:945)
at com.webobjects.appserver.WOSession.invokeAction (WOSession.java:1168)
at com.webobjects.appserver.WOApplication.invokeAction (WOApplication.java:1375)
at com.apple.store.app.pim.Application.invokeAction (Application.java:282)
at com.webobjects.appserver._private.WOComponentRequestHandler._dispatc hWithPreparedPage(WOComponentRequestHandler.java:196)
at com.webobjects.appserver._private.WOComponentRequestHandler._dispatc hWithPreparedSession(WOComponentRequestHandler.java:287)
at com.webobjects.appserver._private.WOComponentRequestHandler._dispatc hWithPreparedApplication(WOComponentRequestHandler.java:322)
at com.webobjects.appserver._private.WOComponentRequestHandler._handleR equest(WOComponentRequestHandler.java:358)
at com.webobjects.appserver._private.WOComponentRequestHandler.handleRe quest(WOComponentRequestHandler.java:432)
at com.webobjects.appserver.WOApplication.dispatchRequest (WOApplication.java:1306)
at com.apple.store.toolkit.wo.ASDSWOApplication.dispatchRequest (ASDSWOApplication.java:969)
at com.webobjects.appserver._private.WOWorkerThread.runOnce (WOWorkerThread.java:173)
at com.webobjects.appserver._private.WOWorkerThread.run (WOWorkerThread.java:254)
at java.lang.Thread.run(Thread.java:613)




On Dec 22, 2007, at 10:11 PM, Chuck Hill wrote:

Having the full stack trace and error message would help in diagnosing this.

Chuck


On Dec 22, 2007, at 7:04 PM, Scott Lopatin wrote:


I'm having the exact same error you mention below a while back, did Chuck's suggestion of cleaning the project work? I'm on eclipse and nothing I do (removing build folder, recleaning) works. I'm still showing two PK id's trying to get created.


Has anyone else seen this and resolved this?

Much thanks,
Scott


On Feb 26, 2007, at 9:43 PM, Anthony Arthur wrote:

Is this a bug, or am I missed something? Upon a save I am getting a java.lang.IllegalStateException claiming a global ID could not be obtained. This error cropped up after I converted a join table, for which eos were not created, to an actual entity. I kept the same attributes that made up a compound PK before, but changed them to FK fields and added a separate, single field, PK. Now when I try to save I get:

java.lang.IllegalStateException: A valid global ID could not be obtained for entity named ScheduleDayProfileShiftProfile, relationship named scheduleDayProfiles, primary key dictionary {idShiftProfile = foo; idScheduleDayProfile = foobar; }.

As though it thinks the old compound PK is still defined. Has anyone ever seen this? I have, and what I did last time was remove the flattened relationships. I prefer not to do that this time. Can anyone offer another solution?

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


This email sent to email@hidden

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


This email sent to email@hidden

--

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









--

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










--

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@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Re: valid global ID could not be obtained for entity (From: Scott Lopatin <email@hidden>)
 >Re: valid global ID could not be obtained for entity (From: Chuck Hill <email@hidden>)
 >Re: valid global ID could not be obtained for entity (From: Scott Lopatin <email@hidden>)
 >Re: valid global ID could not be obtained for entity (From: Chuck Hill <email@hidden>)
 >Re: valid global ID could not be obtained for entity (From: Scott Lopatin <email@hidden>)

  • Prev by Date: Re: [Announce] Invite to try out our new Web2.0/WebObjects powered site
  • Next by Date: Re: Anyone have any other ideas on my deployment woes?
  • Previous by thread: Re: valid global ID could not be obtained for entity
  • Next by thread: Moving WOLips Project between machines
  • Index(es):
    • Date
    • Thread