I am trying to connect to HornetQ and perform look up on topic connection factory bTopicConnectionFactory hornetQConnectionFactory = (javax.jms.TopicConnectionFactory)ic.lookup("/ConnectionFactory");
but it gives an error "javax.naming.NamingException: Could not dereference object [Root exception is java.lang.ClassNotFoundException: org.hornetq.jms.client.HornetQJMSConnectionFactory]".Please help
Properties p = new java.util.Properties();
p.put(javax.naming.Context.INITIAL_CONTEXT_FACTORY,
"org.jnp.interfaces.NamingContextFactory");
p.put(javax.naming.Context.URL_PKG_PREFIXES,
"org.jboss.naming:org.jnp.interfaces");
p.put(javax.naming.Context.PROVIDER_URL, "jnp://172.26.178.137:3900");
// Step 1. Create an initial context to perform the JNDI lookup.
System.out.println("Step 0.5");
ic = new javax.naming.InitialContext(p);
System.out.println("Step 1");
// Step 3. Perform a lookup on the Connection Factory
TopicConnectionFactory hornetQConnectionFactory = (javax.jms.TopicConnectionFactory)ic.lookup("/ConnectionFactory");
System.out.println("Step 1.5");
String hornetQTopicName = "topic/Test";
Topic hornetQTopic= (javax.jms.Topic)ic.lookup(hornetQTopicName);