Bug with single quote in feature fields
---------------------------------------
Key: GEOT-1573
URL: http://jira.codehaus.org/browse/GEOT-1573
Project: GeoTools
Issue Type: Bug
Components: data postgis
Environment: GeoServer 1.5.4a
Reporter: Gertjan van Oosten
Assignee: Justin Deoliveira
When modifying a feature element (text field) with a single quote in it, the
following error is logged:
08-Nov-2007 09:05:11 org.geotools.data.postgis.PostgisFeatureStore
modifyFeatures
WARNING: Some sort of database connection error: ERROR: syntax error at or
near "t"
The WFS-T request is:
<wfs:Transaction xmlns:wfs="http://www.opengis.net/wfs" service="WFS"
version="1.0.0">
<wfs:Update typeName="west:features">
<ogc:Filter xmlns:ogc="http://www.opengis.net/ogc">
<ogc:FeatureId fid="features.588" />
</ogc:Filter>
<wfs:Property>
<wfs:Name>west:name</wfs:Name>
<wfs:Value>test</wfs:Value>
</wfs:Property>
<wfs:Property>
<wfs:Name>west:geoLocation</wfs:Name>
<wfs:Value>
<gml:Point xmlns:gml="http://www.opengis.net/gml"
srsName="http://www.opengis.net/gml/srs/epsg.xml#4326">
<gml:coordinates decimal="." cs=","
ts="">1.5,55.2625</gml:coordinates>
</gml:Point>
</wfs:Value>
</wfs:Property>
<wfs:Property>
<wfs:Name>west:text</wfs:Name>
<wfs:Value>don't panic</wfs:Value>
</wfs:Property>
</wfs:Update>
</wfs:Transaction>
The response is:
<wfs:WFS_TransactionResponse version="1.0.0"
xmlns:wfs="http://www.opengis.net/wfs" xmlns:ogc="http://www.opengis.net/ogc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/wfs
http://localhost:8080/geoserver/schemas/wfs/1.0.0/WFS-transaction.xsd">
<wfs:TransactionResult> <wfs:Status> <wfs:FAILED/> </wfs:Status>
<wfs:Message>Some sort of database connection error: ERROR: syntax error at or
near "t"</wfs:Message>
</wfs:TransactionResult></wfs:WFS_TransactionResponse>
The feature definition in PostGIS is:
Table "public.features"
Column | Type |
Modifiers
------------------------------------+--------------------------+------------------------------------------------------
oid | integer | not null
default nextval('features_oid_seq'::regclass)
name | character varying |
geoLocation | geometry |
text | character varying |
Indexes:
"features_pkey" PRIMARY KEY, btree (oid)
Check constraints:
"enforce_dims_geoLocation" CHECK (ndims("geoLocation") = 2)
"enforce_geotype_geoLocation" CHECK (geometrytype("geoLocation") =
'POINT'::text OR "geoLocation" IS NULL)
"enforce_srid_geoLocation" CHECK (srid("geoLocation") = 4326)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel