opengeospatial / ets-wfs20

Executable Test Suite for WFS 2.0
Other
9 stars 11 forks source link

Upgrade to TEAM Engine v5.5.2 fails #256

Closed dstenger closed 1 year ago

dstenger commented 1 year ago

Describe the bug I already created a branch with an update of the dependencies: https://github.com/opengeospatial/ets-wfs20/compare/upgradeToTeamEngine552

However, when building the repository via mvn clean install site docker:run -Pdocker,integration-tests, following error occurs during execution of integration tests:

[ERROR] <!doctype html><html lang="en"><head><title>HTTP Status 500 – Internal Server Error</title><style type="text/css">H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}</style></head><body><h1>HTTP Status 500 – Internal Server Error</h1><hr class="line" /><p><b>Type</b> Exception Report</p><p><b>Message</b> java.lang.NoClassDefFoundError: org/apache/xml/resolver/readers/CatalogReader</p><p><b>Description</b> The server encountered an unexpected condition that prevented it from fulfilling the request.</p><p><b>Exception</b> <pre>javax.servlet.ServletException: java.lang.NoClassDefFoundError: org/apache/xml/resolver/readers/CatalogReader
[ERROR]     com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:420)
[ERROR]     com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:558)
[ERROR]     com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:733)
[ERROR]     javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
[ERROR]     org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
[ERROR]     com.occamlab.te.realm.RestAuthenticationFilter.doFilter(RestAuthenticationFilter.java:72)
[ERROR] </pre></p><p><b>Root Cause</b> <pre>java.lang.NoClassDefFoundError: org/apache/xml/resolver/readers/CatalogReader
[ERROR]     org.opengis.cite.iso19142.util.ValidationUtils.createSchemaResolver(ValidationUtils.java:60)
[ERROR]     org.opengis.cite.iso19142.util.ValidationUtils.initCatalogResolver(ValidationUtils.java:38)
[ERROR]     org.opengis.cite.iso19142.util.ValidationUtils.&lt;clinit&gt;(ValidationUtils.java:33)
[ERROR]     org.opengis.cite.iso19142.SuiteFixtureListener.onStart(SuiteFixtureListener.java:47)
...
[ERROR] </pre></p><p><b>Root Cause</b> <pre>java.lang.ClassNotFoundException: org.apache.xml.resolver.readers.CatalogReader
[ERROR]     java.net.URLClassLoader.findClass(URLClassLoader.java:382)
[ERROR]     java.lang.ClassLoader.loadClass(ClassLoader.java:424)
[ERROR]     java.lang.ClassLoader.loadClass(ClassLoader.java:357)
[ERROR]     org.opengis.cite.iso19142.util.ValidationUtils.createSchemaResolver(ValidationUtils.java:60)
[ERROR]     org.opengis.cite.iso19142.util.ValidationUtils.initCatalogResolver(ValidationUtils.java:38)
[ERROR]     org.opengis.cite.iso19142.util.ValidationUtils.&lt;clinit&gt;(ValidationUtils.java:33)
[ERROR]     org.opengis.cite.iso19142.SuiteFixtureListener.onStart(SuiteFixtureListener.java:47)
...

When using the Web Browser Interface, following error is reported:

Test tns:Main type Mandatory default result Passed (s0001)

Assertion: The test subject satisfies all applicable constraints.

Form d68e46_1:
   wfs-uri=https://cite.deegree.org/deegree-webservices-3.4.30/services/wfs200?service=WFS&request=GetCapabilities

Error in call to extension function {public java.lang.Object com.occamlab.te.TECore.callFunction(net.sf.saxon.expr.XPathContext,java.lang.String,java.lang.String,net.sf.saxon.om.NodeInfo) throws java.lang.Exception}: Exception in extension function net.sf.saxon.s9api.SaxonApiException: Error in call to extension function {public javax.xml.transform.Source org.opengis.cite.iso19142.TestNGController.doTestRun(org.w3c.dom.Document) throws java.lang.Exception}: Exception in extension function java.lang.NoClassDefFoundError: org/apache/xml/resolver/readers/CatalogReader
Result: Failed

Expected behavior Integration tests shall pass again and execution via Web Browser Interface shall not lead to a NoClassDefFoundError.

Additional context There might be a relation to https://github.com/opengeospatial/teamengine/pull/540 and/or https://github.com/opengeospatial/teamengine/pull/547.

dstenger commented 1 year ago

It was possible to test the blocked PR with a workaround: https://github.com/opengeospatial/ets-wfs20/pull/255#issuecomment-1488955316 Thus, there is a clear connection how TEAM Engine is set up:

This, is an indicator that the two linked teamengine issues might be related to the problem.

bpross-52n commented 1 year ago

I could not yet get to the bottom of this. I created a pull request in Teamengine to cope with this issue, like we discussed today: https://github.com/opengeospatial/teamengine/tree/move-xml-resolver-to-common-libs

dstenger commented 1 year ago

When testing this branch with teamengine-docker/teamengine-beta and WFS 2.0 test suite, following error occurs when executing against [1]:

...
Cannot find org/opengis/cite/validation/CatalogManager.properties
Error at xsl:import on line 48 
  XTSE0165: java.io.FileNotFoundException:
  /usr/local/tomcat/iso_schematron_skeleton_saxon.xsl (No such file or directory)
Cannot find org/opengis/cite/validation/CatalogManager.properties
Error at xsl:import on line 48 
  XTSE0165: java.io.FileNotFoundException:
  /usr/local/tomcat/iso_schematron_skeleton_saxon.xsl (No such file or directory)
Cannot find org/opengis/cite/validation/CatalogManager.properties
...

[1] https://cite.deegree.org/deegree-webservices-3.4.30/services/wfs200?service=WFS&request=GetCapabilities

dstenger commented 1 year ago

Thus, TEAM Engine searches for the file in the wrong path, now.

dstenger commented 1 year ago

Solved by https://github.com/opengeospatial/teamengine/pull/572.