How to set up HornetQ Demo

I am trying to recreate HornetQ examples with my own test projects. However, I am having problems with the class loader. Obviously, I am missing some dependencies that are not listed in the docs.

Documents made me add

  • hornetq-core-client.jar
  • netty.jar
  • hornetq-jms-client.jar
  • jboss-jms-api.jar

I get this error:

javax.naming.NoInitialContextException: Cannot instantiate class:
   org.jnp.interfaces.NamingContextFactory 
[Root exception is java.lang.ClassNotFoundException:
   org.jnp.interfaces.NamingContextFactory]

Where can I find this class (and any others that may be needed)?

+5
source share
2 answers

I recently got into the same problem. Having recreated an example theme, I had to add the following:

JNP-client.jar hornetq-commons.jar

Both must be in hornetq lib

+4
source

, HornetQ 2.3, Mavenized. , - HornetQ, Maven:

cd hornetq/examples/jms/topic
mvn dependency:list
+1

All Articles