[GeoNetwork-users] WFS GetFeature request with fid filter fails with Geoserver 1.6.4 and Postgis Datastore With a Entity configured on a View

Hello i have some problem with a entity configured on a postgis
datastore with a view instead on a table when i send a WFS GetFeature
request with a fid filter. I obtain a similar error with Geoserver
1.5.4 and 1.6.4 Similar request works fine when the entity type
correspond to a table on the database.

my request :

<?xml version='1.0' encoding='utf-8' ?>
<wfs:GetFeature xmlns:gml="http://www.opengis.net/gml&quot;
outputFormat="GML2" service="WFS"
xmlns:ogc="http://www.opengis.net/ogc&quot; maxFeatures="1" xmlns=""
xmlns:wfs="http://www.opengis.net/wfs&quot; version="1.0.0"> <wfs:Query
typeName="gisnet3:geonote_point" xmlns:gisnet3="http://gisnet3">
<ogc:Filter xmlns:ogc="http://www.opengis.net/ogc&quot;&gt;
<ogc:FeatureId fid="geonote_point.nfm--49e4e129_11b0c9f16f7_-7f5b"></ogc:FeatureId>
</ogc:Filter>
</wfs:Query>
</wfs:GetFeature>

the exception returned by geoserver

<ServiceExceptionReport version="1.2.0"
xsi:schemaLocation="http://www.opengis.net/ogc
http://schemas.opengis.net/wfs/1.0.0/OGC-exception.xsd&quot;&gt;
<ServiceException>
error:Translator error
Translator error
Error reading Features
Could not aquire feature:org.geotools.data.DataSourceException: Error
Performing SQL query: SELECT "id", "title", "decription", "type",
"links", "image_links", "video_links",
encode(asBinary(force_2d("the_point"),'XDR'),'base64') FROM
"public"."geonote_point" WHERE () LIMIT 1
Error Performing SQL query: SELECT "id", "title", "decription",
"type", "links", "image_links", "video_links",
encode(asBinary(force_2d("the_point"),'XDR'),'base64') FROM
"public"."geonote_point" WHERE () LIMIT 1
ERREUR: erreur de syntaxe sur ou près de « ) »
</ServiceException>
</ServiceExceptionReport>

I obtain the same error with a table without primary key

2008/7/10 Nicolas CASTEL <nic.castel@anonymised.com>:

Hello i have some problem with a entity configured on a postgis
datastore with a view instead on a table when i send a WFS GetFeature
request with a fid filter. I obtain a similar error with Geoserver
1.5.4 and 1.6.4 Similar request works fine when the entity type
correspond to a table on the database.

my request :

<?xml version='1.0' encoding='utf-8' ?>
<wfs:GetFeature xmlns:gml="http://www.opengis.net/gml&quot;
outputFormat="GML2" service="WFS"
xmlns:ogc="http://www.opengis.net/ogc&quot; maxFeatures="1" xmlns=""
xmlns:wfs="http://www.opengis.net/wfs&quot; version="1.0.0"> <wfs:Query
typeName="gisnet3:geonote_point" xmlns:gisnet3="http://gisnet3">
<ogc:Filter xmlns:ogc="http://www.opengis.net/ogc&quot;&gt;
<ogc:FeatureId fid="geonote_point.nfm--49e4e129_11b0c9f16f7_-7f5b"></ogc:FeatureId>
</ogc:Filter>
</wfs:Query>
</wfs:GetFeature>

the exception returned by geoserver

<ServiceExceptionReport version="1.2.0"
xsi:schemaLocation="http://www.opengis.net/ogc
http://schemas.opengis.net/wfs/1.0.0/OGC-exception.xsd&quot;&gt;
<ServiceException>
error:Translator error
Translator error
Error reading Features
Could not aquire feature:org.geotools.data.DataSourceException: Error
Performing SQL query: SELECT "id", "title", "decription", "type",
"links", "image_links", "video_links",
encode(asBinary(force_2d("the_point"),'XDR'),'base64') FROM
"public"."geonote_point" WHERE () LIMIT 1
Error Performing SQL query: SELECT "id", "title", "decription",
"type", "links", "image_links", "video_links",
encode(asBinary(force_2d("the_point"),'XDR'),'base64') FROM
"public"."geonote_point" WHERE () LIMIT 1
ERREUR: erreur de syntaxe sur ou près de « ) »
</ServiceException>
</ServiceExceptionReport>

I apologize for geonetwork users. I have confused the geoserver's list
with the geonetwork's list.

2008/7/10 Nicolas CASTEL <nic.castel@anonymised.com>:

I obtain the same error with a table without primary key

2008/7/10 Nicolas CASTEL <nic.castel@anonymised.com>:

Hello i have some problem with a entity configured on a postgis
datastore with a view instead on a table when i send a WFS GetFeature
request with a fid filter. I obtain a similar error with Geoserver
1.5.4 and 1.6.4 Similar request works fine when the entity type
correspond to a table on the database.

my request :

<?xml version='1.0' encoding='utf-8' ?>
<wfs:GetFeature xmlns:gml="http://www.opengis.net/gml&quot;
outputFormat="GML2" service="WFS"
xmlns:ogc="http://www.opengis.net/ogc&quot; maxFeatures="1" xmlns=""
xmlns:wfs="http://www.opengis.net/wfs&quot; version="1.0.0"> <wfs:Query
typeName="gisnet3:geonote_point" xmlns:gisnet3="http://gisnet3">
<ogc:Filter xmlns:ogc="http://www.opengis.net/ogc&quot;&gt;
<ogc:FeatureId fid="geonote_point.nfm--49e4e129_11b0c9f16f7_-7f5b"></ogc:FeatureId>
</ogc:Filter>
</wfs:Query>
</wfs:GetFeature>

the exception returned by geoserver

<ServiceExceptionReport version="1.2.0"
xsi:schemaLocation="http://www.opengis.net/ogc
http://schemas.opengis.net/wfs/1.0.0/OGC-exception.xsd&quot;&gt;
<ServiceException>
error:Translator error
Translator error
Error reading Features
Could not aquire feature:org.geotools.data.DataSourceException: Error
Performing SQL query: SELECT "id", "title", "decription", "type",
"links", "image_links", "video_links",
encode(asBinary(force_2d("the_point"),'XDR'),'base64') FROM
"public"."geonote_point" WHERE () LIMIT 1
Error Performing SQL query: SELECT "id", "title", "decription",
"type", "links", "image_links", "video_links",
encode(asBinary(force_2d("the_point"),'XDR'),'base64') FROM
"public"."geonote_point" WHERE () LIMIT 1
ERREUR: erreur de syntaxe sur ou près de « ) »
</ServiceException>
</ServiceExceptionReport>