opengeospatial / ets-gpkg12-nsg

Other
2 stars 5 forks source link

N S G_ CRSdefinitions Test - java.lang.NoClassDefFoundError: org/geotools/util/UnsupportedImplementationException #12

Closed chuck1987 closed 6 years ago

chuck1987 commented 6 years ago

Attached is a tiled geopackage with a 4326 SRS. The definition used is :+1:

GEOGCS["WGS84",DATUM["WGS_1984",SPHEROID["WGS84",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433]]

I am receiving the error in the title, but I am fairly confident the definition is correct. When I run the code locally using my own geotools sources the definition is parsed correctly and can be used. When running it through the test suite I get this issue :

N S G_ CRSdefinitions Test - java.lang.NoClassDefFoundError: org/geotools/util/UnsupportedImplementationException

This would appear to be an issue with the test suite. Attached is the geopackage I used for testing.

BlackMarble-NSG2.1.gpkg.zip

dstenger commented 6 years ago

Thank you for reporting. What environment did you use for testing?

chuck1987 commented 6 years ago

This was using the OGC Validation Site :

http://cite.opengeospatial.org/te2/

On 18-04-13 07:38 AM, dstenger wrote:

Thank you for reporting. What environment did you use for testing?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/opengeospatial/ets-gpkg12-nsg/issues/12#issuecomment-381089913, or mute the thread https://github.com/notifications/unsubscribe-auth/AjbMV8XIicty5IrqLBQ_1uMyiofg6WYWks5toHj_gaJpZM4TR_XZ.

dstenger commented 6 years ago

When test is executed with Docker environment [1] following reason of failure:

java.lang.AssertionError: The gpkg_spatial_ref_sys table contains invalid CRS defintions values for IDs 4326:GEOGCS<br><br>["WGS84",DATUM<br><br>["WGS_1984",SPHEROID<br><br>["WGS84",6378137,298.257223563]],PRIMEM<br><br>["Greenwich",0],UNIT<br><br>["degree",0.0174532925199433]]

Thus, the error on beta site is most likely related to a dependency problem with other test suites. However, in this case, the error message can just not displayed correctly as an exception type is missing.

[1] https://github.com/opengeospatial/teamengine-docker/tree/master/teamengine-ets-gpkg12-nsg

chuck1987 commented 6 years ago

My problem is that this value : GEOGCS["WGS84",DATUM["WGS_1984",SPHEROID["WGS84",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433]]

should be a valid CRS definition for EPSG:4326.

lgoltz commented 6 years ago

The following failure is logged multiple times:

GEOGCS["WGS84",DATUM["WGS_1984",SPHEROID["WGS84",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433]]
GEOGCS["WGS84",DATUM["WGS_1984",SPHEROID["WGS84",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433]]
May 09, 2018 11:15:17 AM org.geotools.referencing.factory.epsg.DirectEpsgFactory getAuthority
WARNING: SQLSyntaxErrorException: Table/View 'EPSG_VERSIONHISTORY' does not exist.
java.sql.SQLSyntaxErrorException: Table/View 'EPSG_VERSIONHISTORY' does not exist.
    at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)
    at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
    at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown Source)
    at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown Source)
    at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source)
    at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown Source)
    at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
    at org.apache.derby.impl.jdbc.EmbedStatement.executeQuery(Unknown Source)
    at org.apache.tomcat.dbcp.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208)
    at org.apache.tomcat.dbcp.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208)
    at org.geotools.referencing.factory.epsg.DirectEpsgFactory.getAuthority(DirectEpsgFactory.java:542)
    at org.geotools.referencing.factory.epsg.DirectEpsgFactory.getImplementationHints(DirectEpsgFactory.java:620)
    at org.geotools.factory.FactoryRegistry.usesAcceptableHints(FactoryRegistry.java:552)
    at org.geotools.factory.FactoryRegistry.usesAcceptableHints(FactoryRegistry.java:619)
    at org.geotools.factory.FactoryRegistry.isAcceptable(FactoryRegistry.java:506)
    at org.geotools.factory.FactoryRegistry$1.filter(FactoryRegistry.java:192)
    at javax.imageio.spi.FilterIterator.advance(ServiceRegistry.java:821)
    at javax.imageio.spi.FilterIterator.<init>(ServiceRegistry.java:815)
    at javax.imageio.spi.ServiceRegistry.getServiceProviders(ServiceRegistry.java:516)
    at org.geotools.factory.FactoryRegistry.getServiceProviders(FactoryRegistry.java:197)
    at org.geotools.referencing.ReferencingFactoryFinder.getFactories(ReferencingFactoryFinder.java:180)
    at org.geotools.referencing.ReferencingFactoryFinder.getCRSAuthorityFactories(ReferencingFactoryFinder.java:455)
    at org.geotools.referencing.DefaultAuthorityFactory.getBackingFactory(DefaultAuthorityFactory.java:89)
    at org.geotools.referencing.DefaultAuthorityFactory.<init>(DefaultAuthorityFactory.java:69)
    at org.geotools.referencing.CRS.getAuthorityFactory(CRS.java:263)
    at org.geotools.referencing.CRS.lookupIdentifier(CRS.java:1053)
    at org.opengis.cite.gpkg12.nsg.core.NSG_SpatialReferenceSystemsTests.NSG_CRSdefinitionsTest(NSG_SpatialReferenceSystemsTests.java:293)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)

But the failure causing the exception seems to be: Table/View 'EPSG_ELLIPSOID' does not exist.

dstenger commented 6 years ago

Beta environment

Test fails with java.lang.NoClassDefFoundError: org/geotools/factory/Hints$Key. This should be a result of dependency problems with other test suites.

Docker environment

Behaviour documented in https://github.com/opengeospatial/ets-gpkg12-nsg/issues/12#issuecomment-383029740 is still existing.

Further analysis

This test also fails when using other test data (e.g. [1]) and produces exactly the same message as documented in section Docker environment. Thus, the implementation of the test must be reviewed.

[1] www.geopackage.org/data/gdal_sample_v1.2_no_extensions.gpkg

lgoltz commented 6 years ago

Scope of artifact gt-epsg-hsql was changed, the dependency is now included in the deps artifact of the test suite and the test does not fail any longer.

The warning documented in https://github.com/opengeospatial/ets-gpkg12-nsg/issues/12#issuecomment-383029740 still exists.