Failed to create session factory while creating HornetQ sessions in JBoss EAP 6

Solution Verified - Updated -


  • While running a JMS client from local/remote we see the following exceptions:
Exception in thread "main" javax.jms.JMSException: Failed to create session factory
   at org.hornetq.jms.client.HornetQConnectionFactory.createConnectionInternal(
   at org.hornetq.jms.client.HornetQConnectionFactory.createConnection(
Caused by: HornetQException[errorCode=2 message=Cannot connect to server(s). Tried with all available servers.]
   at org.hornetq.core.client.impl.ServerLocatorImpl.createSessionFactory(
   at org.hornetq.jms.client.HornetQConnectionFactory.createConnectionInternal(


  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 6.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content