OPTIMIZER_FEATURES_ENABLE('8.1.7') in Geotools jdbc datastore

Description

We use Geoserver and Oracle 11.2.0.1 64 bit, with spatial extension. We have a view on a table on another schema (access with a synonymous).
The layer associated to the view works, but the layer preview catchs an error when the user clicks on a feature. The error is ORA-13226:"interface not supported without a spatial index", but this error occurs only when the user clicks on a feature in the layer preview.
We have debug the oracle calls and we notice that the query that generates the error is

SELECT COUNT ( * ) AS gt_result_
FROM (SELECT *
FROM (SELECT /*+ ALL_ROWS OPTIMIZER_FEATURES_ENABLE('8.1.7') */
*
FROM XNOTAM.V_AIRSPACE
WHERE SDO_RELATE (GEOM,
sdo_geometry(2003,4326,,sdo_elem_info_array(1,1003,1),sdo_ordinate_array(10,40,15,45)),
'mask=anyinteract querytype=WINDOW') =
'TRUE')
WHERE ROWNUM <= 50) gt_limited_;

Note that the same query generates the same error if it's made into sqlplus.
The problem is that in this version (geoserver 2.1.0 with gt-jdbc.jar, ver. 2.7.1) the query has done with the optimizer hint /*+ ALL_ROWS OPTIMIZER_FEATURES_ENABLE('8.1.7') */ and it seems not working on 11g version. We have found this statement into org.geotools.jdbc.JDBCDataStore.java ver. 2.7.1. The previos version doesn't contain this hint (and works).

Environment

None

Status

Assignee

Unassigned

Reporter

codehaus

Triage

None

Fix versions

None

Affects versions

2.1.0

Components

Priority

Medium
Configure