【问题标题】:HermesJMS showing error :javax.jms.JMSException: Could not create Transport. Reason: java.io.IOException: Could not load resource:HermesJMS 显示错误:javax.jms.JMSException:无法创建传输。原因:java.io.IOException:无法加载资源:
【发布时间】:2015-04-05 08:19:40
【问题描述】:

我无法在中配置 org.apache.activemq.ActiveMQSslConnectionFactory 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 密钥库:D:\ActiveMQCertificates\broker.ks 密钥库密码:xxxxx

Hermes中如何指定keystore路径? 帮帮我。

谢谢, 马赫什

【问题讨论】:

  • 你连接ActiveMQ(不带hermes)成功了吗?

标签: java ssl jms activemq soapui


【解决方案1】:

根据link,尝试在JAVA_OPTS中添加

java -Djavax.net.ssl.trustStore= -Djavax.net.ssl.trustStorePassword=xxxxxxxx

【讨论】:

    【解决方案2】:

    似乎连接工厂不知道如何处理简单的文件名。尝试使用字符串创建一个新文件,然后将 URi 转换为字符串并将其作为参数传递。找到solution here.E.g.:

    connectionFactory.setTrustStore(new File("/path/to/store").toURI().toString());
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-07-15
      • 2023-03-29
      • 1970-01-01
      相关资源
      最近更新 更多