TEAM Engine (Test, Evaluation, And Measurement Engine) is an engine for testing web services and other resources written in JAVA. It executes test scripts written in Compliance Test Language (CTL), TestNG and other languages. It is lightweight and easy to run as a command line or to setup as a service. It can be used to test any type of service or encoding. It is also the official tool used by the Open Geospatial Consortium (OGC) for compliance testing.
Apache License 2.0
45
stars
41
forks
source link
TEAM Engine cannot be started without setting java property javax.xml.parsers.DocumentBuilderFactory #544
Describe the bug
TEAM Engine v5.5 cannot be started without setting java property -Djavax.xml.parsers.DocumentBuilderFactory=com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl.
To Reproduce
Steps to reproduce the behavior:
Start TEAM Engine without setting -Djavax.xml.parsers.DocumentBuilderFactory=com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl in JDK.
E.g. by using Dockerfile of ets-ogcapi-features10 repository.
Error occurs in log file (see additional context).
When java property is set, TEAM Engine starts correctly and can be used.
Expected behavior
It shall be possible to install TEAM Engine without setting the java property -Djavax.xml.parsers.DocumentBuilderFactory=com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl.
Additional context
Output of log file when error occurs:
...
9f8c73> SEVERE: Exception sending context initialized event to listener instance of class com.occamlab.te.web.listeners.CleartextPasswordContextListener
9f8c73> java.lang.NoClassDefFoundError: org/w3c/dom/ElementTraversal
9f8c73> at java.lang.ClassLoader.defineClass1(Native Method)
9f8c73> at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
9f8c73> at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
9f8c73> at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
9f8c73> at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
9f8c73> at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
9f8c73> at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
9f8c73> at java.security.AccessController.doPrivileged(Native Method)
9f8c73> at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
9f8c73> at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
9f8c73> at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
9f8c73> at java.lang.ClassLoader.defineClass1(Native Method)
9f8c73> at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
9f8c73> at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
9f8c73> at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
9f8c73> at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
9f8c73> at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
9f8c73> at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
9f8c73> at java.security.AccessController.doPrivileged(Native Method)
9f8c73> at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
9f8c73> at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
9f8c73> at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
9f8c73> at org.apache.xerces.parsers.AbstractDOMParser.startDocument(Unknown Source)
9f8c73> at org.apache.xerces.impl.dtd.XMLDTDValidator.startDocument(Unknown Source)
9f8c73> at org.apache.xerces.impl.XMLDocumentScannerImpl.startEntity(Unknown Source)
9f8c73> at org.apache.xerces.impl.XMLVersionDetector.startDocumentParsing(Unknown Source)
9f8c73> at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
9f8c73> at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
9f8c73> at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
9f8c73> at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
9f8c73> at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
9f8c73> at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:205)
9f8c73> at com.occamlab.te.web.listeners.CleartextPasswordContextListener.contextInitialized(CleartextPasswordContextListener.java:89)
9f8c73> at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5197)
9f8c73> at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5720)
9f8c73> at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
9f8c73> at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:1018)
9f8c73> at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:994)
9f8c73> at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
9f8c73> at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1296)
9f8c73> at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:2038)
9f8c73> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
9f8c73> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
9f8c73> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
9f8c73> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
9f8c73> at java.lang.Thread.run(Thread.java:748)
9f8c73> Caused by: java.lang.ClassNotFoundException: org.w3c.dom.ElementTraversal
9f8c73> at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
9f8c73> at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
9f8c73> at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
9f8c73> ... 46 more
...
Describe the bug TEAM Engine v5.5 cannot be started without setting java property
-Djavax.xml.parsers.DocumentBuilderFactory=com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl
.To Reproduce Steps to reproduce the behavior:
-Djavax.xml.parsers.DocumentBuilderFactory=com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl
in JDK.Expected behavior It shall be possible to install TEAM Engine without setting the java property
-Djavax.xml.parsers.DocumentBuilderFactory=com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl
.Additional context Output of log file when error occurs:
Might be related to https://github.com/opengeospatial/teamengine/issues/498.