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>();
                        

Anybody seen this before?

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

Andreas


-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to