Closed heidivanparys closed 6 years ago
Thank you for reporting.
As the specification states that the srsName must be encoded via HTTP-URI or OGC URN, the current behaviour of the test suite is correct. Do you agree?
I agree that a single, failing assertion is easier to understand and improves handling of the test suite for users. However, the code changes for this enhancement are quite complex. So, we have to evaluate a concept for implementation first.
Yes I agree that the validation should not pass as the srsName must be encoded via HTTP-URI or OGC URN.
This issue is indeed about user-friendliness, as I, as a user, prefer to see the failing tests in the "detailed test report" instead of in the log file/stacktrace.
I am not able to reproduce this issue. I am getting following error:
Jul 26, 2018 2:06:00 PM org.geotoolkit.factory.FactoryRegistry scanForPlugins
WARNING: CanΓÇÖt load a service for category ΓÇ£CRSAuthorityFactoryΓÇ¥. Cause is ΓÇ£ServiceConfigurationError: org.opengis.referencing.crs.CRSAuthorityFactory: Provider org.geotools.referencing.factory.epsg.DefaultFactory could not be instantiatedΓÇ¥.
java.util.ServiceConfigurationError: org.opengis.referencing.crs.CRSAuthorityFactory: Provider org.geotools.referencing.factory.epsg.DefaultFactory could not be instantiated
at java.util.ServiceLoader.fail(ServiceLoader.java:232)
at java.util.ServiceLoader.access$100(ServiceLoader.java:185)
at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:384)
at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404)
at java.util.ServiceLoader$1.next(ServiceLoader.java:480)
at org.geotoolkit.factory.FactoryRegistry.register(FactoryRegistry.java:882)
at org.geotoolkit.factory.FactoryRegistry.scanForPlugins(FactoryRegistry.java:800)
at org.geotoolkit.factory.FactoryRegistry.scanForPluginsIfNeeded(FactoryRegistry.java:850)
at org.geotoolkit.factory.FactoryRegistry.getServiceProviders(FactoryRegistry.java:241)
at org.geotoolkit.factory.FactoryFinder.getFactories(FactoryFinder.java:223)
at org.geotoolkit.factory.AuthorityFactoryFinder.getCRSAuthorityFactories(AuthorityFactoryFinder.java:262)
at org.geotoolkit.referencing.DefaultAuthorityFactory.create(DefaultAuthorityFactory.java:111)
at org.geotoolkit.referencing.CRS.getAuthorityFactory(CRS.java:227)
at org.geotoolkit.referencing.CRS.decode(CRS.java:434)
at org.opengis.cite.iso19142.FeatureTypeInfo.setSpatialExtent(FeatureTypeInfo.java:142)
at org.opengis.cite.iso19142.util.ServiceMetadataUtils.extractFeatureTypeInfo(ServiceMetadataUtils.java:209)
at org.opengis.cite.iso19142.SuiteFixtureListener.processWfsParameter(SuiteFixtureListener.java:95)
at org.opengis.cite.iso19142.SuiteFixtureListener.onStart(SuiteFixtureListener.java:47)
at org.testng.SuiteRunner.invokeListeners(SuiteRunner.java:208)
at org.testng.SuiteRunner.run(SuiteRunner.java:266)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1244)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
at org.testng.TestNG.run(TestNG.java:1064)
at com.occamlab.te.spi.executors.testng.TestNGExecutor.execute(TestNGExecutor.java:130)
at org.opengis.cite.iso19142.TestNGController.doTestRun(TestNGController.java:141)
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)
at net.sf.saxon.functions.ExtensionFunctionCall.invokeMethod(ExtensionFunctionCall.java:533)
at net.sf.saxon.functions.ExtensionFunctionCall.call(ExtensionFunctionCall.java:256)
at net.sf.saxon.functions.ExtensionFunctionCall.iterate(ExtensionFunctionCall.java:147)
at net.sf.saxon.instruct.CopyOf.processLeavingTail(CopyOf.java:292)
at net.sf.saxon.instruct.Block.processLeavingTail(Block.java:409)
at net.sf.saxon.instruct.Instruction.process(Instruction.java:94)
at net.sf.saxon.expr.LetExpression.process(LetExpression.java:380)
at net.sf.saxon.instruct.ForEach.processLeavingTail(ForEach.java:300)
at net.sf.saxon.instruct.Block.processLeavingTail(Block.java:409)
at net.sf.saxon.instruct.Template.applyLeavingTail(Template.java:175)
at net.sf.saxon.instruct.ApplyTemplates.applyTemplates(ApplyTemplates.java:343)
at net.sf.saxon.Controller.transformDocument(Controller.java:1736)
at net.sf.saxon.Controller.transform(Controller.java:1560)
at net.sf.saxon.s9api.XsltTransformer.transform(XsltTransformer.java:190)
at com.occamlab.te.TECore.executeTemplate(TECore.java:600)
at com.occamlab.te.TECore.executeXSLFunction(TECore.java:1141)
at com.occamlab.te.TECore.callFunction(TECore.java:1173)
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)
at net.sf.saxon.functions.ExtensionFunctionCall.invokeMethod(ExtensionFunctionCall.java:533)
at net.sf.saxon.functions.ExtensionFunctionCall.call(ExtensionFunctionCall.java:256)
at net.sf.saxon.functions.ExtensionFunctionCall.iterate(ExtensionFunctionCall.java:147)
at net.sf.saxon.expr.Expression.evaluateItem(Expression.java:352)
at net.sf.saxon.expr.Expression.process(Expression.java:461)
at net.sf.saxon.instruct.DocumentInstr.evaluateItem(DocumentInstr.java:282)
at net.sf.saxon.expr.ExpressionTool.evaluate(ExpressionTool.java:295)
at net.sf.saxon.expr.LetExpression.eval(LetExpression.java:341)
at net.sf.saxon.expr.LetExpression.processLeavingTail(LetExpression.java:542)
at net.sf.saxon.instruct.Block.processLeavingTail(Block.java:409)
at net.sf.saxon.expr.LetExpression.processLeavingTail(LetExpression.java:551)
at net.sf.saxon.instruct.Block.processLeavingTail(Block.java:409)
at net.sf.saxon.expr.LetExpression.processLeavingTail(LetExpression.java:551)
at net.sf.saxon.instruct.Block.processLeavingTail(Block.java:409)
at net.sf.saxon.expr.LetExpression.processLeavingTail(LetExpression.java:551)
at net.sf.saxon.instruct.Block.processLeavingTail(Block.java:409)
at net.sf.saxon.instruct.Instruction.process(Instruction.java:94)
at net.sf.saxon.expr.LetExpression.process(LetExpression.java:380)
at net.sf.saxon.instruct.ForEach.processLeavingTail(ForEach.java:300)
at net.sf.saxon.instruct.Template.applyLeavingTail(Template.java:175)
at net.sf.saxon.instruct.ApplyTemplates.applyTemplates(ApplyTemplates.java:343)
at net.sf.saxon.Controller.transformDocument(Controller.java:1736)
at net.sf.saxon.Controller.transform(Controller.java:1560)
at net.sf.saxon.s9api.XsltTransformer.transform(XsltTransformer.java:190)
at com.occamlab.te.TECore.executeTemplate(TECore.java:600)
at com.occamlab.te.TECore.executeTest(TECore.java:811)
at com.occamlab.te.TECore.execute_test(TECore.java:419)
at com.occamlab.te.TECore.execute_suite(TECore.java:467)
at com.occamlab.te.TECore.execute(TECore.java:296)
at com.occamlab.te.TECore.run(TECore.java:2403)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.ClassCastException: org.geotoolkit.referencing.operation.DefaultMathTransformFactory cannot be cast to org.opengis.referencing.Factory
at org.geotools.referencing.ReferencingFactoryFinder.getFactory(ReferencingFactoryFinder.java:197)
at org.geotools.referencing.ReferencingFactoryFinder.getMathTransformFactory(ReferencingFactoryFinder.java:520)
at org.geotools.referencing.factory.ReferencingFactoryContainer.getMathTransformFactory(ReferencingFactoryContainer.java:275)
at org.geotools.referencing.factory.ReferencingFactoryContainer.initialize(ReferencingFactoryContainer.java:182)
at org.geotools.referencing.factory.ReferencingFactoryContainer.getImplementationHints(ReferencingFactoryContainer.java:207)
at org.geotools.factory.FactoryRegistry.usesAcceptableHints(FactoryRegistry.java:552)
at org.geotools.factory.FactoryRegistry.isAcceptable(FactoryRegistry.java:506)
at org.geotools.factory.FactoryRegistry.getServiceImplementation(FactoryRegistry.java:437)
at org.geotools.factory.FactoryRegistry.getServiceProvider(FactoryRegistry.java:365)
at org.geotools.factory.FactoryCreator.getServiceProvider(FactoryCreator.java:145)
at org.geotools.referencing.factory.ReferencingFactoryContainer.instance(ReferencingFactoryContainer.java:172)
at org.geotools.referencing.factory.epsg.ThreadedEpsgFactory.<init>(ThreadedEpsgFactory.java:195)
at org.geotools.referencing.factory.epsg.ThreadedEpsgFactory.<init>(ThreadedEpsgFactory.java:157)
at org.geotools.referencing.factory.epsg.ThreadedEpsgFactory.<init>(ThreadedEpsgFactory.java:150)
at org.geotools.referencing.factory.epsg.DefaultFactory.<init>(DefaultFactory.java:39)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at java.lang.Class.newInstance(Class.java:442)
at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:380)
... 80 more
Jul 26, 2018 2:06:00 PM org.geotoolkit.factory.FactoryRegistry scanForPlugins
WARNING: CanΓÇÖt load a service for category ΓÇ£CRSAuthorityFactoryΓÇ¥. Cause is ΓÇ£ServiceConfigurationError: org.opengis.referencing.crs.CRSAuthorityFactory: Provider org.geotools.referencing.factory.epsg.FactoryUsingWKT could not be instantiatedΓÇ¥.
java.util.ServiceConfigurationError: org.opengis.referencing.crs.CRSAuthorityFactory: Provider org.geotools.referencing.factory.epsg.FactoryUsingWKT could not be instantiated
at java.util.ServiceLoader.fail(ServiceLoader.java:232)
at java.util.ServiceLoader.access$100(ServiceLoader.java:185)
at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:384)
at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404)
at java.util.ServiceLoader$1.next(ServiceLoader.java:480)
at org.geotoolkit.factory.FactoryRegistry.register(FactoryRegistry.java:882)
at org.geotoolkit.factory.FactoryRegistry.scanForPlugins(FactoryRegistry.java:800)
at org.geotoolkit.factory.FactoryRegistry.scanForPluginsIfNeeded(FactoryRegistry.java:850)
at org.geotoolkit.factory.FactoryRegistry.getServiceProviders(FactoryRegistry.java:241)
at org.geotoolkit.factory.FactoryFinder.getFactories(FactoryFinder.java:223)
@keshav-nangare How did you test? I'm sure I've seen the described failure "Invalid CRS reference" too.
I have tested through the teamengine webapp on Ubuntu environment.
Here is the log file: catalina.txt
@heidivanparys
Can you please provide service to reproduce this issue?
I have tested with the following services but not able to reproduce this issue.
[1] http://cite.deegree.org/deegree-webservices-3.4-RC3/services/wfs200?service=WFS&request=GetCapabilities [2] https://services.interactive-instruments.de/ogc-reference/simple/wfs?request=getcapabilities&service=wfs [3] https://wfst.axl.aero/AxlRest/wfs?service=WFS&version=2.0.0&request=GetCapabilities
The issue can reproduced by testing this file (after modifying the extension from txt to xml): capabilities_simple_epsg.txt
When having srsNames such as EPSG:25832 (thus, not an HTTP-URI and not in the OGC URN scheme) in the GetCapabilities of a WFS, the WFS 2.0 (ISO 19142:2010) Conformance Test Suite test suite fails with a stacktrace (see log file ).
Would it be possible, and wouldn't it be cleaner, to make an explicit assertion regarding the format of the name of the spatial reference system, and skipping the tests that cannot continue because of this? At this point, the GetCapabilities hasn't even been XML schema validated as far as I can see.