Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

java

jms


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 option but I get the following error:

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.

Thanks,
Paddy

like image 552
Paddy Avatar asked Feb 24 '15 11:02

Paddy


4 Answers

You could give a try to JMSToolBox (on sourceforge)

like image 70
titou10 Avatar answered Nov 03 '22 19:11

titou10


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

Click here for additional detail.

like image 31
VHS Avatar answered Nov 03 '22 19:11

VHS


To let it work for Java 8 correctly, you need to add the following parameters:

-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".

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

like image 33
faester Avatar answered Nov 03 '22 19:11

faester


This seems to be related to java 7 vs 8 difference in XMLP

To make it work I updated Hermes lib folder with :

  • xercesImpl.jar (version 2.11) - I can see latest in SP5 now

  • xml-apis.jar (1.4.01)

After downloading JARs from MVN repo I renamed to match existing naming in Hermes.

After this change Hermes starts (and works fine when using JMS) and there is no error in logs.

like image 43
j23 Avatar answered Nov 03 '22 17:11

j23