在 8.0.x 的 tomcat 嵌入式版本中,我使用了 setDigest("SHA-1") ,在 8.5 中他们删除了这个方法并用 CredentialHandler 替换它,我这样使用它:
MessageDigestCredentialHandler handler = new MessageDigestCredentialHandler();
try {
handler.setAlgorithm("SHA1");
setCredentialHandler(handler);
}
catch(NoSuchAlgorithmException ex){
Logger.getLogger(this.getClass()).error("No such algorithim");
}
但是我的服务器仍然关闭并且无法正常工作,我收到了以下异常消息:
IDT ERROR [org.apache.catalina.core.StandardService] [main] [ERROR] - Failed to initialize connector [Connector[HTTP/1.1-8100]]
org.apache.catalina.LifecycleException: Failed to initialize component [Connector[HTTP/1.1-8100]]
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:111)
at org.apache.catalina.core.StandardService.initInternal(StandardService.java:549)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:107)
at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:873)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:107)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:141)
at org.apache.catalina.startup.Tomcat.start(Tomcat.java:356)
at com.bmc.aps.commonserver.CommonServerImpl.start(CommonServerImpl.java:597)
at com.bmc.aps.commonserver.CommonServerImpl.startAndWait(CommonServerImpl.java:585)
at com.bmc.aps.portal.Portal.startAndWait(Portal.java:228)
at com.bmc.aps.portal.Portal.main(Portal.java:337)
Caused by: org.apache.catalina.LifecycleException: Protocol handler initialization failed
at org.apache.catalina.connector.Connector.initInternal(Connector.java:1012)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:107)
Caused by: java.io.IOException: Keystore was tampered with, or password was incorrect
at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:772)
at sun.security.provider.JavaKeyStore$JKS.engineLoad(JavaKeyStore.java:55)
at java.security.KeyStore.load(KeyStore.java:1445)
at org.apache.tomcat.util.net.jsse.JSSEUtil.getStore(JSSEUtil.java:211)
at org.apache.tomcat.util.net.jsse.JSSEUtil.getKeyManagers(JSSEUtil.java:283)
at org.apache.tomcat.util.net.AbstractJsseEndpoint.initialiseSsl(AbstractJsseEndpoint.java:91)
at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:245)
at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:839)
at org.apache.tomcat.util.net.AbstractJsseEndpoint.init(AbstractJsseEndpoint.java:196)
at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:558)
at org.apache.coyote.http11.AbstractHttp11Protocol.init(AbstractHttp11Protocol.java:65)
at org.apache.catalina.connector.Connector.initInternal(Connector.java:1010)
知道如何解决吗?