在我使用的tomcat嵌入式8.0.x的发布中 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)
知道怎么解决吗?