简体   繁体   English

HermesJMS显示错误:javax.jms.JMSException:无法创建传输。 原因:java.io.IOException:无法加载资源:

[英]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.

相关问题 引起原因:javax.jms.JMSException:无法创建传输。 原因:java.io.IOException:无法识别传输方案:[t3] - Caused by: javax.jms.JMSException: Could not create Transport. Reason: java.io.IOException: Transport scheme NOT recognized: [t3] javax.jms.JMSException:无法发送到未连接的传输 - javax.jms.JMSException: Cannot send to a non-connected transport ObjectMessage.setObject()毫无明显原因抛出javax.jms.JMSException - ObjectMessage.setObject() throws javax.jms.JMSException for no apparently reason 异常javax.jms.JMSException:对等对象已处置 - Erratic javax.jms.JMSException: Peer disposed ActiveMQ:传输连接器无法在JMX中注册:java.io.IOException:无法识别传输方案:[stomp] - ActiveMQ: Transport Connector could not be registered in JMX: java.io.IOException: Transport scheme NOT recognized: [stomp] Ant 媒体服务器 java.io.IOException:无法创建缓存 - Ant media server java.io.IOException: Could not create the cache jboss未能定义类javax.jms.JMSException - jboss failed to define class javax.jms.JMSException MyBatis加载XML:java.io.IOException:找不到资源(eclipse) - MyBatis loading XML : java.io.IOException: Could not find resource (eclipse) Tibjms javax.jms.JMSException:服务器未知连接 - Tibjms javax.jms.JMSException: Connection unknown by server 无法创建文件日志/connectivityserver.log java.io.IOException:无法创建目录/日志 - Unable to create file logs/connectivityserver.log java.io.IOException: Could not create directory /logs
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM