setMaxFeatures doesn't work on a WFSDataStore
---------------------------------------------

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

  Components: data wfs  
    Versions: 2.1.0    
 Environment: Windows XP Professional, SUN Java 1.5 update 04, Geoserver as 
WFS-Server, Postgresql as Database
    Reporter: Andreas Pakulat
 Assigned to: David Zwiers 


Hi,

I've got a problem here setting the maximum number of features to return from a 
WFS query. Geotools always has an ArrayIndexOutOfBounds exception as soon as I 
put the setMaxFeatures call into the following code:

WFSDataStore = wfsData= new 
WFSDataStore("http://localhost:10080/geoserver/wfs/GetCapabilities";);

DefaultQuery query = new DefaultQuery("kvla:str_geom");

FeatureType strassenName = wfsData.getSchema("kvla:str_geom");

AttributeType at = strassenName.getAttributeType( "str_name" );

FilterFactory ff = FilterFactory.createFilterFactory();

LikeFilter f = ff.createLikeFilter();
f.setValue( ff.createAttributeExpression( strassenName,
                    at.getName() ) );
f.setPattern( "*", "*", "?", "\\" );

query.setFilter( f );
//query.setMaxFeatures(31);
FeatureReader ftr;

ftr = wfsData.getFeatureReader( query, Transaction.AUTO_COMMIT );
            result = new Vector<Strasse>();

Geotools is 2.1.0 IIRC, geoserver is 1.3.x and the request executed from a 
browser is working fine.


-- 
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



_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to