[Geoserver-users] ogc filter error in 1.6.3 (from 1.5.2)

Hello. I’ve just upgraded to 1.6.3 from 1.5.2 and am getting errors from ogc:Filter expressions that were previously working. I’ve included the error message below: 11 Apr 12:22:04 INFO [geoserver.filters] - 67.15.4.25 “GET /geoserver/wfs?request=getfeature&service=wfs&version=1.0.0&typename=yhdn:yhedn_or_1kview&filter=%3Cogc%3AFilter+xmlns%3Aogc%3D%22http%3A%2F%2Fogc.org%22+xmlns%3Agml%3D%22http%3A%2F%2Fwww.opengis.net%2Fgml%22%3E%3Cogc%3AAnd%3E%3Cogc%3APropertyIsEqualTo%3E%3Cogc%3APropertyName%3Egatewaykey%3C%2Fogc%3APropertyName%3E%3Cogc%3ALiteral%3ENHMSYS0000080205%3C%2Fogc%3ALiteral%3E%3C%2Fogc%3APropertyIsEqualTo%3E%3Cogc%3ABBOX%3E%3Cogc%3APropertyName%3Ebox%3C%2Fogc%3APropertyName%3E%3Cgml%3ABox+srsName%3D%22http%3A%2F%2Fwww.opengis.net%2Fgml%2Fsrs%2Fepsg.xml%234326%22%3E%3Cgml%3Acoordinates%3E-0.998694%2C53.564393±0.800675%2C53.635661%3C%2Fgml%3Acoordinates%3E%3C%2Fgml%3ABox%3E%3C%2Fogc%3ABBOX%3E%3C%2Fogc%3AAnd%3E%3C%2Fogc%3AFilter%3E” “PECL::HTTP/1.3.3 (PHP/5.1.4)” “” and decoded the filter here: Can anyone explain why there’s a problem with this filter? Thanks. Dan


View this message in context: ogc filter error in 1.6.3 (from 1.5.2)
Sent from the GeoServer - User mailing list archive at Nabble.com.

lunarfish ha scritto:

Hello. I've just upgraded to 1.6.3 from 1.5.2 and am getting errors from ogc:Filter expressions that were previously working. I've included the error message below: 11 Apr 12:22:04 INFO [geoserver.filters] - 67.15.4.25 "GET /geoserver/wfs?request=getfeature&service=wfs&version=1.0.0&typename=yhdn:yhedn_or_1kview&filter=%3Cogc%3AFilter+xmlns%3Aogc%3D%22http%3A%2F%2Fogc.org%22+xmlns%3Agml%3D%22http%3A%2F%2Fwww.opengis.net%2Fgml%22%3E%3Cogc%3AAnd%3E%3Cogc%3APropertyIsEqualTo%3E%3Cogc%3APropertyName%3Egatewaykey%3C%2Fogc%3APropertyName%3E%3Cogc%3ALiteral%3ENHMSYS0000080205%3C%2Fogc%3ALiteral%3E%3C%2Fogc%3APropertyIsEqualTo%3E%3Cogc%3ABBOX%3E%3Cogc%3APropertyName%3Ebox%3C%2Fogc%3APropertyName%3E%3Cgml%3ABox+srsName%3D%22http%3A%2F%2Fwww.opengis.net%2Fgml%2Fsrs%2Fepsg.xml%234326%22%3E%3Cgml%3Acoordinates%3E-0.998694%2C53.564393+-0.800675%2C53.635661%3C%2Fgml%3Acoordinates%3E%3C%2Fgml%3ABox%3E%3C%2Fogc%3ABBOX%3E%3C%2Fogc%3AAnd%3E%3C%2Fogc%3AFilter%3E" "PECL::HTTP/1.3.3 (PHP/5.1.4)" "" and decoded the filter here: gatewaykey NHMSYS0000080205 box -0.998694,53.564393 -0.800675,53.635661 Can anyone explain why there's a problem with this filter? Thanks. Dan

Can you explain what the problem is to start with? Do you have
any error message, a stack trace from geoserver.log?

Cheers
Andrea

Hi Andre. Sorry - thought I'd picked up the error message. Here's the
catalina.out log file.

The error says that it's expecting a ogc:PropertyName and is getting a
class. I assume it's the and clause but this always worked before.

Cheers. Dan

http://www.nabble.com/file/p16627779/catalina.out catalina.out
--
View this message in context: http://www.nabble.com/ogc-filter-error-in-1.6.3-(from-1.5.2)-tp16627738p16627779.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

lunarfish ha scritto:

Hi Andre. Sorry - thought I'd picked up the error message. Here's the
catalina.out log file.

The error says that it's expecting a ogc:PropertyName and is getting a
class. I assume it's the and clause but this always worked before.

Cheers. Dan

http://www.nabble.com/file/p16627779/catalina.out catalina.out

Aaah. Well, it seems it's your lucky day, it's a bug and I've just
fixed it on 1.6.x. If you want to try out the fix, have a look
at the jira report and let me know if the fix works
for you:
http://jira.codehaus.org/browse/GEOS-1860

Cheers
Andrea

Hi Andrea.

I've loaded the build of the 12th and most things are now back up and
running but the below query (with the ogc:And clause still fails - it
doesn't seem to recognise the geometry.) Is there anything wrong with this
query or is it still a bug?

http://89.249.160.206/geoserver/wfs?request=getfeature&service=wfs&version=1.0.0&typename=yhdn:yhedn_or_1kview&filter=<ogc%3AFilter+xmlns%3Aogc%3D"http%3A%2F%2Fogc.org"+xmlns%3Agml%3D"http%3A%2F%2Fwww.opengis.net%2Fgml"><ogc%3AAnd><ogc%3APropertyIsEqualTo><ogc%3APropertyName>gatewaykey<%2Fogc%3APropertyName><ogc%3ALiteral>NBNSYS0000002563<%2Fogc%3ALiteral><%2Fogc%3APropertyIsEqualTo><ogc%3ABBOX><ogc%3APropertyName>box<%2Fogc%3APropertyName><gml%3ABox+srsName%3D"http%3A%2F%2Fwww.opengis.net%2Fgml%2Fsrs%2Fepsg.xml%234326"><gml%3Acoordinates>-0.860103%2C53.661357+-0.206129%2C53.803398<%2Fgml%3Acoordinates><%2Fgml%3ABox><%2Fogc%3ABBOX><%2Fogc%3AAnd><%2Fogc%3AFilter>

Here's the tomcat log file.
http://www.nabble.com/file/p16674609/catalina.out catalina.out

Thanks. Dan
--
View this message in context: http://www.nabble.com/ogc-filter-error-in-1.6.3-(from-1.5.2)-tp16627738p16674609.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

lunarfish ha scritto:

Hi Andrea.

I've loaded the build of the 12th and most things are now back up and
running but the below query (with the ogc:And clause still fails - it
doesn't seem to recognise the geometry.) Is there anything wrong with this
query or is it still a bug?

http://89.249.160.206/geoserver/wfs?request=getfeature&service=wfs&version=1.0.0&typename=yhdn:yhedn_or_1kview&filter=<ogc%3AFilter+xmlns%3Aogc%3D"http%3A%2F%2Fogc.org"+xmlns%3Agml%3D"http%3A%2F%2Fwww.opengis.net%2Fgml"><ogc%3AAnd><ogc%3APropertyIsEqualTo><ogc%3APropertyName>gatewaykey<%2Fogc%3APropertyName><ogc%3ALiteral>NBNSYS0000002563<%2Fogc%3ALiteral><%2Fogc%3APropertyIsEqualTo><ogc%3ABBOX><ogc%3APropertyName>box<%2Fogc%3APropertyName><gml%3ABox+srsName%3D"http%3A%2F%2Fwww.opengis.net%2Fgml%2Fsrs%2Fepsg.xml%234326"><gml%3Acoordinates>-0.860103%2C53.661357+-0.206129%2C53.803398<%2Fgml%3Acoordinates><%2Fgml%3ABox><%2Fogc%3ABBOX><%2Fogc%3AAnd><%2Fogc%3AFilter>

Here's the tomcat log file. http://www.nabble.com/file/p16674609/catalina.out catalina.out

In the log file there are no exceptions... what error do you get?

I've tried a similar filter altering a sample request:

<wfs:GetFeature service="WFS" version="1.0.0"
   outputFormat="GML2"
   xmlns:topp="http://www.openplans.org/topp&quot;
   xmlns:wfs="http://www.opengis.net/wfs&quot;
   xmlns:ogc="http://www.opengis.net/ogc&quot;
   xmlns:gml="http://www.opengis.net/gml&quot;
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;
   xsi:schemaLocation="http://www.opengis.net/wfs
http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd&quot;&gt;
   <wfs:Query typeName="topp:states">
     <ogc:PropertyName>topp:STATE_NAME</ogc:PropertyName>
     <ogc:PropertyName>topp:PERSONS</ogc:PropertyName>
     <ogc:Filter>
       <ogc:And>
       <ogc:PropertyIsEqualTo>
            <ogc:PropertyName>STATE_NAME</ogc:PropertyName>
            <ogc:Literal>New York</ogc:Literal>
       </ogc:PropertyIsEqualTo>
       <ogc:BBOX>
         <ogc:PropertyName>the_geom</ogc:PropertyName>
         <gml:Box srsName="http://www.opengis.net/gml/srs/epsg.xml#4326&quot;&gt;
            <gml:coordinates>-75.102613,40.212597 -72.361859,41.512517</gml:coordinates>
         </gml:Box>
       </ogc:BBOX>
       </ogc:And>
    </ogc:Filter>
   </wfs:Query>
</wfs:GetFeature>

And it seems to work fine...

Cheers
Andrea

Hi Andrea.

I don't get any errors but I don't get any data. If I run the same query
without the ogc:And clause I get results with the tested property value
(scientificname=Arvicola terrestris)

This does work:
http://89.249.160.206/geoserver/wfs?request=getfeature&service=wfs&version=1.0.0&typename=yhdn:r1kdata&filter=<ogc%3AFilter+xmlns%3Aogc%3D"http%3A%2F%2Fogc.org"+xmlns%3Agml%3D"http%3A%2F%2Fwww.opengis.net%2Fgml"><ogc%3ABBOX><ogc%3APropertyName>box<%2Fogc%3APropertyName><gml%3ABox+srsName%3D"http%3A%2F%2Fwww.opengis.net%2Fgml%2Fsrs%2Fepsg.xml%234326"><gml%3Acoordinates>-0.998694%2C53.564393+-0.672734%2C53.635659<%2Fgml%3Acoordinates><%2Fgml%3ABox><%2Fogc%3ABBOX><%2Fogc%3AFilter>

.. but this doesn't work (the first record returned is for the queried
species):
http://89.249.160.206/geoserver/wfs?request=getfeature&service=wfs&version=1.0.0&typename=yhdn:r1kdata&filter=<ogc%3AFilter+xmlns%3Aogc%3D"http%3A%2F%2Fogc.org"+xmlns%3Agml%3D"http%3A%2F%2Fwww.opengis.net%2Fgml"><ogc%3AAnd><ogc%3APropertyIsEqualTo><ogc%3APropertyName>scientificname<%2Fogc%3APropertyName><ogc%3ALiteral>Arvicola%20terrestris<%2Fogc%3ALiteral><%2Fogc%3APropertyIsEqualTo><ogc%3ABBOX><ogc%3APropertyName>box<%2Fogc%3APropertyName><gml%3ABox+srsName%3D"http%3A%2F%2Fwww.opengis.net%2Fgml%2Fsrs%2Fepsg.xml%234326"><gml%3Acoordinates>-0.998694%2C53.564393+-0.672734%2C53.635659<%2Fgml%3Acoordinates><%2Fgml%3ABox><%2Fogc%3ABBOX><%2Fogc%3AAnd><%2Fogc%3AFilter>

I've got a number of pages which use similar queries to select records for a
single species from a table which contains all species records but none of
these work with 1.6.3.

One thing I've noticed is that the namespace for feature attributes has
changed. In 1.5.2 all the feature attributes had gml: as the namespace where
as they now have the namespace of the feature type (yhdn).

Thanks. Dan
--
View this message in context: http://www.nabble.com/ogc-filter-error-in-1.6.3-(from-1.5.2)-tp16627738p16676278.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

Hello.

I've also checked removing the geometry (ogc:BBOX) filter and leaving the
ogc:PropertyIsEqualTo filter so both filters work fine individually without
but not when combined using the ogc:And clause.

The other thing which differs from your test is that topp:STATES is a
shapefile whereas my feature is a mysql database table.

Thanks. Dan
--
View this message in context: http://www.nabble.com/ogc-filter-error-in-1.6.3-(from-1.5.2)-tp16627738p16676940.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

lunarfish ha scritto:

Hello.

I've also checked removing the geometry (ogc:BBOX) filter and leaving the
ogc:PropertyIsEqualTo filter so both filters work fine individually without
but not when combined using the ogc:And clause.

The other thing which differs from your test is that topp:STATES is a
shapefile whereas my feature is a mysql database table.

Can you export your data to shapefile and see if you can reproduce
the issue there too? If not, open a jira issue against the mysql
data store.

Cheers
Andrea