FilterCapabilities conflict when simultaneously working with different 
DataStore types (caused by static field)
---------------------------------------------------------------------------------------------------------------

         Key: GEOT-848
         URL: http://jira.codehaus.org/browse/GEOT-848
     Project: GeoTools
        Type: Bug

  Components: main  
    Versions: 2.2-RC2    
    Reporter: Markus Gebhard
 Assigned to: James Macgill 
    Priority: Critical


Steps to reproduce the problem:
  - Open an Oracle datastore and read features using a GeometryFilter
  - Open an ArcSDE datastore and read features using a GeometryFilter
 - You will run into this exception:
Caused by: java.lang.RuntimeException: Subclasses must implement this method in 
order to handle geometries
        at org.geotools.filter.SQLEncoder.visit(SQLEncoder.java:585)
        at 
org.geotools.filter.GeometryFilterImpl.accept(GeometryFilterImpl.java:354)
        at org.geotools.filter.SQLEncoderSDE.encode(SQLEncoderSDE.java:123)
        at org.geotools.filter.SQLEncoder.encode(SQLEncoder.java:236)
        at 
org.geotools.data.arcsde.ArcSDEQuery$FilterSet.getSeSqlConstruct(ArcSDEQuery.java:958)
        at 
org.geotools.data.arcsde.ArcSDEQuery.createSeQueryForFetch(ArcSDEQuery.java:320)
        at org.geotools.data.arcsde.ArcSDEQuery.getSeQuery(ArcSDEQuery.java:271)
        at org.geotools.data.arcsde.ArcSDEQuery.execute(ArcSDEQuery.java:643)
        at 
org.geotools.data.arcsde.ArcSDEDataStore.getFeatureReader(ArcSDEDataStore.java:567)

The reason for this problem is the static field 'capabilities' in 
org.geotools.filter.SQLEncoder. By reading Oracle Spatial features, it is being 
filled with Oracle Spatial specific capabilities. When reading ArcSDE features 
afterwards, the field is already initialized and will not be changed. So 
reading ArcSDE features uses Oracle Spatail capabilities and fails.

Suggested fix:
  Make the field 'capabilities' in org.geotools.filter.SQLEncoder.non-static. 
So for each instance the correct capabilities will be used.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira



-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to