You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@sis.apache.org by "Martin Desruisseaux (Jira)" <ji...@apache.org> on 2026/10/09 20:45:00 UTC

[jira] [Reopened] (SIS-632) NotSerializableException during CRS serialization

     [ https://issues.apache.org/jira/browse/SIS-632?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Desruisseaux reopened SIS-632:
-------------------------------------

> NotSerializableException during CRS serialization
> -------------------------------------------------
>
>                 Key: SIS-632
>                 URL: https://issues.apache.org/jira/browse/SIS-632
>             Project: Spatial Information Systems
>          Issue Type: Task
>          Components: Metadata, Referencing
>    Affects Versions: 1.4, 1.5, 1.6
>            Reporter: Martin Desruisseaux
>            Assignee: Martin Desruisseaux
>            Priority: Major
>             Fix For: 1.7
>
>
> The following test case throws {{java.io.NotSerializableException}}:
> {code:java}
> public class SerializationTest {
>     public static void main(String[] args) throws Exception {
>         CoordinateReferenceSystem crs = CRS.forCode("EPSG:3857");
>         var buffer = new ByteArrayOutputStream();
>         try (var out = new ObjectOutputStream(buffer)) {
>             out.writeObject(crs);
>         }
>     }
> }
> {code}
> This is caused by the {{org.apache.sis.metadata.sql}} module which creates non-serializable {{java.lang.reflect.Proxy}} (actually, the non-serializable object is the invocation handler).



--
This message was sent by Atlassian Jira
(v8.20.10#820010)