Ramiro Aparicio created CAY-1775:
------------------------------------
Summary: "Can't extract a master key. Missing key" depending on
startup conditions
Key: CAY-1775
URL: https://issues.apache.org/jira/browse/CAY-1775
Project: Cayenne
Issue Type: Bug
Components: Core Library
Affects Versions: 3.1B1
Environment: Tomcat 6.0.33
MySQL 5.1.63-0+squeeze1 (Debian)
Reporter: Ramiro Aparicio
I posted this on CAY user list but as no one could help and this seems a real
CAY issue I will post it here.
The exception is:
[2012-11-27 11:42:04,360] [TP-Processor2] ERROR
(ErrorReportService.java:reportError:36)- Exception
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:000001759999E9A1>)
at
org.apache.cayenne.access.DataDomainSyncBucket$PropagatedValueFactory.create(DataDomainSyncBucket.java:311)
at org.apache.cayenne.query.BatchQuery.getValue(BatchQuery.java:195)
at
org.apache.cayenne.query.InsertBatchQuery.getValue(InsertBatchQuery.java:61)
at
org.apache.cayenne.access.trans.InsertBatchQueryBuilder.getParameterValues(InsertBatchQueryBuilder.java:81)
at
org.apache.cayenne.access.jdbc.BatchAction.runAsBatch(BatchAction.java:131)
at
org.apache.cayenne.access.jdbc.BatchAction.performAction(BatchAction.java:83)
at
org.apache.cayenne.access.DataNodeQueryAction.runQuery(DataNodeQueryAction.java:87)
at org.apache.cayenne.access.DataNode.performQueries(DataNode.java:280)
at
org.apache.cayenne.access.DataDomainFlushAction.runQueries(DataDomainFlushAction.java:233)
at
org.apache.cayenne.access.DataDomainFlushAction.flush(DataDomainFlushAction.java:154)
at org.apache.cayenne.access.DataDomain.onSyncFlush(DataDomain.java:849)
at org.apache.cayenne.access.DataDomain$2.transform(DataDomain.java:813)
at
org.apache.cayenne.access.DataDomain.runInTransaction(DataDomain.java:873)
at
org.apache.cayenne.access.DataDomain.onSyncNoFilters(DataDomain.java:810)
at
org.apache.cayenne.access.DataDomain$DataDomainSyncFilterChain.onSync(DataDomain.java:1025)
at org.apache.cayenne.access.DataDomain.onSync(DataDomain.java:781)
at
org.apache.cayenne.access.DataContext.flushToParent(DataContext.java:817)
at
org.apache.cayenne.access.DataContext.commitChanges(DataContext.java:756)
at
com.proton.cayenne.utils.CayenneTemplate.commitChanges(CayenneTemplate.java:48)
But it just doesn't happen always, it seems to be related to context startup
becouse when it happens it happens every time, but when it starts and you get
no errors it will not raise the exception ever.
So I think this should be a problem with model loading or something like that,
I will try to attach the model causing the issues but in anyways when the error
occurs is when we are creating a SessionLogApi object that inherits (shared
table inheritance) from an abstract class SessionLog.
The same commit has another new object of class Session that is related to
SessionLogApi so Session object stores SessionLogApi id.
Please ask me for any extra information you need to identify the error, I will
hapily provide it.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira