Andrea Aime (
https://osgeo-org.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3Ae9469ffc-5e16-4c2b-b7b0-b9c46e912f9e
) *created* an issue
GeoServer (
https://osgeo-org.atlassian.net/browse/GEOS?atlOrigin=eyJpIjoiMTBhZTE3MGM3YzY4NDMwNjgxNmFkM2IzMTJjNzc0ZWUiLCJwIjoiaiJ9
) / Improvement (
https://osgeo-org.atlassian.net/browse/GEOS-10332?atlOrigin=eyJpIjoiMTBhZTE3MGM3YzY4NDMwNjgxNmFkM2IzMTJjNzc0ZWUiLCJwIjoiaiJ9
) GEOS-10332 (
https://osgeo-org.atlassian.net/browse/GEOS-10332?atlOrigin=eyJpIjoiMTBhZTE3MGM3YzY4NDMwNjgxNmFkM2IzMTJjNzc0ZWUiLCJwIjoiaiJ9
) GrowableInternationalStringConverter can cause random XStream conversion
failures (
https://osgeo-org.atlassian.net/browse/GEOS-10332?atlOrigin=eyJpIjoiMTBhZTE3MGM3YzY4NDMwNjgxNmFkM2IzMTJjNzc0ZWUiLCJwIjoiaiJ9
)
Issue Type: Improvement Assignee: Unassigned Created: 10/Dec/21 11:51 AM
Priority: Medium Reporter: Andrea Aime (
https://osgeo-org.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3Ae9469ffc-5e16-4c2b-b7b0-b9c46e912f9e
)
Trying to run importer-jdbc tests I've found the GrowableInternationaString
coverter being used to convert an exception (ImportTask has a field that's an
exception):
```
java.lang.ClassCastException: java.lang.Exception cannot be cast to
org.geotools.util.GrowableInternationalString
at
org.geoserver.config.util.XStreamPersister$GrowableInternationalStringConverter.doMarshal(XStreamPersister.java:2624)
at
com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.marshal(AbstractReflectionConverter.java:90)
at
com.thoughtworks.xstream.converters.extended.ThrowableConverter.marshal(ThrowableConverter.java:62)
at com.thoughtworks.xstream.core.TreeMarshaller.convert(TreeMarshaller.java:70)
at
com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
at
com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.marshallField(AbstractReflectionConverter.java:270)
at
com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter$2.writeField(AbstractReflectionConverter.java:174)
at
com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doMarshal(AbstractReflectionConverter.java:262)
at
com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.marshal(AbstractReflectionConverter.java:90)
at com.thoughtworks.xstream.core.TreeMarshaller.convert(TreeMarshaller.java:70)
at
com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
at
com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43)
at
com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.writeBareItem(AbstractCollectionConverter.java:94)
at
com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.writeItem(AbstractCollectionConverter.java:66)
at
com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.writeCompleteItem(AbstractCollectionConverter.java:81)
at
org.geoserver.config.util.XStreamPersister$ProxyCollectionConverter.writeCompleteItem(XStreamPersister.java:1376)
at
com.thoughtworks.xstream.converters.collections.CollectionConverter.marshal(CollectionConverter.java:74)
at com.thoughtworks.xstream.core.TreeMarshaller.convert(TreeMarshaller.java:70)
```
This happens because the converter has the class check in ``canConvert``
backwards, checks if the target class is a superclass of
GrowableInternationalString, and the ThrowableConverter, for some reason, may
search for a "converter of Object.class".
Does not always happen, seems to be related to a classpath lookup chance.
(
https://osgeo-org.atlassian.net/browse/GEOS-10332#add-comment?atlOrigin=eyJpIjoiMTBhZTE3MGM3YzY4NDMwNjgxNmFkM2IzMTJjNzc0ZWUiLCJwIjoiaiJ9
) Add Comment (
https://osgeo-org.atlassian.net/browse/GEOS-10332#add-comment?atlOrigin=eyJpIjoiMTBhZTE3MGM3YzY4NDMwNjgxNmFkM2IzMTJjNzc0ZWUiLCJwIjoiaiJ9
)
Get Jira notifications on your phone! Download the Jira Cloud app for Android (
https://play.google.com/store/apps/details?id=com.atlassian.android.jira.core&referrer=utm_source%3DNotificationLink%26utm_medium%3DEmail
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=EmailNotificationLink&mt=8
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100183-
sha1:f6eba4b )
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel