东方通开启https端口支持配置号证书后:the trustAnchors parameter must be non-empty
[2026-05-29 09:22:46.496] [INFO] [web-container] [Initializing ProtocolHandler ["https-jsse-nio-8443"]]
[2026-05-29 09:22:46.838] [ERROR] [web-container] [Failed to initialize component [Connector[HTTP/1.1-8443]]]
com.tongweb.container.LifecycleException: Protocol handler initialization failed
at com.tongweb.container.connector.Connector.initInternal(Connector.java:1023)
at com.tongweb.container.util.LifecycleBase.init(LifecycleBase.java:132)
at com.tongweb.container.core.StandardService.initInternal(StandardService.java:541)
at com.tongweb.container.util.LifecycleBase.init(LifecycleBase.java:132)
at com.tongweb.container.core.StandardServer.initInternal(StandardServer.java:1012)
at com.tongweb.container.util.LifecycleBase.init(LifecycleBase.java:132)
at com.tongweb.container.util.LifecycleBase.start(LifecycleBase.java:169)
at com.tongweb.container.startup.ServletContainer.start(ServletContainer.java:461)
at com.tongweb.srv.enhance.boot.product.LiteTongweb.start(LiteTongweb.java:114)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.tongweb.srv.luncher.starter.SimpleBootStarter.start(SimpleBootStarter.java:57)
at com.tongweb.srv.luncher.starter.SimpleBootStarter.main(SimpleBootStarter.java:36)
Caused by: java.lang.IllegalArgumentException: the trustAnchors parameter must be non-empty
at com.tongweb.web.util.net.AbstractJsseEndpoint.createSSLContext(AbstractJsseEndpoint.java:107)
at com.tongweb.web.util.net.AbstractJsseEndpoint.initialiseSsl(AbstractJsseEndpoint.java:71)
at com.tongweb.web.util.net.NioEndpoint.bind(NioEndpoint.java:237)
at com.tongweb.web.util.net.AbstractEndpoint.bindWithCleanup(AbstractEndpoint.java:1308)
at com.tongweb.web.util.net.AbstractEndpoint.init(AbstractEndpoint.java:1322)
at com.tongweb.connector.AbstractProtocol.init(AbstractProtocol.java:645)
at com.tongweb.connector.http11.AbstractHttp11Protocol.init(AbstractHttp11Protocol.java:75)
at com.tongweb.container.connector.Connector.initInternal(Connector.java:1021)
... 14 common frames omitted
Caused by: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
at java.security.cert.PKIXParameters.setTrustAnchors(PKIXParameters.java:200)
at java.security.cert.PKIXParameters.<init>(PKIXParameters.java:157)
at java.security.cert.PKIXBuilderParameters.<init>(PKIXBuilderParameters.java:130)
at com.tongweb.web.util.net.SSLUtilBase.getParameters(SSLUtilBase.java:473)
at com.tongweb.web.util.net.SSLUtilBase.getTrustManagers(SSLUtilBase.java:404)
at com.tongweb.web.util.net.SSLUtilBase.createSSLContext(SSLUtilBase.java:218)
at com.tongweb.web.util.net.AbstractJsseEndpoint.createSSLContext(AbstractJsseEndpoint.java:105)
... 21 common frames omitted
跟踪源码:


java.security.KeyStore;
keystore.load(is, storePass);//根据(信任的)证书库keyStore 和此证书库密码进行加载-》最后到上图的 enties 对象里
具体源码如下:


原来在使用keytool 创建证书库keystore的命令的时候,还没有导入证书,空的库文件,这样这个库应该就是非受信任的(猜测)
keytool importcert 之后,这个证书库就是受信任的(预计此证书库keystore的第四个int位置就是!=1)代码此处就走到此处 var14!=1 就是true
就此:上面的那个异常不再报

浙公网安备 33010602011771号