Class ArcSDEDataStore method getFeatureReader(String typeName, Query query) 
fired NullPointerException by use of Filter.ALL
---------------------------------------------------------------------------------------------------------------------------

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

  Components: arcsde  
    Versions: 2.2-RC2    
 Environment: ArcSDE 9.1 and Oracle 10g
    Reporter: Andreas Bartels
 Assigned to: Gabriel Roldán 
    Priority: Critical


    protected FeatureReader getFeatureReader(String typeName, Query query)
        throws IOException {
        ArcSDEQuery sdeQuery = null;
        FeatureReader reader = null;

        try {
            FeatureType schema = getSchema(typeName);

// if Filter.ALL.equals(query.getFilter()) the following clall return null;
            sdeQuery = ArcSDEQuery.createQuery(this, schema, query);
// so, this will fire a NullPointerExcetion            
            sdeQuery.execute();

please make the following change as workaround, until a ArcSDEFeatureReader is 
written.

            if (Filter.ALL.equals(query.getFilter())) {
              return new EmptyFeatureReader(schema);
            }
            sdeQuery = ArcSDEQuery.createQuery(this, schema, query);
            sdeQuery.execute();

or better

            sdeQuery = ArcSDEQuery.createQuery(this, schema, query);
            if (sdeQuery == null) {
              return new EmptyFeatureReader(schema);
            }
            sdeQuery.execute();

tschau

Andreas

-- 
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&kid0709&bid&3057&dat1642
_______________________________________________
Geotools-devel mailing list
Geotools-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to