Development appserver config poisened after execution of buildUberJar


This could be an interesting one to solve…

My steps before encountering the problem:

  • I added and executed the buildUberJar task to the build.gradle in order to create a docker image.
  • Building and running the docker image with the uber jar works fine.
  • When returning to developping new features, running cuba with the “development app server” did no more work.
  • No amount of disabling the uber jar build / cleaning / config cleanup / cuba studio and whole computer restart could solve the problem.
  • After reproducing the steps with a commit from before building the uber jar, I again got a poisoned development app server after execution of the buildUberJar task.

How can execute both the buildUberJar and develop “as before” with the dev app server?



Requesting “http://localhost:8080/app” in the Browser returns a HTTP 404 with the error message
“The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.”

the catalina.out shows the following first error

INFORMATION: Starting Servlet engine: [Apache Tomcat/9.0.27]
Okt. 28, 2020 10:57:34 VORM. org.apache.catalina.startup.HostConfig deployDirectory
INFORMATION: Deploye Web-Applikations-Verzeichnis [/home/bjsvwjek/Dokumente/git/simi_ws/prevs/simi/code/deploy/tomcat/webapps/app-core]
Okt. 28, 2020 10:57:34 VORM. org.apache.tomcat.util.descriptor.web.WebXmlParser parseWebXml
SCHWERWIEGEND: Parse error in application web.xml file at [file:/home/bjsvwjek/Dokumente/git/simi_ws/prevs/simi/code/deploy/tomcat/conf/web.xml]
org.xml.sax.SAXNotSupportedException: not supported setting property
	at org.gjt.xpp.sax2.Driver.setProperty(
	at org.apache.tomcat.util.digester.Digester.getXMLReader(
	at org.apache.tomcat.util.digester.Digester.parse(
	at org.apache.tomcat.util.descriptor.web.WebXmlParser.parseWebXml(
	at org.apache.catalina.startup.ContextConfig.getDefaultWebXmlFragment(
	at org.apache.catalina.startup.ContextConfig.webConfig(
	at org.apache.catalina.startup.ContextConfig.configureStart(
	at org.apache.catalina.startup.ContextConfig.lifecycleEvent(
	at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(
	at org.apache.catalina.core.StandardContext.startInternal(
	at org.apache.catalina.util.LifecycleBase.start(
	at org.apache.catalina.core.ContainerBase.addChildInternal(
	at org.apache.catalina.core.ContainerBase.addChild(
	at org.apache.catalina.core.StandardHost.addChild(
	at org.apache.catalina.startup.HostConfig.deployDirectory(
	at org.apache.catalina.startup.HostConfig$
	at java.base/java.util.concurrent.Executors$
	at java.base/
	at org.apache.tomcat.util.threads.InlineExecutorService.execute(
	at java.base/java.util.concurrent.AbstractExecutorService.submit(
	at org.apache.catalina.startup.HostConfig.deployDirectories(
	at org.apache.catalina.startup.HostConfig.deployApps(
	at org.apache.catalina.startup.HostConfig.start(
	at org.apache.catalina.startup.HostConfig.lifecycleEvent(
	at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(
	at org.apache.catalina.util.LifecycleBase.setStateInternal(
	at org.apache.catalina.util.LifecycleBase.setState(
	at org.apache.catalina.core.ContainerBase.startInternal(
	at org.apache.catalina.core.StandardHost.startInternal(
	at org.apache.catalina.util.LifecycleBase.start(
	at org.apache.catalina.core.ContainerBase$
	at org.apache.catalina.core.ContainerBase$
	at java.base/
	at org.apache.tomcat.util.threads.InlineExecutorService.execute(
	at java.base/java.util.concurrent.AbstractExecutorService.submit(
	at org.apache.catalina.core.ContainerBase.startInternal(
	at org.apache.catalina.core.StandardEngine.startInternal(
	at org.apache.catalina.util.LifecycleBase.start(
	at org.apache.catalina.core.StandardService.startInternal(
	at org.apache.catalina.util.LifecycleBase.start(
	at org.apache.catalina.core.StandardServer.startInternal(
	at org.apache.catalina.util.LifecycleBase.start(
	at org.apache.catalina.startup.Catalina.start(
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(
	at java.base/java.lang.reflect.Method.invoke(
	at org.apache.catalina.startup.Bootstrap.start(
	at org.apache.catalina.startup.Bootstrap.main(

We had a similar topic: Upgrade from version 7.2.6 to 7.2.7 - CUBA.Platform

The error was caused by the Gradle of incompatible version used in the project.

In any case the problem is caused by the “org.gjt.xpp.sax2” (most probably pull-parser-2) library appearing in the Tomcat when it should not be there. Maybe it’s a transitive dependency. So you probably should investigate it in this direction.

Thank you Alex for linking the similar issue Upgrade from version 7.2.6 to 7.2.7

As to finding the cause, let me add a few things that I found out:

  • For some time, I suspected the gradle version, but going back vom gradle 6.6.1 to gradle 5(.6.4) did not change anything.
  • It must be some “artifact” introduced into tomcat through the gradle task buildUberJar, because:
    • As long as there is no buildUberJar task, it works
    • When it is broken, the “brute force fix” checkout from git into new local folder works.

Does the org.gjt.xpp.sax2 lib “land” in tomcat due to the gradle task buildFatJar?
How to get rid of it? Specific “cleanup task” after buildFatJar?