[Geoserver-users] error when using CQL filter

Hello!

I’m trying to use a CQL–filter on a WMS-query but I can’t get it to work… I’ve tried the WMS/CQL-example in the demo-request page but it also throws the same error.

This is a part of the error message:

Could not parse CQL filter list.Lexical error at line 1, column 10. Encountered: """ (34), after : "", Current Token : =

Lexical error at line 1, column 10. Encountered: """ (34), after : "", Current Token : =

Lexical error at line 1, column 10. Encountered: """ (34), after : ""

Details:

org.vfny.geoserver.ServiceException: Could not parse CQL filter list.Lexical error at line 1, column 10. Encountered: """ (34), after : "", Current Token : =

at org.geoserver.wfs.kvp.CQLFilterKvpParser.parse(CQLFilterKvpParser.java:28)

at org.geoserver.ows.Dispatcher.parseKVP(Dispatcher.java:966)

I’m using the WMS/CQL-example that comes with Geoserver package int the demo-request page:

http://localhost/geoserver/wms?request=GetMap&layers=tiger:poly_landmarks,tiger:tiger_roads&styles=,&bbox=-73.97,40.74,-73.93,40.78&Format=image/png&width=344&height=500&srs=EPSG:4326&cql_Filter=LANAME%20=%20%22East%20River%22;NAME%20=%20%22West%20Rd%22

Does anyone have any ideas what the problem might be? I really the functionality that comes with the CQL-filter…

Regards: Mårten


Mvh:

Mårten Swärd

Systemutvecklare/Webbutvecklare, ITs

SMHI, Sveriges Meteorologiska och Hydrologiska Institut

Tel: +46 11 495 8469

Hi Swärd,

you just need to replace double quotes by single quotes to enclose string
literals in the CQL predicate.
This one works: <&cql_Filter=LANAME='East%20River';NAME='West%20Rd'>

Problem is in an early stage the CQL parser allowed double quotes as string
literal expression delimiters but now it became more strict (the actual CQL
language defines them to be enclosed by single quotes)

If we're shipping with a bad demo request we need to fix it. Which geoserver
version are you using?

Cheers,

Gabriel

On Wednesday 27 February 2008 09:37:06 am Swärd Mårten wrote:

Hello!
I'm trying to use a CQL-filter on a WMS-query but I can't get it to work..
I've tried the WMS/CQL-example in the demo-request page but it also throws
the same error. This is a part of the error message:
"Could not parse CQL filter list.Lexical error at line 1, column 10.
Encountered: &quot;\&quot;&quot; (34), after : &quot;&quot;, Current Token
: = Lexical error at line 1, column 10. Encountered: &quot;\&quot;&quot;
(34), after : &quot;&quot;, Current Token : = Lexical error at line 1,
column 10. Encountered: &quot;\&quot;&quot; (34), after : &quot;&quot;
Details:
org.vfny.geoserver.ServiceException: Could not parse CQL filter
list.Lexical error at line 1, column 10. Encountered: &quot;\&quot;&quot;
(34), after : &quot;&quot;, Current Token : = at
org.geoserver.wfs.kvp.CQLFilterKvpParser.parse(CQLFilterKvpParser.java:28)
at org.geoserver.ows.Dispatcher.parseKVP(Dispatcher.java:966)"

I'm using the WMS/CQL-example that comes with Geoserver package int the
demo-request page:
http://localhost/geoserver/wms?request=GetMap&layers=tiger:poly_landmarks,t
iger:tiger_roads&styles=,&bbox=-73.97,40.74,-73.93,40.78&Format=image/png&wi
dth=344&height=500&srs=EPSG:4326&cql_Filter=LANAME%20=%20%22East%20River%22;
NAME%20=%20%22West%20Rd%22

Does anyone have any ideas what the problem might be? I really the
functionality that comes with the CQL-filter..

Regards: Mårten

************************************************************************
Mvh:
Mårten Swärd
Systemutvecklare/Webbutvecklare, ITs
SMHI, Sveriges Meteorologiska och Hydrologiska Institut
Tel: +46 11 495 8469

!DSPAM:4045,47c52158296521015089218!

I ran accross this problem in RC3. So my guess it that Swärd is running something previous? Or perhaps using a previous data directory. Anyways this should be fixed in the demo request.

Gabriel Roldán wrote:

Hi Swärd,

you just need to replace double quotes by single quotes to enclose string literals in the CQL predicate.
This one works: <&cql_Filter=LANAME='East%20River';NAME='West%20Rd'>

Problem is in an early stage the CQL parser allowed double quotes as string literal expression delimiters but now it became more strict (the actual CQL language defines them to be enclosed by single quotes)

If we're shipping with a bad demo request we need to fix it. Which geoserver version are you using?

Cheers,

Gabriel

On Wednesday 27 February 2008 09:37:06 am Swärd Mårten wrote:

Hello!
I'm trying to use a CQL-filter on a WMS-query but I can't get it to work..
I've tried the WMS/CQL-example in the demo-request page but it also throws
the same error. This is a part of the error message:
"Could not parse CQL filter list.Lexical error at line 1, column 10. Encountered: &quot;\&quot;&quot; (34), after : &quot;&quot;, Current Token
: = Lexical error at line 1, column 10. Encountered: &quot;\&quot;&quot;
(34), after : &quot;&quot;, Current Token : = Lexical error at line 1,
column 10. Encountered: &quot;\&quot;&quot; (34), after : &quot;&quot;
Details:
org.vfny.geoserver.ServiceException: Could not parse CQL filter
list.Lexical error at line 1, column 10. Encountered: &quot;\&quot;&quot;
(34), after : &quot;&quot;, Current Token : = at
org.geoserver.wfs.kvp.CQLFilterKvpParser.parse(CQLFilterKvpParser.java:28)
at org.geoserver.ows.Dispatcher.parseKVP(Dispatcher.java:966)"

I'm using the WMS/CQL-example that comes with Geoserver package int the
demo-request page:
http://localhost/geoserver/wms?request=GetMap&layers=tiger:poly_landmarks,t
iger:tiger_roads&styles=,&bbox=-73.97,40.74,-73.93,40.78&Format=image/png&wi
dth=344&height=500&srs=EPSG:4326&cql_Filter=LANAME%20=%20%22East%20River%22;
NAME%20=%20%22West%20Rd%22

Does anyone have any ideas what the problem might be? I really the
functionality that comes with the CQL-filter..

Regards: Mårten

************************************************************************
Mvh:
Mårten Swärd
Systemutvecklare/Webbutvecklare, ITs
SMHI, Sveriges Meteorologiska och Hydrologiska Institut
Tel: +46 11 495 8469

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

!DSPAM:4007,47c563e053718362916074!

--
Justin Deoliveira
The Open Planning Project
jdeolive@anonymised.com