cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ramiro Aparicio <>
Subject Re: Intermittent errors with inheritance
Date Tue, 27 Nov 2012 14:41:45 GMT
It's ok, indeed I think JIRA was the place to put it as it really seems 
to be an esoteric bug.

Indeed I thought it was not really important (I spotted the error a 
month ago) but it is happening very frequently and restarting the server 
3 or 4 times just to boot up without problems is really frustrating.


El 27/11/2012 13:40, Andrus Adamchik escribió:
> Hi Ramiro,
> Thanks for opening CAY-1775 and sorry for me not answering anything yet. Need to find
some uninterrupted time to sit down and investigate this scenario.
> Thanks,
> Andrus
> On Nov 20, 2012, at 4:11 PM, Ramiro Aparicio <> wrote:
>> I am back again with my inheritance love-horror story.
>> If you rememeber from previous chapters I am using a single table
>> inheritance with an abstract parent object (SessionLog) and two child
>> object (SessionLogApi and SessionLogWeb).
>> The problem is that from time to time when I restart the server I start
>> getting this errors:
>> org.apache.cayenne.CayenneRuntimeException: [v.3.1B1 May 28 2012
>> 18:42:43] Can't extract a master key. Missing key (idSessionLog), master
>> ID (<ObjectId:SessionLogApi, TEMP:00000E5FC15FE9A1>)
>>         at
>> org.apache.cayenne.access.DataDomainSyncBucket$PropagatedValueFactory.create(
>> After a restart usually are gone and never start happening during the
>> life of a running server, so it seems it is some problem with the model
>> loading process or something like that.
>> I am creating the object like this:
>>         SessionLogApi sessionLog =
>> createAndRegisterNewObject(SessionLogApi.class); //This calls to newObject
>>         sessionLog.setSessionStart(new Date());
>>         sessionLog.setToDevice(device);
>>         sessionLog.setToUser(device.getToUser());
>> But the context I commit has also some more new objects and one of them
>> with a relationship (1 to 1) with SessionLogApi (sessionLog ID is stored
>> in the other entity), the funny thing is that it does not complain when
>> creating a SessionLogWeb in that case there are similar relationships
>> with the SessionLogWeb id stored in other entity in the same commit.
>> So it only throw errors with one of the two childs and only after some
>> server starts (and it continues to fail until a server restart).
>> I will happily send more traces to try to catch the error if you tell me
>> what do you need.
>> Ramiro Aparicio

View raw message