Vincent Frison wrote:
> Hello,
>
> I come back to the mailing list with another mail account. I had so much
> problems with the previous one: I posted several mails to the ML (mainly
> int the "Very strange SQL query" thread), but apparently most of them
> were lost (I suppose SourceForce mail server was rejecting my SMTP
> server which is not my regular one).
>
> However I could catch one reply from Andrea (BTW thanks Andrea for your
> private mail), where it seems it was really a bug and not a bad
> configuration/use. So I repost here:
>
> ///////////////////////////////////
>
>>> On 2/8/07, Vincent Frison <[EMAIL PROTECTED]> wrote:
>> ...
>> I think I know what the problem is, it's about DB schemas. My tables are in a
>> separate schema (called "esig") while the system tables (for PostGIS) are
>> still in the default schema (called "public").
>>
>> On my featureStore.addFeatures(featuresToAdd) call, there's this failure:
>> org.geotools.data.DataSourceException: Error Performing SQL query:
>> SELECT "id", "key", "userId", "layerId", "sessionId", "label", "mode",
>> "style",
>> encode(AsBinary(force_2d("geom"), 'XDR'),'base64') FROM "esig"."esig_points"
>> WHERE '1' = '0'
>>
>> But if I look into the postgresql logs, there's an error: unable to
>> find "esig_points" table or something like that => Geotools tries to lookup
>> the "esig_points" table from the "public" schema, but not from the "esig"
>> schema!
>>
>> This is crazy because the schema is well specified in the SQL query
>> ("esig"."esig_points").
>>
>> And if I add another feature type mapped to a table which is in the "public"
>> schema, it works great.
>>
>> It looks like a bug isn't it?
>
> Indeed. I know some work on schemas was done recently, which version of
> geotools did you use?
> Cory, is this something you fixed?
Vincent,
Sorry for missing the message -- haven't been watching the lists very
closely.
I thought we did a decent job on schema support, but it hasn't been
tested on _every_ configuration yet. My inkling is that it could be a
permissions problem, but the easiest way to figure this out would be to
step through with the debugger.
What version of postgresql are you running? Please try executing that
SQL snippet from within the psql shell:
SELECT "id", "key", "userId", "layerId", "sessionId", "label", "mode",
"style", encode(AsBinary(force_2d("geom"), 'XDR'),'base64') FROM
"esig"."esig_points" WHERE '1' = '0';
(using the same user credentials). Note that if your table or schema
has uppercase characters, it won't match.
You should get 0 rows back, but you might also get the error reproduced.
Let us know how that goes. I just tried a similar snippet with
postgres 8.1.1 without trouble.
Another thing to try is setting log_statement = 'all' in your
postgresql.conf file, restarting, and then hitting the database again
with your code (this will allow you to see ALL the sql sent to the
server in your pgsql.log, rather than just errors) -- this will shed
some light on what is leading up to this point.
Cheers,
Cory.
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users