简体   繁体   English

JMS 客户端工具——HermesJMS for Java 8 的任何替代品?

[英]JMS client tool - any alternative to HermesJMS for Java 8?


What alternatives to HermesJMS are available? HermesJMS 有哪些替代品? I need to test against JBoss WildFly 8 and it uses Java 8. HermesJms seems to be built for Java 6 and I could not find a full Java 8 port for it.我需要针对 JBoss WildFly 8 进行测试,它使用 Java 8。HermesJms 似乎是为 Java 6 构建的,我找不到完整的 Java 8 端口。 I tried setting hermes.bat with this configuration option but I get the following error:我尝试使用此配置选项设置 hermes.bat,但出现以下错误:

org.xml.sax.SAXNotRecognizedException: Feature 'http://javax.xml.XMLConstants/feature/secure-processing' is not recognized.

This seems to be due to Xerces JAR version but I am worried if all other libs under %HERMES_HOME%\\lib\\ext will have similar Java 8 compatibility issues.这似乎是由于 Xerces JAR 版本造成的,但我担心 %HERMES_HOME%\\lib\\ext 下的所有其他库是否会有类似的 Java 8 兼容性问题。 Best way is to use a Java 8 compatible build of HermesJMS rather than try fixing JARs one by one but that seems not possible given that there is no such branch.最好的方法是使用与 Java 8 兼容的 HermesJMS 构建,而不是尝试一个一个地修复 JAR,但鉴于没有这样的分支,这似乎是不可能的。

Thanks,谢谢,
Paddy稻田

To let it work for Java 8 correctly, you need to add the following parameters:为了让它在 Java 8 上正常工作,你需要添加以下参数:

-Dorg.xml.sax.parser=com.sun.org.apache.xerces.internal.parsers.SAXParser -Djavax.xml.parsers.DocumentBuilderFactory=com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl -Djavax.xml.parsers.SAXParserFactory=com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl

Windows视窗
Open bin/hermes.bat and add those parameters after start "HermesJMS" "%JAVA_HOME%\\bin\\javaw" .打开bin/hermes.bat并在start "HermesJMS" "%JAVA_HOME%\\bin\\javaw"后添加这些参数。

Linux / Mac Linux / Mac
Open bin/hermes.sh and add those parameters in the last line after "$JAVACMD" .打开bin/hermes.sh并在"$JAVACMD"之后的最后一行添加这些参数。

This seems to be related to java 7 vs 8 difference in XMLP这似乎与XMLP 中的 java 7 vs 8 差异有关

To make it work I updated Hermes lib folder with :为了使它工作,我更新了 Hermes lib 文件夹:

After downloading JARs from MVN repo I renamed to match existing naming in Hermes.从 MVN 存储库下载 JAR 后,我重命名以匹配 Hermes 中的现有命名。

After this change Hermes starts (and works fine when using JMS) and there is no error in logs.在此更改后 Hermes 启动(并且在使用 JMS 时工作正常)并且日志中没有错误。

您可以尝试使用JMSToolBox (在 sourceforge 上)

Remove xerces.jar and xercesImpl.jar from the %HERMES_HOME%\\lib directory.%HERMES_HOME%\\lib目录中删除xerces.jarxercesImpl.jar With these parsers removed from the lib, Hermes will default to the SAX parser in JDK8 and will work better.从库中删除这些解析器后,Hermes 将默认使用 JDK8 中的 SAX 解析器,并且会更好地工作。

Click here for additional detail.单击此处了解更多详细信息。

It worked for me by adding the following jar file to lib directory.通过将以下 jar 文件添加到 lib 目录,它对我有用。 xercesImpl xercesImpl

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM