Hi
Sorry Thought I had included the geoserver version information at the
bottom of the original email
Gavin
Build Information
- Version 2.2-SNAPSHOT
- Subversion Revision 17075
- Build Date 14-May-2012 19:13
- GeoTools Version 8-SNAPSHOT (rev 38723
The full request is
unitPicker = new OpenLayers.Control.WMSGetFeatureInfo({ url: '
http://geology.data.vic.gov.au/services/mapping/ows', layerUrls: ["
http://geology.data.vic.gov.au/services/mapping/ows"], title: 'Identify
features by clicking', queryVisible: true, layers: [unitLayer], } );
unitPicker.infoFormat =
'application/vnd.ogc.gml';unitPicker.events.register("getfeatureinfo",
this, pickUnitid);
If I use infoFormat = "text/plain" it all works
If I use any xml based format for infoFormat it errors
This works fine on another instance
Version 2.1.1
Subversion Revision 16080
Build Date 23-Jun-2011 10:45
GeoTools Version 2.7.2 (rev 37473)
On 19 June 2012 15:56, Andrea Aime <andrea.a...@geo-solutions.it> wrote:
> On Tue, Jun 19, 2012 at 1:13 AM, Gavin <ga...@gnomeit.com> wrote:
>
>> Hi
>>
>> When I do a WMSGetFeatureInfo request from open layers to geoserver
>> using
>> unitPicker.infoFormat = 'application/vnd.ogc.gml';
>>
>> Geoserver returns a <ServiceException>
>> java.lang.ClassCastException:
>> org.geoserver.wms.featureinfo.FeatureCollectionDecorator cannot be cast to
>> org.geotools.data.simple.SimpleFeatureCollection
>>
>>
> You should provide more information about your case. Just to get started:
> * GeoServer version
> * are you querying a app-schema layer?
> * the GetFeatureInfo URL used (you should be able to grab it using firebug
> or other web dev tools)
>
> Cheers
> Andrea
>
>
> --
> Ing. Andrea Aime
> GeoSolutions S.A.S.
> Tech lead
>
> Via Poggio alle Viti 1187
> 55054 Massarosa (LU)
> Italy
>
> phone: +39 0584 962313
> fax: +39 0584 962313
> mob: +39 339 8844549
>
> http://www.geo-solutions.it
> http://geo-solutions.blogspot.com/
> http://www.youtube.com/user/GeoSolutionsIT
> http://www.linkedin.com/in/andreaaime
> http://twitter.com/geowolf
>
>
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users