Я пытаюсь запустить свое приложение, используя https://github.com/bmuschko/gradle-tomcat-plugin.
Моя конфигурация gradle выглядит следующим образом:
apply plugin: 'com.bmuschko.tomcat'
ext.tomcatVersion = '9.0.30'
dependencies {
// some dependencies
tomcat "org.apache.tomcat.embed:tomcat-embed-core:$tomcatVersion",
"org.apache.tomcat.embed:tomcat-embed-logging-juli:9.0.0.M6",
"org.apache.tomcat.embed:tomcat-embed-jasper:$tomcatVersion",
"org.apache.tomcat:tomcat-jdbc:$tomcatVersion",
"org.apache.tomcat:tomcat-dbcp:$tomcatVersion"
}
tomcat {
httpProtocol = 'org.apache.coyote.http11.Http11Nio2Protocol'
ajpProtocol = 'org.apache.coyote.ajp.AjpNio2Protocol'
httpPort = 8088
}
С версией Tomcat до 9.0.30
она работает гладко, но с последней 9.0.31+
выдается следующее исключение (сокращено для краткости ):
org.apache.catalina.LifecycleException: Protocol handler start failed
at org.apache.catalina.connector.Connector.startInternal(Connector.java:1066)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:438)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:930)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.startup.Tomcat.start(Tomcat.java:468)
at org.apache.catalina.startup.Tomcat$start$1.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:115)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:119)
at com.bmuschko.gradle.tomcat.embedded.BaseTomcatServerImpl.start(BaseTomcatServerImpl.groovy:53)
at com.bmuschko.gradle.tomcat.embedded.TomcatServer$start$7.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:115)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:119)
at com.bmuschko.gradle.tomcat.tasks.AbstractTomcatRun.startTomcat(AbstractTomcatRun.groovy:365)
...
at com.bmuschko.gradle.tomcat.tasks.AbstractTomcatRun.validateConfigurationAndStartTomcat(AbstractTomcatRun.groovy:233)
...
at com.bmuschko.gradle.tomcat.tasks.AbstractTomcatRun$_start_closure2.doCall(AbstractTomcatRun.groovy:226)
at com.bmuschko.gradle.tomcat.tasks.AbstractTomcatRun$_start_closure2.doCall(AbstractTomcatRun.groovy)
...
at com.bmuschko.gradle.tomcat.internal.utils.TomcatThreadContextClassLoader.withClasspath(TomcatThreadContextClassLoader.groovy:30)
at com.bmuschko.gradle.tomcat.internal.utils.ThreadContextClassLoader$withClasspath.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:115)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:135)
at com.bmuschko.gradle.tomcat.tasks.AbstractTomcatRun.start(AbstractTomcatRun.groovy:225)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
...
Caused by: java.lang.IllegalArgumentException: The AJP Connector is configured with secretRequired="true" but the secret attribute is either null or "". This combination is not valid.
at org.apache.coyote.ajp.AbstractAjpProtocol.start(AbstractAjpProtocol.java:264)
at org.apache.catalina.connector.Connector.startInternal(Connector.java:1063)
Как от этого избавиться? Можно ли это исправить путем изменения конфигурации? Есть ли плагин tomcat для плагинов, который хорошо с этим справляется, или, может быть, другой плагин для tomcat?