gradle-tomcat-plugin
gradle-tomcat-plugin copied to clipboard
Gradle Daemon - Caused by: java.lang.Error: factory already defined
When using the Gradle daemon (the default), I'm unable to run Tomcat twice using the plugin. The first time it starts, there is no problem. I then run "gradle tomcatStop" followed by "gradle tomcatRun" to restart Tomcat. I get the error/stacktrace below. If I run, "gradle --stop" to stop the gradle daemon, I'm once again able to run "gradle tomcatRun" successfully.
I'm using the plugin version 2.5 and Tomcat version 9.0.22.
Caused by: java.lang.Error: factory already defined
at java.base/java.net.URL.setURLStreamHandlerFactory(URL.java:1184)
at org.apache.catalina.webresources.TomcatURLStreamHandlerFactory.
Workaround: ./gradlew tomcatRun --no-daemon
Is threre a real solution for this case?