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

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/28695030/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-11-02 14:01:12  来源:igfitidea点击:

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

javajms

提问by Paddy


What alternatives to HermesJMS are available? 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. I tried setting hermes.bat with this configuration optionbut I get the following error:


HermesJMS 有哪些替代品?我需要针对 JBoss WildFly 8 进行测试,它使用 Java 8。HermesJms 似乎是为 Java 6 构建的,我找不到完整的 Java 8 端口。我尝试使用此配置选项设置 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. 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.

这似乎是由于 Xerces JAR 版本造成的,但我担心 %HERMES_HOME%\lib\ext 下的所有其他库是否会有类似的 Java 8 兼容性问题。最好的方法是使用 HermesJMS 的 Java 8 兼容构建,而不是尝试一个一个修复 JAR,但鉴于没有这样的分支,这似乎是不可能的。

Thanks,
Paddy

谢谢,
帕迪

回答by faester

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.batand add those parameters after start "HermesJMS" "%JAVA_HOME%\bin\javaw".

Windows
打开bin/hermes.bat并在start "HermesJMS" "%JAVA_HOME%\bin\javaw".

Linux / Mac
Open bin/hermes.shand add those parameters in the last line after "$JAVACMD".

Linux/Mac
打开bin/hermes.sh并在"$JAVACMD".

回答by j23

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 时工作正常)并且日志中没有错误。

回答by titou10

You could give a try to JMSToolBox(on sourceforge)

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

回答by Yaswanth

It worked for me by adding the following jar file to lib directory. xercesImpl

通过将以下 jar 文件添加到 lib 目录,它对我有用。 xercesImpl

回答by VHS

Remove xerces.jarand xercesImpl.jarfrom the %HERMES_HOME%\libdirectory. With these parsers removed from the lib, Hermes will default to the SAX parser in JDK8 and will work better.

从目录中删除xerces.jar和。从库中删除这些解析器后,Hermes 将默认使用 JDK8 中的 SAX 解析器,并且会更好地工作。xercesImpl.jar%HERMES_HOME%\lib

Click herefor additional detail.

单击此处了解更多详细信息。