DWITHIN filter query fails when a request is made against a feature from an Oracle datastore

Description

the following GetMap
http://10.112.80.27:8080/Geoserver/wms?service=WMS&version=1.1.0&request=GetMap&layers=cadrede_gis:GIR_INFRA_NODES&styles=&bbox=-89309,-111933,-88509,-111133&width=449&height=512&srs=EPSG:27492&format=image/png&EXCEPTIONS=application/vnd.ogc.se+xml&CQL_FILTER=DWITHIN(LOCATION,POINT(-88909%20-111533),100,meters - http://10.112.80.27:8080/Geoserver/wms?service=WMS&version=1.1.0&request=GetMap&layers=cadrede_gis:GIR_INFRA_NODES&styles=&bbox=-89309,-111933,-88509,-111133&width=449&height=512&srs=EPSG:27492&format=image/png&EXCEPTIONS=application/vnd.ogc.se+xml&CQL_FILTER=DWITHIN(LOCATION,POINT(-88909%20-111533),100,meters)

throws a sql exception from db oracle with a message ORA-13207: incorrect use of the [ INVALID UNITS] operator. The units of measure name in Oracle are in singular, so a SDO_WITHIN_DISTANCE use must be like, for example

... SDO_WITHIN_DISTANCE(location, mdsys.sdo_geometry(2001,27492,sdo_point_type(-88909,-111533,null),null,null), 'distance=1000 unit=meter') = 'TRUE' ...

the table with the units of measure
select *
from sdo_units_of_measure a
where lower(a.unit_of_meas_name) like '%meter%'
order by short_name;

the stacktrace in attachment.

Environment

None

Status

Assignee

Unassigned

Reporter

codehaus

Triage

None

Fix versions

Affects versions

2.0.2

Components

Priority

Low
Configure