On Fri, Sep 10, 2010 at 4:42 PM, Roman Isitua <[email protected]> wrote:
>
> Hi,
> Here's the geoserver log. is this configuration wrong ? How can I correct it 
> ? My intention is to get gml2 from geoserver. How can I correct it in 
> geoserver ?

The error below has nothing to do with GeoServer, at least not directly.
> java.util.NoSuchElementException: Could not aquire 
> feature:java.io.IOException: java.net.UnknownHostException: www.openplans.org
>         at 
> org.geotools.data.store.NoContentIterator.next(NoContentIterator.java:56) 
> ~[gt-main-2.6.3.jar:na]
>         at 
> org.geotools.data.store.NoContentIterator.next(NoContentIterator.java:41) 
> ~[gt-main-2.6.3.jar:na]

The NoContentIterator is the special iterator returned when there are
no results to read,
or when an exception is throw (why that is, I have no idea, the call
is in DataFeatureCollection.openIterator() and
I don't understand why it's designed that way)
At line 56 it's preparing an exception object that will be thrown in
case you call next() regardless...
Now, the code is setup in a way that makes it hard to debug the
original exception...

Jody, do you konw why in the world do we have this code:

    protected Iterator<SimpleFeature> openIterator() throws IOException
    {           
        try {
            FeatureWriter writer = writer();
            if(writer != null) {
                return new FeatureWriterIterator( writer() );
            }
        } catch (IOException badWriter) {
            return new NoContentIterator( badWriter );
        } catch( UnsupportedOperationException readOnly ){
        }

        try {
            return new FeatureReaderIterator( reader() );
        } catch (IOException e) {
            return new NoContentIterator( e );
        }
    }

If the code is not able to get a writer for the collection iteration
it should simply try to get
a reader instead no? Regardless of the exception

Cheers
Andrea

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to