我无法配置org.apache.activemq.ActiveMQSslConnectionFactory in HermesJMS.It最终说错误
Caused by: java.io.IOException: Could not load resource: D:\ActiveMQCertificates\broker.ks
at org.apache.activemq.ActiveMQSslConnectionFactory.getUrlOrResourceAsStream(ActiveMQSslConnectionFactory.java:186)
at org.apache.activemq.ActiveMQSslConnectionFactory.loadClientCredential(ActiveMQSslConnectionFactory.java:158)
at org.apache.activemq.ActiveMQSslConnectionFactory.createKeyManager(ActiveMQSslConnectionFactory.java:142)
at org.apache.activemq.ActiveMQSslConnectionFactory.createTransport(ActiveMQSslConnectionFactory.java:105)
... 51 more
我在D:\ ActiveMQCertificates \ broker.ks上有密钥库文件。但hermes无法加载资源。
Hermes中的配置
brokerURL:ssl:// localhost:61616 keyStore:D:\ ActiveMQCertificates \ broker.ks KeystorePaswword:xxxxx
如何在Hermes中指定密钥库路径? 帮助我。
谢谢, 马赫什
答案 0 :(得分:0)
根据link,尝试在JAVA_OPTS
中添加它java -Djavax.net.ssl.trustStore= -Djavax.net.ssl.trustStorePassword=xxxxxxxx
答案 1 :(得分:0)
似乎连接工厂不知道如何处理简单的文件名。尝试使用String创建一个新文件,然后将URi转换为字符串并将其作为参数传递。找到solution here。例如:
connectionFactory.setTrustStore(new File("/path/to/store").toURI().toString());