opengeospatial / ets-wcs11

Executable Test Suite for WCS 1.1.0
Other
0 stars 2 forks source link

Errors in tomcat log #41

Open lgoltz opened 5 years ago

lgoltz commented 5 years ago

Tested with https://onestop.cubewerx.com/cubewerx/cubeserv/cite_wcs?DATASTORE=Foundation&service=WCS&request=GetCapabilities&VERSION=1.1.1 on a local docker environment (TEAM Engine 5.3, 1.13-SNAPSHOT).

Several errors are reported in the tomcat log:

Fatal Error: Error in call to extension function {public org.w3c.dom.NodeList com.occamlab.te.TECore.request(org.w3c.dom.Document,java.lang.String) throws java.lang.Throwable}: Exception in extension function java.lang.reflect.InvocationTargetException; SystemID: file:/root/te_base/work/_root_te_base_scripts_wcs_1.1.1_ctl_/wcs/wcs$GetCoverage_RangeSubset_Repeated_Identifiers.test; Line#: 289; Column#: -1
Fatal Error: Error in call to extension function {public org.w3c.dom.NodeList com.occamlab.te.TECore.request(org.w3c.dom.Document,java.lang.String) throws java.lang.Throwable}: Exception in extension function java.lang.reflect.InvocationTargetException; SystemID: file:/root/te_base/work/_root_te_base_scripts_wcs_1.1.1_ctl_/wcs/wcs$GetCoverage_RangeSubset_Bogus_Identifier.test; Line#: 273; Column#: -1
Fatal Error: Error in call to extension function {public org.w3c.dom.NodeList com.occamlab.te.TECore.request(org.w3c.dom.Document,java.lang.String) throws java.lang.Throwable}: Exception in extension function java.lang.reflect.InvocationTargetException; SystemID: file:/root/te_base/work/_root_te_base_scripts_wcs_1.1.1_ctl_/wcs/wcs$GetCoverage_RangeSubset_Valid_With_Bogus_Identifiers.test; Line#: 286; Column#: -1
Fatal Error: Error in call to extension function {public org.w3c.dom.NodeList com.occamlab.te.TECore.request(org.w3c.dom.Document,java.lang.String) throws java.lang.Throwable}: Exception in extension function java.lang.reflect.InvocationTargetException; SystemID: file:/root/te_base/work/_root_te_base_scripts_wcs_1.1.1_ctl_/wcs/wcs$GetCoverage_RangeSubset_InterpolationMethod_Missing.test; Line#: 292; Column#: -1
Fatal Error: Error in call to extension function {public synchronized void com.occamlab.te.TECore.callTest(net.sf.saxon.expr.XPathContext,java.lang.String,java.lang.String,net.sf.saxon.om.NodeInfo,java.lang.String) throws java.lang.Exception}: Exception in extension function java.util.NoSuchElementException; SystemID: file:/root/te_base/work/_root_te_base_scripts_wcs_1.1.1_ctl_/wcs/wcs$GetCoverage-main.test; Line#: 4038; Column#: -1
Fatal Error: Error in call to extension function {public synchronized void com.occamlab.te.TECore.callTest(net.sf.saxon.expr.XPathContext,java.lang.String,java.lang.String,net.sf.saxon.om.NodeInfo,java.lang.String) throws java.lang.Exception}: Exception in extension function java.util.NoSuchElementException; SystemID: file:/root/te_base/work/_root_te_base_scripts_wcs_1.1.1_ctl_/wcs/wcs$Main.test; Line#: 128; Column#: -1
keshavnangare commented 5 years ago

@lgoltz

I am able to reproduce this issue on local environment if you can see the session/error_log/log.xml the XMLValidatingParser is failed to parse request resource.

The Test wcs:GetCoverage_RangeSubset_Repeated_Identifier is failed with the following error:

Failed to parse resource from https://onestop.cubewerx.com/cubewerx/cubeserv/cite_wcs?DATASTORE=Foundation&service=WCS&request=GetCoverage&version=1.1.1&identifier=etopo2&BoundingBox=-89.98333333333333,-179.9833333333333,89.98333333333333,179.9833333333333,urn:ogc:def:crs:EPSG::4326&RangeSubset=GEOMETRY,GEOMETRY&Format=image/tiff 
 Failed to parse input: sun.net.www.protocol.http.HttpURLConnection$HttpInputStream
    at com.occamlab.te.parsers.XMLValidatingParser.parse(XMLValidatingParser.java:227)

In similar way following tests were failed:

All above tests are expecting the owcExceptionReport but get the different response.

Here is the request URL: https://onestop.cubewerx.com/cubewerx/cubeserv/cite_wcs?DATASTORE=Foundation&&service=WCS&request=GetCoverage&version=1.1.1&identifier=etopo2&BoundingBox=-89.98333333333333,-179.9833333333333,89.98333333333333,179.9833333333333,urn:ogc:def:crs:EPSG::4326&RangeSubset=GEOMETRY,Bogus&Format=image/tiff

I think the issue is with the service not with ets so service should be fixed.

Here is the error log: log.txt

dstenger commented 5 years ago

@lgoltz Errors are expected. Do you see any improvements which can be done to improve logging? Otherwise, this issue can be closed.

lgoltz commented 5 years ago

The response is a multipart response with XML and an Image, expected is an ExceptionReport @keshav-nangare Can you check if the XMLValidatingParser can be replaced with an HTTPParser?

E.g.

<ctlp:HTTPParser>
  <ctlp:parse mime="text/xml">
    <ctlp:XMLValidatingParser ignoreErrors="false" ignoreWarnings="false">
      <ctlp:schemas>
        <ctlp:schema type="resource">xsd/ogc/ows/1.1.0/owsExceptionReport.xsd</ctlp:schema>
      </ctlp:schemas>
    </ctlp:XMLValidatingParser>
  </ctlp:parse>
</ctlp:HTTPParser>
keshavnangare commented 5 years ago

@lgoltz

<ctlp:HTTPParser>
    <ctlp:parse mime="text/xml">
         <ctlp:XMLValidatingParser ignoreErrors="false" ignoreWarnings="false">
             <ctlp:schemas>
                 <ctlp:schema type="resource">xsd/ogc/ows/1.1.0/owsExceptionReport.xsd</ctlp:schema>
                 </ctlp:schemas>
           </ctlp:XMLValidatingParser>
      </ctlp:parse>  
 </ctlp:HTTPParser>

I have updated the parser configuration to above in request and tested with the same service but still getting failed with the same error.

I have configured the parser with the below configuration then the test gets passed. I saw the response but it doesn't have exception report still the test getting passed.

<ctlp:HTTPParser>
     <ctlp:parse mime="text/xml"/>
      <ctlp:parse>
          <ctlp:NullParser/>
        </ctlp:parse>
  </ctlp:HTTPParser>

Test Request: wcs:GetCoverage_RangeSubset_Repeated_Identifier https://onestop.cubewerx.com/cubewerx/cubeserv/cite_wcs?DATASTORE=Foundation&service=WCS&request=GetCoverage&version=1.1.1&identifier=etopo2&BoundingBox=-89.98333333333333,-179.9833333333333,89.98333333333333,179.9833333333333,urn:ogc:def:crs:EPSG::4326&RangeSubset=GEOMETRY%2CGEOMETRY&Format=image/tiff

Response: Download

ghobona commented 4 years ago

@keshav-nangare

The service endpoint appears to have changed slightly to https://onestop.cubewerx.com/cubewerx/cubeserv/?DATASTORE=Foundation&service=WCS&request=GetCoverage&version=1.1.1&identifier=etopo2&BoundingBox=-89.98333333333333,-179.9833333333333,89.98333333333333,179.9833333333333,urn:ogc:def:crs:EPSG::4326&RangeSubset=GEOMETRY%2CGEOMETRY&Format=image/tiff

ghobona commented 4 years ago

Discussion between @keshav-nangare and @ghobona on 2020-07-15.

@keshav-nangare will check whether an if-else condition can be used to check whether the MIME type of the response is xml or a multipart.

keshavnangare commented 4 years ago

The following tests are fixed with the PR #63 :

  1. wcs:GetCoverage_RangeSubset_Repeated_Identifier
  2. wcs:GetCoverage_RangeSubset_Bogus_Identifier
  3. wcs:GetCoverage_RangeSubset_Valid_With_Bogus_Identifiers
  4. wcs:GetCoverage_RangeSubset_InterpolationMethod_Missing
dstenger commented 3 years ago

@keshav-nangare When testing with https://demo.cubewerx.com/cubewerx/cubeserv/cite_wcs111?DATASTORE=Foundation&SERVICE=WCS&REQUEST=GetCapabilities&VERSION=1.1.1 all 4 modified tests are failing. However, those tests were passed before (you can revert the two commits of the feature branch). Can you please check why the test result changed? You can also use following service for testing: https://demo.cubewerx.com/cubewerx/cubeserv/cite_wcs111?DATASTORE=Foundation&SERVICE=WCS&REQUEST=GetCapabilities&VERSION=1.1.1

keshavnangare commented 3 years ago

@dstenger

I have fixed the tests which were getting failed. Now some of the next tests are getting failed because the request's response is multipart and test using XMLValidatingParser as it's not supporting that response type. Should I update all the tests which are failing with above reason?

keshavnangare commented 3 years ago

@dstenger

I have updated the remaining tests having parser problems and tested changes on my machine successfully. Please find the changes in the same PR.

dstenger commented 2 years ago

Still, additional tests are failing when the pull request is tested with https://demo.cubewerx.com/cubewerx/cubeserv/cite_wcs111?DATASTORE=Foundation&SERVICE=WCS&REQUEST=GetCapabilities&VERSION=1.1.1. The result of the test suite should not be changed by the pull request.