sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Desruisseaux (Jira)" <j...@apache.org>
Subject [jira] [Commented] (SIS-499) CommonCRS.WGS84.geographic() fails to initialize with JDK 11.0.8
Date Sat, 15 Aug 2020 11:32:00 GMT

    [ https://issues.apache.org/jira/browse/SIS-499?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17178233#comment-17178233
] 

Martin Desruisseaux commented on SIS-499:
-----------------------------------------

I have attached a {{Test.zip}} file invoking {{CommonCRS.WGS84.geographic()}}, {{CommonCRS.WGS84.universal(0,
0)}} and {{CRS.findOperation(…)}}. I could not reproduce the problem with this test on JDK
8, 11 and 14. However could it be because the following block is missing in the {{pomFailure.xml}}
file previously attached?
{code:xml}
  <profiles>
    <profile>
      <id>JDK9</id>
      <activation>
        <jdk>[9,)</jdk>
      </activation>
      <dependencies>
        <dependency>
          <groupId>org.glassfish.jaxb</groupId>
          <artifactId>jaxb-runtime</artifactId>
          <version>${jaxb.version}</version>
        </dependency>
      </dependencies>
    </profile>
  </profiles>
{code}
This issue is not specific to Apache SIS. It affects all software which were using the JAXB
implementation bundled in Java 8. That JAXB has been removed in later JDK versions.

If the issue is not caused by JAXB, then we would need to investigate if there is some unexpected
interactions with other dependencies declared in the {{pomFailure.xml}} file ({{org.springframework}},
{{org.projectlombok}}, _etc_).

> CommonCRS.WGS84.geographic() fails to initialize with JDK 11.0.8
> ----------------------------------------------------------------
>
>                 Key: SIS-499
>                 URL: https://issues.apache.org/jira/browse/SIS-499
>             Project: Spatial Information Systems
>          Issue Type: Bug
>          Components: Build process
>    Affects Versions: 1.0
>            Reporter: Roland
>            Assignee: Martin Desruisseaux
>            Priority: Major
>         Attachments: Test.zip, pom.Failure.xml
>
>
> We have in the constructor of a class the following code:
> {{CoordinateReferenceSystem targetCRS = CommonCRS.WGS84.geographic();}}
> When we run the Maven build with Java 1.8.0_252 the build succeeds. Running with OpenJDK
11.0.8 it fails with
> java.util.ServiceConfigurationError: org.opengis.referencing.datum.DatumFactory: org.apache.sis.referencing.factory.GeodeticObjectFactory
Unable to get public no-arg constructor
>  at java.base/java.util.ServiceLoader.fail(ServiceLoader.java:581)
>  at java.base/java.util.ServiceLoader.getConstructor(ServiceLoader.java:672)
>  at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNextService(ServiceLoader.java:1232)
>  at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNext(ServiceLoader.java:1264)
>  at java.base/java.util.ServiceLoader$2.hasNext(ServiceLoader.java:1299)
>  at java.base/java.util.ServiceLoader$3.hasNext(ServiceLoader.java:1384)
>  at org.apache.sis.internal.system.DefaultFactories.forClass(DefaultFactories.java:94)
>  at org.apache.sis.internal.system.DefaultFactories.forBuildin(DefaultFactories.java:136)
>  at org.apache.sis.referencing.factory.sql.EPSGFactory.factory(EPSGFactory.java:291)
>  at org.apache.sis.referencing.factory.sql.EPSGFactory.<init>(EPSGFactory.java:278)
>  at org.apache.sis.referencing.AuthorityFactories.EPSG(AuthorityFactories.java:122)
>  at org.apache.sis.referencing.CommonCRS.factory(CommonCRS.java:1815)
>  at org.apache.sis.referencing.CommonCRS.geographic(CommonCRS.java:635)
>  at at.weberhofer.webcommons_geo.converter.PointConverter.<init>(PointConverter.java:39)



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Mime
View raw message