One more thing.. reverting my oracle extension to the old version:
http://downloads.sourceforge.net/geoserver/geoserver-1.3.x-oracle-ext.zi
p?modtime=1153852010&big_mirror=0
under 'datastore extras 1.3.x' in:
http://sourceforge.net/project/showfiles.php?group_id=25086&package_id=1
29885
still using geoserver 1.4.0 solves problem 2 but not problem 1.
-ivan
-----Original Message-----
From: geoserver-devel-bounces@lists.sourceforge.net
[mailto:geoserver-devel-bounces@lists.sourceforge.net] On Behalf Of Ivan
Price
Sent: Monday, 18 December 2006 2:40 PM
To: geoserver-devel@lists.sourceforge.net
Subject: [Geoserver-devel] 1.4.0 oracle spatial filter issues..
Hi there,
i'm having some problems with filtering results with the new geoserver,
or at least the oracle datastore component..
i am using geoserver 1.4.0 (stable) and the oracle extension linked from
your web page:
http://prdownloads.sourceforge.net/geoserver/geoserver-1.4.0-oracle-plug
in.zip?download
which turns out to be gt2-oracle-spatial-2.2.2-SNAPSHOT.jar and
ojdbc14.jar
i think they are 2 separate problems so here goes..
__________________________________
1.
I have a layer in geoserver called 'CADASTRE' that points to a table in
oracle 10g called CADASTRE.. the LOCATION and PARCEL fields are both
varchars in oracle.. and strings according to geoserver.
when i submit this getfeature request:
<?xml version="1.0"?>
<wfs:GetFeature service="WFS" version="1.0.0" outputFormat="GML2"
xmlns:topp="http://www.openplans.org/topp"
xmlns:wfs="http://www.opengis.net/wfs"
xmlns="http://www.opengis.net/ogc"
xmlns:ogc="http://www.opengis.net/ogc"
xmlns:gml="http://www.opengis.net/gml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/wfs
http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd">
<wfs:Query typeName="ntlis:CADASTRE">
<ogc:Filter>
<ogc:And>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>ntlis:PARCEL</ogc:PropertyName>
<ogc:Literal>4812</ogc:Literal>
</ogc:PropertyIsEqualTo>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>ntlis:LOCATION</ogc:PropertyName>
<ogc:Literal>055</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:And>
</ogc:Filter>
</wfs:Query>
</wfs:GetFeature>
i get a stack trace from geoserver (attached as geoserver_log_1.txt),
where oracle is complaining 'ORA-01722: invalid number' referring to the
PARCEL value. looking the sql that geoserver executed (from the
geoserver logs) it goes:
SELECT "MI_PRINX", "LAISKEY", "LOCATION", "LTOCODE", "PARCEL",
"PART_PARCEL", "PARCEL_TYPE", "AREA_M2", "ST_NUMBER", "ST_PART",
"ST_NAME", "ST_TYPE", "ST_SUBURB", "SURVEY", "TEN_REF_TYPE",
"TEN_REF_NUM", "TEN_STATUS", "TEN_VOL_TYPE", "TEN_VOLUME", "TEN_FOLIO",
"TP_ZONE", "GEOMETRY", "STATUS_CODE", "PFI", "UFI", "FEAT_NAME",
"OWN_CATEGORY", "PROPERTY_NAME" FROM "CADASTRE" WHERE ("PARCEL" = 4812
AND "LOCATION" = 55) note that has turned the input values into numbers
(they're not '4812'
and '055').. adding the quotes manually fixes the query.
so it seems that you can't do a filter of a number (or rather of text
representing a number) against a text column.. geoserver should always
put quotes around values when they are destined for a string or
character type field.
________________________________________
2.
the propertyislike operator seems busted.. when i execute the following:
<?xml version="1.0"?>
<wfs:GetFeature service="WFS" version="1.0.0" outputFormat="GML2"
xmlns:topp="http://www.openplans.org/topp"
xmlns:wfs="http://www.opengis.net/wfs"
xmlns="http://www.opengis.net/ogc"
xmlns:ogc="http://www.opengis.net/ogc"
xmlns:gml="http://www.opengis.net/gml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/wfs
http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd">
<wfs:Query typeName="ntlis:PLACENAME">
<ogc:Filter>
<ogc:PropertyIsLike wildCard="%" singleChar="_" escape="\">
<ogc:PropertyName>ntlis:NAME</ogc:PropertyName>
<ogc:Literal>NIGHT%</ogc:Literal>
</ogc:PropertyIsLike>
</ogc:Filter>
</wfs:Query>
</wfs:GetFeature>
i get no results.. looking at the sql in the geoserver log (attached as
geoserver_log_2.txt) there is no where clause on the sql.
SELECT "MI_PRINX", "PLACE_ID", "NAME", "TYPE_DESIGNATION", "DATA_TYPE",
"PLACE_STATUS", "HISTORY_ORIGIN", "DATE_REGISTERED", "LOCATION",
"LOCALITIES", "PARCELS", "LGAS", "ALTERNATE_NAMES", "GEOMETRY" FROM
"PLACENAME"
issueing the same request to geoserver 1.3.0 stable at the same oracle
table gives me the correct results.
is anyone else able to do proertyislike operations in the new geoserver
?
____________________________________________
running tomcat version "Apache Tomcat/4.1.27", jvm 1.4.2-b28, on win
2000.
thanks heaps,
-ivan