Uploaded image for project: 'Spatial Information Systems'
  1. Spatial Information Systems
  2. SIS-499

CommonCRS.WGS84.geographic() fails to initialize with JDK 11.0.8

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Bug
    • 1.0
    • None
    • Build process
    • None

    Description

      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)

      Attachments

        1. stacktrace_Maven.txt
          9 kB
          Roland
        2. stacktrace_Eclipse.txt
          9 kB
          Roland
        3. Test.zip
          3 kB
          Martin Desruisseaux
        4. pom.Failure.xml
          2 kB
          Roland

        Activity

          People

            desruisseaux Martin Desruisseaux
            Roland4745 Roland
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: