[Geoserver-devel] [jira] Created: (GEOS-1231) Cannot insert time values in WFS 1.0

Cannot insert time values in WFS 1.0
------------------------------------

                 Key: GEOS-1231
                 URL: http://jira.codehaus.org/browse/GEOS-1231
             Project: GeoServer
          Issue Type: Bug
          Components: WFS
    Affects Versions: 1.6.0-beta2
            Reporter: Andrea Aime
            Assignee: Justin Deoliveira
             Fix For: 1.6.0-rc1

In WFS 1.0, once GEOS-1228 is fixed (I have already altered the binding on my pc, just not committed) there are still issues because of the mismatch between the temporal attribute type class (java.sql.Timestamp) and the class emitted by the parser (a GregorianCalendar I think).

The exception is:

{code}
Caused by: java.lang.RuntimeException: IllegalAttribute: java.sql.Timestamp , but got java.util.GregorianCalendar
  at org.geoserver.feature.RetypingFeatureCollection$RetypingIterator.next(RetypingFeatureCollection.java:91)
  at org.geotools.data.jdbc.JDBCFeatureStore.addFeatures(JDBCFeatureStore.java:351)
  ... 63 more
Caused by: IllegalAttribute: java.sql.Timestamp , but got java.util.GregorianCalendar
  at org.geotools.feature.DefaultFeature.setAttribute(DefaultFeature.java:229)
  at org.geotools.feature.DefaultFeature.setAttributes(DefaultFeature.java:270)
  at org.geotools.feature.DefaultFeature.<init>(DefaultFeature.java:98)
  at org.geotools.feature.DefaultFeatureType.create(DefaultFeatureType.java:169)
  at org.geotools.feature.DefaultFeatureType.create(DefaultFeatureType.java:152)
  at org.geoserver.feature.RetypingFeatureCollection.retype(RetypingFeatureCollection.java:71)
  at org.geoserver.feature.RetypingFeatureCollection$RetypingIterator.next(RetypingFeatureCollection.java:89)
  ... 64 more
Caused by: java.lang.IllegalArgumentException: java.util.Date is not an acceptable class for dt as it is not assignable from class java.sql.Timestamp
  at org.geotools.feature.DefaultAttributeType.validate(DefaultAttributeType.java:396)
  at org.geotools.feature.DefaultFeature.setAttribute(DefaultFeature.java:226)
  ... 70 more
{code}

I think this is linked to a gt2 issue I'm attaching, but not sure since I haven't investigated much.

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