gradle-tomcat-plugin
gradle-tomcat-plugin copied to clipboard
Getting groovy.lang.MissingMethodException after upgrading to tomcat plugin 2.7.0, was using 2.5 before
Java version is 17, tomcatVersion = '7.0.59'
Task :tomcatRun FAILED
FAILURE: Build failed with an exception. . . .
Caused by: groovy.lang.MissingMethodException: No signature of method: static sun.security.tools.keytool.Main.main() is applicable for argument types: ([Ljava.lang.String;) values: [[-genkey, -alias, localhost, -dname, CN=localhost,OU=Test,O=Test,C=US, ...]] Possible solutions: wait(), wait(long), find(), any(), wait(long, int), each(groovy.lang.Closure) at com.bmuschko.gradle.tomcat.internal.ssl.SSLKeyStoreImpl.invokeKeyTool(SSLKeyStoreImpl.groovy:81) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at com.bmuschko.gradle.tomcat.internal.ssl.SSLKeyStoreImpl.createSSLCertificate(SSLKeyStoreImpl.groovy:52) at com.bmuschko.gradle.tomcat.internal.ssl.SSLKeyStore$createSSLCertificate.call(Unknown Source) at com.bmuschko.gradle.tomcat.tasks.AbstractTomcatRun.startTomcat(AbstractTomcatRun.groovy:347) ... 138 more
I guess the static method sun.security.tools.keytool.Main.main() doesn't exist anymore in JDK 17. I don't think this is happening because you upgraded the plugin version.