Our application has been running fine on JBoss 6.0.0-Final for quite a while now. It uses HornetQ via JMS, and it uses Spring 3.0.6 to configure the queue listeners and senders.
When we upgraded to JBoss 6.1.0-Final, we are now getting a deployment failure:
13:09:44,669 ERROR [STDERR] org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jmsConnectionFactory': Invocation of init method failed; nested exception is javax.naming.NameNotFoundException: ConnectionFactory not bound
13:09:44,669 ERROR [STDERR] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1420)
... lots of irrelevant stack frames ...
13:09:44,779 ERROR [STDERR] Caused by: javax.naming.NameNotFoundException: ConnectionFactory not bound
13:09:44,779 ERROR [STDERR] at org.jnp.server.NamingServer.getBinding(NamingServer.java:771)
... more irrelevant stack frames ...
Did something change between 6.0.0 and 6.1.0 that is making the JNDI binding fail? I tried dropping our war files into deploy after the server was fully running, same failure. I looked in the admin-console to find the JMS connection factory and its JNDI bindings, and it shows "java:/ConnectionFactory,java:/XAConnectionFactory". I have also tried setting the "xa" element in the ConnectionFactory to false, still fails. So, I'm not sure what the issue is... Does anyone have some ideas?
Contents of hornetq-jms.xml:
<connector-ref connector-name="in-vm" />
<entry name="java:/ConnectionFactory" />
<entry name="java:/XAConnectionFactory" />
Spring bean configuration file:
<jee:jndi-lookup id="jmsConnectionFactory" jndi-name="java:/ConnectionFactory"
expected-type="javax.jms.ConnectionFactory" lookup-on-startup="true" />
<bean id="jndiDestinationResolver" class="org.springframework.jms.support.destination.JndiDestinationResolver" />
<bean id="applicationSpecificQueueListener" class="com.company.ApplicationSpecificQueueListener" />
<jms:listener-container container-type="default" destination-type="queue"
<jms:listener destination="java:/queue/applicationSpecificQueue" ref="applicationSpecificQueueListener" method="onMessage" />
Please let me know if I can provide additional information, and thanks for your assistance.
(I posted this to the JNDI and Naming forum, but it sat with no replies for over three weeks. This is a production application, so we can no longer wait patiently for help that may never occur, I had to take further action to get this issue resolved.)