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/06/10 15:17:00 UTC

[jira] [Updated] (SIS-629) DateTimeParseException in EPSGDataAccess.getOptionalTemporal when iterating EPSG GeographicCRS codes

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

Martin Desruisseaux updated SIS-629:
------------------------------------
    Fix Version/s: 1.7

> DateTimeParseException in EPSGDataAccess.getOptionalTemporal when iterating EPSG GeographicCRS codes
> ----------------------------------------------------------------------------------------------------
>
>                 Key: SIS-629
>                 URL: https://issues.apache.org/jira/browse/SIS-629
>             Project: Spatial Information Systems
>          Issue Type: Bug
>    Affects Versions: 1.6
>         Environment:   - Apache SiS 1.6 (sis-referencing + sis-embedded-data, embedded EPSG 12.047)
>   - Apache Derby 10.15.2.0 (derby, derbytools, derbyshared)
>   - Java 11 (OpenJDK)
>   - Linux (RHEL 8)
>            Reporter: Corey Puffalt
>            Assignee: Martin Desruisseaux
>            Priority: Major
>             Fix For: 1.7
>
>
> After upgrading from SiS 1.4 to 1.6, code that iterates over all EPSG GeographicCRS authority codes and calls CRS.forCode(...) on each fails partway through with the stack trace below. The same code worked under 1.4:
>  
> {code:java}
>   org.apache.sis.referencing.factory.FactoryDataException: Text 'March2011' could not be parsed at index 0
>     at org.apache.sis.referencing.factory.sql.EPSGDataAccess.createDatum(EPSGDataAccess.java:2118)
>     at org.apache.sis.referencing.factory.AuthorityFactoryProxy$3.create(AuthorityFactoryProxy.java:235)
>     ...
>     at org.apache.sis.referencing.factory.MultiAuthoritiesFactory.createCoordinateReferenceSystem(MultiAuthoritiesFactory.java:948)
>     at org.apache.sis.referencing.CRS.forCode(CRS.java:296)
>   Caused by: java.time.format.DateTimeParseException: Text 'March2011' could not be parsed at index 0
>     at java.base/java.time.format.DateTimeFormatter.parseResolved0(DateTimeFormatter.java:2046)
>     at java.base/java.time.format.DateTimeFormatter.parseBest(DateTimeFormatter.java:1994)
>     at org.apache.sis.temporal.LenientDateFormat.parseBest(LenientDateFormat.java:123)
>     at org.apache.sis.referencing.factory.sql.EPSGDataAccess.getOptionalTemporal(EPSGDataAccess.java:1046)
>     at org.apache.sis.referencing.factory.sql.EPSGDataAccess.createDatum(EPSGDataAccess.java:2038)
> {code}
> Here's a simple reproducer:
>  
> {code:java}
> import org.apache.sis.referencing.CRS;
> import org.junit.jupiter.api.Test;
> import org.opengis.referencing.crs.GeographicCRS;
> public class IdentifyFailingDatumTest {
>   @Test
>   public void findFailingCode() throws Exception {
>     var factory = CRS.getAuthorityFactory("EPSG");
>     for (String code : factory.getAuthorityCodes(GeographicCRS.class)) {
>       try {
>         CRS.forCode("EPSG:" + code);
>       } catch (Throwable t) {
>         throw new AssertionError("EPSG:" + code + " failed", t);
>       }
>     }
>   }
> }
> {code}
>  
> FWIW the one it's tripping on is EPSG:10790 but there may well be others.
>  
>  



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