Re: No object is registered in context with Id

2016-03-03 Thread Andrew Willerding
I had to add newItem before the getObjectContext() to allow the program to compile and then unfortunately I'm getting the error below. There shouldn't be any duplicate entries as this is the first record I'm attempting to insert for this particular project and contact. The underlying project

Re: No object is registered in context with Id

2016-03-03 Thread dollj
Change the line that throws the exception --> newItem.setContact(item); to: newItem.setContact( getObjectContext().localObject( item ) ); -Original Message- From: Andrew Willerding Sent: Thursday, March 3, 2016 4:16 PM To: user@cayenne.apache.org Subject: Re: No object is registered i

Re: No object is registered in context with Id

2016-03-03 Thread Andrew Willerding
Here's the rest of the stack. 2016-03-03,09:05:44:433,ERROR,[Thread-15],,'com.callistacti.vaadinLib.IWindowEditBase' ERROR:ObservableComponent Error processing observer's update code. Observer==>class com.itsurcom.bluecranex.GUI.Panels.PanelProjectContacts::org.apache.cayenne.CayenneRuntimeExc

Re: No object is registered in context with Id

2016-03-03 Thread Andrus Adamchik
Hi Andrew, You don't show the relevant stack, so I can only guess. But I find the following code suspect: >project.setObjectContext(oc); >project.getCompany().setObjectContext(oc); Setting ObjectContext explicitly on Persistent objects is never a good idea. Object should stay in the Ob

Re: MariaDB: "Table was not locked with LOCK TABLES" (mutithreaded code)

2016-03-03 Thread Andrus Adamchik
Haven't seen it. If you find the cause (especially if it points to Cayenne), please share. Andrus > On Mar 2, 2016, at 3:22 PM, Hugi Thordarson wrote: > > Hi all, > when I’m running multithreaded code (at least I think that’s the trigger, > since this seems to mostly happen when I have a long