23 of the 24 queries it imported loaded back in fine (although I
didn't verify they were actually correct). Here is the one that
failed:
<query name="CoreContracts_OSISContracts"
factory="org.apache.cayenne.map.SelectQueryBuilder" root="obj-entity"
root-name="CoreContracts">
<qualifier><![CDATA[db: = "OSIS "]]></qualifier>
<ordering><![CDATA[contractNum]]></ordering>
</query>
It is the only one that had a "db:" in it. Under the "General" tab
for the query, it has: db: = "OSIS "
Here is the EOModel fetch specification it imported:
{
OSISContracts = {
class = EOFetchSpecification;
entityName = CoreContracts;
fetchLimit = 0;
isDeep = YES;
qualifier = {
class = EOKeyValueQualifier;
key = contractOwner;
selectorName = "isEqualTo:";
value = "OSIS ";
};
refreshesRefetchedObjects = YES;
sortOrderings = (
{
class = EOSortOrdering;
key = contractNum;
selectorName = "compareAscending:";
}
);
};
}
It doesn't look like the qualifier was correctly imported, either.
Here is the stack trace:
INFO: Warning: map loading failed.
org.apache.cayenne.CayenneRuntimeException: [v.3.0-SNAPSHOT Dec 15
2009 20:25:11] Error loading DataMap, last processed tag: <qualifier>
at org.apache.cayenne.map.MapLoader.loadDataMap(MapLoader.java:732)
at org.apache.cayenne.conf.RuntimeLoadDelegate.loadDataMap(RuntimeLoadDelegate.java:212)
at org.apache.cayenne.conf.RuntimeLoadDelegate.shouldLoadDataMaps(RuntimeLoadDelegate.java:170)
at org.apache.cayenne.conf.ConfigLoader$DomainHandler.loadMaps(ConfigLoader.java:251)
at org.apache.cayenne.conf.ConfigLoader$DomainHandler.finished(ConfigLoader.java:235)
at org.apache.cayenne.conf.AbstractHandler.endElement(AbstractHandler.java:124)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:633)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanEndElement(XMLNSDocumentScannerImpl.java:719)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1685)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242)
at org.apache.cayenne.conf.ConfigLoader.loadDomains(ConfigLoader.java:78)
at org.apache.cayenne.conf.DefaultConfiguration.initialize(DefaultConfiguration.java:152)
at org.apache.cayenne.project.ApplicationProject.loadProject(ApplicationProject.java:114)
at org.apache.cayenne.project.ApplicationProject.postInitialize(ApplicationProject.java:101)
at org.apache.cayenne.project.ApplicationProject.<init>(ApplicationProject.java:85)
at org.apache.cayenne.modeler.action.OpenProjectAction.openProject(OpenProjectAction.java:123)
at org.apache.cayenne.modeler.ProjectWatchdog.doOnChange(ProjectWatchdog.java:86)
at org.apache.cayenne.modeler.util.FileWatchdog.check(FileWatchdog.java:198)
at org.apache.cayenne.modeler.util.FileWatchdog.run(FileWatchdog.java:209)
Caused by: org.apache.cayenne.exp.parser.ParseException: Encountered "
"=" "= "" at line 1, column 5.
Was expecting:
<PROPERTY_PATH> ...
at org.apache.cayenne.exp.parser.ExpressionParser.generateParseException(ExpressionParser.java:1487)
at org.apache.cayenne.exp.parser.ExpressionParser.jj_consume_token(ExpressionParser.java:1422)
at org.apache.cayenne.exp.parser.ExpressionParser.pathExpression(ExpressionParser.java:1298)
at org.apache.cayenne.exp.parser.ExpressionParser.numericPrimary(ExpressionParser.java:1202)
at org.apache.cayenne.exp.parser.ExpressionParser.numericTerm(ExpressionParser.java:1156)
at org.apache.cayenne.exp.parser.ExpressionParser.multiplySubtractExp(ExpressionParser.java:1063)
at org.apache.cayenne.exp.parser.ExpressionParser.scalarNumericExpression(ExpressionParser.java:987)
at org.apache.cayenne.exp.parser.ExpressionParser.scalarConditionExpression(ExpressionParser.java:780)
at org.apache.cayenne.exp.parser.ExpressionParser.simpleCondition(ExpressionParser.java:237)
at org.apache.cayenne.exp.parser.ExpressionParser.notCondition(ExpressionParser.java:190)
at org.apache.cayenne.exp.parser.ExpressionParser.andCondition(ExpressionParser.java:96)
at org.apache.cayenne.exp.parser.ExpressionParser.orCondition(ExpressionParser.java:56)
at org.apache.cayenne.exp.parser.ExpressionParser.expression(ExpressionParser.java:49)
at org.apache.cayenne.exp.Expression.fromString(Expression.java:136)
at org.apache.cayenne.map.QueryLoader.setQualifier(QueryLoader.java:136)
at org.apache.cayenne.map.MapLoader.processEndQualifier(MapLoader.java:1311)
at org.apache.cayenne.map.MapLoader.access$49(MapLoader.java:1297)
at org.apache.cayenne.map.MapLoader$49.execute(MapLoader.java:560)
at org.apache.cayenne.map.MapLoader.endElement(MapLoader.java:873)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:633)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanEndElement(XMLNSDocumentScannerImpl.java:719)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1685)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242)
at org.apache.cayenne.map.MapLoader.loadDataMap(MapLoader.java:721)
... 22 more
I have to run off for a bit now ...
Thanks,
mrg
On Wed, Dec 23, 2009 at 9:10 AM, Andrus Adamchik <andru..bjectstyle.org> wrote:
>
> Not sure if it is possible to share the DataMap xml file? Otherwise this can be posted to Jira, and somebody can take a look. Also any exceptions in ~/.cayenne/modeler.log ?
>
> Andrus
>
>
> On Dec 23, 2009, at 4:04 PM, Michael Gentry wrote:
>
>> I still need to delve into this to get more details.
>>
>> Yesterday a co-worker imported an EOModel and saved it. Later on he
>> re-loaded the project and the DataMap fails to load. I just repeated the
>> steps and verified it. The problem lies in the stored fetch specifications
>> that were imported as Cayenne queries. When we deleted the <query> parts
>> out of the map XML it loaded. I haven't had a chance to try to figure out
>> which query was the problem yet (there are over 20 of them), but if someone
>> has recently done something with the query loading code, please let me know.
>>
>> Thanks! :-)
>>
>> mrg
>>
>> PS. This was a modeler I built on 12/15, post B1.
>
This archive was generated by hypermail 2.0.0 : Wed Dec 23 2009 - 09:31:27 EST