From: Ian S. <Ian...@ar...> - 2004-02-26 22:16:34
|
On Wednesday 25 February 2004 10:50 am, you wrote: > Could you send me the shape file? I can forward it on to the maintainer > of the shapefile datastore. It's not a known bug, as far as I know. If > you can get a better stack trace that would also be nice. But if you just > get the shapefile to me that'd probably be enough. Chris, Thanks for notfying me of this, but I feel frustrated and abused being the shapefile owner. This problem is not related to shapefile and it even says it in the stack trace. Shapefile seems to be the most common source of problems, but I believe its because its the most widely deployed feature format. Heres the stack trace (minus the catalina parts): > > problem with FeatureResults: org.geotools.data.DataSourceException: Could > > not read feature at > > org.geotools.data.DefaultFeatureResults.getCount(DefaultFeatureResults.ja > >va: 215) at > > org.vfny.geoserver.responses.wfs.FeatureResponse.execute(FeatureResponse. > >jav a:271) at > > org.vfny.geoserver.responses.wfs.FeatureResponse.execute(FeatureResponse. > >jav a:166) at > > org.vfny.geoserver.servlets.AbstractService.doService(AbstractService.jav > >a:2 80) at > > org.vfny.geoserver.servlets.AbstractService.doGet(AbstractService.java:19 Heres the real problem from the nested exception: > >Caused by: > > org.geotools.feature.IllegalAttributeException: Do not know how to deep > > copy java.util.Date at > > org.geotools.feature.DefaultAttributeType.duplicate(DefaultAttributeType. > >jav a:221) at > > org.geotools.data.ReTypeFeatureReader.next(ReTypeFeatureReader.java:117) > > at > > org.geotools.data.DefaultFeatureResults.getCount(DefaultFeatureResults.ja > >va: 208) ... 35 more Looking at DefaultFeatureType.duplicate, it is clear that Date is not handled. First off, what query was issued to require a ReTypeFeatureReader? This type of thing should be logged by the exception handling mechansim. I was unable to duplicate this problem because I could not make the reader use a ReTypeFeatureReader... I went ahead and added the conversion for Date to DefaultAttributeType and moved some of the logic out to the various subclasses for efficiency. I'll commit this as soon as my tests pass. Ian |