[Geoserver-devel] [jira] Created: (GEOS-4488) ClassCastException when issue a resultType=hits query

ClassCastException when issue a resultType=hits query
-----------------------------------------------------

                 Key: GEOS-4488
                 URL: http://jira.codehaus.org/browse/GEOS-4488
             Project: GeoServer
          Issue Type: Bug
          Components: Application schema
            Reporter: Victor Tey
            Assignee: Victor Tey

SecuredFeatureCollection.features() is supposed to return a FeatureIterator but due to some policy setting on the server, it seem to return a Iterator instead. I was unable to replicate the issue on my local machine and it is machine setting specific.

2011-02-24 11:04:02,941 ERROR [geoserver.ows] -
java.lang.ClassCastException: org.geoserver.security.decorators.SecuredIterator cannot be cast to org.geotools.feature.FeatureIterator
        at org.geoserver.security.decorators.SecuredFeatureCollection.features(SecuredFeatureCollection.java:57)
        at org.geoserver.wfs.response.HitsOutputFormat.countFeature(HitsOutputFormat.java:102)
        at org.geoserver.wfs.response.HitsOutputFormat.write(HitsOutputFormat.java:85)
        at org.geoserver.ows.Dispatcher.response(Dispatcher.java:751)
        at org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:233)
        at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
        at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
        at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875)
        at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:809)
        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)

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