[英]HermesJMS showing error :javax.jms.JMSException: Could not create Transport. Reason: java.io.IOException: Could not load resource:
I am unable to configure org.apache.activemq.ActiveMQSslConnectionFactory in HermesJMS.It ends up saying an error 我无法在HermesJMS中配置org.apache.activemq.ActiveMQSslConnectionFactory,结果显示错误
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
I have the keystore file at D:\\ActiveMQCertificates\\broker.ks .But the hermes is unable to load the resource. 我在D:\\ ActiveMQCertificates \\ broker.ks中有密钥库文件,但是hermes无法加载资源。
The config in Hermes is Hermes中的配置是
brokerURL : ssl://localhost:61616 keyStore : D:\\ActiveMQCertificates\\broker.ks KeystorePaswword :xxxxx brokerURL:ssl:// localhost:61616 keyStore:D:\\ ActiveMQCertificates \\ broker.ks KeystorePaswword:xxxxx
How to specify the keystore path in Hermes? 如何在Hermes中指定密钥库路径? Help me in this.
帮帮我
Thanks, Mahesh 谢谢,Mahesh
根据链接 ,尝试将其添加到JAVA_OPTS中
java -Djavax.net.ssl.trustStore= -Djavax.net.ssl.trustStorePassword=xxxxxxxx
It seems the connection factory doesn't know how to handle simple file name. 似乎连接工厂不知道如何处理简单的文件名。 Try creating a new file with the String, then convert the URi to string and pass that as parameter.
尝试使用String创建一个新文件,然后将URi转换为string并将其作为参数传递。 Found solution here .Eg:
在这里找到解决方案。例如:
connectionFactory.setTrustStore(new File("/path/to/store").toURI().toString());
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.