10


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

Paddy
  • 3,472
  • 5
  • 29
  • 48

5 Answers5

19

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

Jacob van Lingen
  • 8,989
  • 7
  • 48
  • 78
faester
  • 14,886
  • 5
  • 45
  • 56
14

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

To make it work I updated Hermes lib folder with :

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.

Community
  • 1
  • 1
j23
  • 160
  • 9
7

You could give a try to JMSToolBox (on sourceforge)

titou10
  • 2,814
  • 1
  • 19
  • 42
  • 2
    You asked what's available as an alternative. Here's one. It has a slightly less byzantine configuration (but to fair only just so slightly) and it has the advantage of actually working. – staylorx Mar 16 '17 at 18:54
2

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.

VHS
  • 9,534
  • 3
  • 19
  • 43
1

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

Yaswanth
  • 483
  • 1
  • 9
  • 25
  • This does only include less information then the top answer https://stackoverflow.com/a/36565755/2442804 - how is it different? – luk2302 Jun 13 '17 at 10:00
  • passing the java parameters too didn't work for me. Because the jar itself is not available in your library. So only if you have the jar it can refer the class. I hope it is clear. – Yaswanth Jun 14 '17 at 04:34