You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cayenne.apache.org by Alex Gallo <ko...@gmail.com> on 2008/12/05 05:09:46 UTC
RE: Problem with cayenne accessing mixed tables in Postgresql
Thanks very much for your quick response.
However another problem comes up if I try to enclose the table name in
double quotes. I tend to get this error:
org.apache.cayenne.ConfigurationException: [v.2.0.4 October 8 2007] Error
during Configuration initialization. [v.2.0.4 October 8 2007] Load failures.
Main configuration class: org.apache.cayenne.conf.DefaultConfiguration,
details:
domain.map.name=ASECMap, domain.map.location=ASECMap.map.xml, reason: map
loading failed - [v.2.0.4 October 8 2007] Wrong DataMap format, last
processed tag: <null
It seems cayenne encounters a read problem with the Data Map on the node
containing double quotes
Again your help is very much appreciated
Alex Gallo
Re: Problem with cayenne accessing mixed tables in Postgresql
Posted by Andrus Adamchik <an...@objectstyle.org>.
Interesting... Seems to be working for me.
1. I created a test project in CayenneModeler 2.0.4. Here is how the
double quotes are saved - this is valid XML, and it loads back ok:
<data-map project-version="2.0">
<db-entity name=""test"">
</db-entity>
</data-map>
2. Since I don't have any 2.0 projects, I then switched to 3.0, and
modified one of my existing DataMaps to use quotes for table names.
With this setup I can confirm that runtime also works.
So is it possible that your Modeler is older than 2.0.4 (while runtime
is 2.0.4)? Take a look at the saved map.xml file - does it escape the
quotes correctly?
Andrus
On Dec 5, 2008, at 9:41 AM, Andrey Razumovsky wrote:
> It seems Cayenne cannot parse the datamap with double quotes - they
> conflict
> with other XML code. I suggest you try one of the following:
>
> 1. Wrap table names in single quotes (')
> or
> 2. Use " instead of quote symbols
>
> 2008/12/5, Alex Gallo <ko...@gmail.com>:
>>
>> Thanks very much for your quick response.
>>
>> However another problem comes up if I try to enclose the table name
>> in
>> double quotes. I tend to get this error:
>>
>>
>> org.apache.cayenne.ConfigurationException: [v.2.0.4 October 8 2007]
>> Error
>> during Configuration initialization. [v.2.0.4 October 8 2007] Load
>> failures.
>> Main configuration class:
>> org.apache.cayenne.conf.DefaultConfiguration,
>> details:
>> domain.map.name=ASECMap, domain.map.location=ASECMap.map.xml,
>> reason:
>> map
>> loading failed - [v.2.0.4 October 8 2007] Wrong DataMap format, last
>> processed tag: <null
>>
>> It seems cayenne encounters a read problem with the Data Map on the
>> node
>> containing double quotes
>>
>> Again your help is very much appreciated
>>
>>
>> Alex Gallo
>>
Re: Problem with cayenne accessing mixed tables in Postgresql
Posted by Andrey Razumovsky <ra...@gmail.com>.
It seems Cayenne cannot parse the datamap with double quotes - they conflict
with other XML code. I suggest you try one of the following:
1. Wrap table names in single quotes (')
or
2. Use " instead of quote symbols
2008/12/5, Alex Gallo <ko...@gmail.com>:
>
> Thanks very much for your quick response.
>
> However another problem comes up if I try to enclose the table name in
> double quotes. I tend to get this error:
>
>
> org.apache.cayenne.ConfigurationException: [v.2.0.4 October 8 2007] Error
> during Configuration initialization. [v.2.0.4 October 8 2007] Load
> failures.
> Main configuration class: org.apache.cayenne.conf.DefaultConfiguration,
> details:
> domain.map.name=ASECMap, domain.map.location=ASECMap.map.xml, reason:
> map
> loading failed - [v.2.0.4 October 8 2007] Wrong DataMap format, last
> processed tag: <null
>
> It seems cayenne encounters a read problem with the Data Map on the node
> containing double quotes
>
> Again your help is very much appreciated
>
>
> Alex Gallo
>