<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">

<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>

                                <td>

                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="http://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>

                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px;  -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
    Upgrade JB6.0.0->6.1.0, now JMS ConnectionFactory not bound?
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="http://community.jboss.org/people/tharris">Tom Harris</a> in <i>JNDI and Naming</i> - <a href="http://community.jboss.org/message/630969#630969">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p>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.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>When we upgraded to JBoss 6.1.0-Final, we are now getting a deployment failure:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span style="font-family: andale mono,times; font-size: 8pt;">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</span></p><p><span style="font-family: andale mono,times; font-size: 8pt;">13:09:44,669 ERROR [STDERR]&#160;&#160;&#160;&#160; at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1420)</span></p><p><span style="font-family: andale mono,times; font-size: 8pt;">... lots of irrelevant stack frames ...</span></p><p><span style="font-family: andale mono,times; font-size: 8pt;">13:09:44,779 ERROR [STDERR] Caused by: javax.naming.NameNotFoundException: ConnectionFactory not bound</span></p><p><span style="font-family: andale mono,times; font-size: 8pt;">13:09:44,779 ERROR [STDERR]&#160;&#160;&#160;&#160; at org.jnp.server.NamingServer.getBinding(NamingServer.java:771)</span></p><p><span style="font-family: andale mono,times; font-size: 8pt;">... more irrelevant stack frames ...</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>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". So, I'm not sure what the issue is... Does anyone have some ideas?</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Contents of hornetq-jms.xml:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span style="font-family: andale mono,times; font-size: 8pt;">&lt;configuration xmlns="urn:hornetq"</span></p><p><span style="font-family: andale mono,times; font-size: 8pt;"><span>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; xmlns:xsi="</span><a class="jive-link-external-small" href="http://www.w3.org/2001/XMLSchema-instance" target="_blank">http://www.w3.org/2001/XMLSchema-instance</a><span>"</span></span></p><p><span style="font-family: andale mono,times; font-size: 8pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; xsi:schemaLocation="urn:hornetq /schema/hornetq-jms.xsd"&gt;</span></p><p><span style="font-family: andale mono,times; font-size: 8pt;">&#160;&#160; &lt;connection-factory name="InVMConnectionFactory"&gt;</span></p><p><span style="font-family: andale mono,times; font-size: 8pt;">&#160;&#160;&#160;&#160;&#160; &lt;xa&gt;true&lt;/xa&gt;</span></p><p><span style="font-family: andale mono,times; font-size: 8pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;connectors&gt;</span></p><p><span style="font-family: andale mono,times; font-size: 8pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;connector-ref connector-name="in-vm" /&gt;</span></p><p><span style="font-family: andale mono,times; font-size: 8pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/connectors&gt;</span></p><p><span style="font-family: andale mono,times; font-size: 8pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;entries&gt;</span></p><p><span style="font-family: andale mono,times; font-size: 8pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;entry name="java:/ConnectionFactory" /&gt;</span></p><p><span style="font-family: andale mono,times; font-size: 8pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;entry name="java:/XAConnectionFactory" /&gt;</span></p><p><span style="font-family: andale mono,times; font-size: 8pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/entries&gt;</span></p><p><span style="font-family: andale mono,times; font-size: 8pt;">&#160;&#160;&#160; &lt;/connection-factory&gt;</span></p><p><span style="font-family: andale mono,times; font-size: 8pt;">&#160;&#160; &lt;queue name="DLQ"&gt;</span></p><p><span style="font-family: andale mono,times; font-size: 8pt;">&#160;&#160;&#160;&#160;&#160; &lt;entry name="/queue/DLQ"/&gt;</span></p><p><span style="font-family: andale mono,times; font-size: 8pt;">&#160;&#160; &lt;/queue&gt;</span></p><p><span style="font-family: andale mono,times; font-size: 8pt;">&#160;&#160; &lt;queue name="ExpiryQueue"&gt;</span></p><p><span style="font-family: andale mono,times; font-size: 8pt;">&#160;&#160;&#160;&#160;&#160; &lt;entry name="/queue/ExpiryQueue"/&gt;</span></p><p><span style="font-family: andale mono,times; font-size: 8pt;">&#160;&#160; &lt;/queue&gt;</span></p><p><span style="font-family: andale mono,times; font-size: 8pt;">&#160;&#160;&#160; &lt;queue name="applicationSpecificQueue"&gt;</span></p><p><span style="font-family: andale mono,times; font-size: 8pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;entry name="java:/queue/applicationSpecificQueue"/&gt;</span></p><p><span style="font-family: andale mono,times; font-size: 8pt;">&#160;&#160;&#160; &lt;/queue&gt;</span></p><p><span style="font-family: andale mono,times; font-size: 8pt;">&lt;/configuration&gt;</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Spring bean configuration file:</p><p><span style="font-family: andale mono,times; font-size: 8pt;"><span>&lt;beans xmlns="</span><a class="jive-link-external-small" href="http://www.springframework.org/schema/beans" target="_blank">http://www.springframework.org/schema/beans</a><span>" xmlns:xsi="</span><a class="jive-link-external-small" href="http://www.w3.org/2001/XMLSchema-instance" target="_blank">http://www.w3.org/2001/XMLSchema-instance</a><span>"</span></span></p><p><span style="font-family: andale mono,times; font-size: 8pt;"><span>&#160;&#160;&#160; xmlns:p="</span><a class="jive-link-external-small" href="http://www.springframework.org/schema/p" target="_blank">http://www.springframework.org/schema/p</a><span>" xmlns:util="</span><a class="jive-link-external-small" href="http://www.springframework.org/schema/util" target="_blank">http://www.springframework.org/schema/util</a><span>"</span></span></p><p><span style="font-family: andale mono,times; font-size: 8pt;"><span>&#160;&#160;&#160; xmlns:jee="</span><a class="jive-link-external-small" href="http://www.springframework.org/schema/jee" target="_blank">http://www.springframework.org/schema/jee</a><span>" xmlns:lang="</span><a class="jive-link-external-small" href="http://www.springframework.org/schema/lang" target="_blank">http://www.springframework.org/schema/lang</a><span>"</span></span></p><p><span style="font-family: andale mono,times; font-size: 8pt;"><span>&#160;&#160;&#160; xmlns:jms="</span><a class="jive-link-external-small" href="http://www.springframework.org/schema/jms" target="_blank">http://www.springframework.org/schema/jms</a><span>" xmlns:tx="</span><a class="jive-link-external-small" href="http://www.springframework.org/schema/tx" target="_blank">http://www.springframework.org/schema/tx</a><span>"</span></span></p><p><span style="font-family: andale mono,times; font-size: 8pt;"><span>&#160;&#160;&#160; xmlns:aop="</span><a class="jive-link-external-small" href="http://www.springframework.org/schema/aop" target="_blank">http://www.springframework.org/schema/aop</a><span>" xmlns:context="</span><a class="jive-link-external-small" href="http://www.springframework.org/schema/context" target="_blank">http://www.springframework.org/schema/context</a><span>"</span></span></p><p><span style="font-family: andale mono,times; font-size: 8pt;">&#160;&#160;&#160; xsi:schemaLocation="</span></p><p><span style="font-family: andale mono,times; font-size: 8pt;"><a class="jive-link-external-small" href="http://www.springframework.org/schema/beans" target="_blank">http://www.springframework.org/schema/beans</a><span> </span><a class="jive-link-external-small" href="http://www.springframework.org/schema/beans/spring-beans-3.0.xsd" target="_blank">http://www.springframework.org/schema/beans/spring-beans-3.0.xsd</a></span></p><p><span style="font-family: andale mono,times; font-size: 8pt;"><a class="jive-link-external-small" href="http://www.springframework.org/schema/util" target="_blank">http://www.springframework.org/schema/util</a><span> </span><a class="jive-link-external-small" href="http://www.springframework.org/schema/util/spring-util-3.0.xsd" target="_blank">http://www.springframework.org/schema/util/spring-util-3.0.xsd</a></span></p><p><span style="font-family: andale mono,times; font-size: 8pt;"><a class="jive-link-external-small" href="http://www.springframework.org/schema/jee" target="_blank">http://www.springframework.org/schema/jee</a><span> </span><a class="jive-link-external-small" href="http://www.springframework.org/schema/jee/spring-jee-3.0.xsd" target="_blank">http://www.springframework.org/schema/jee/spring-jee-3.0.xsd</a></span></p><p><span style="font-family: andale mono,times; font-size: 8pt;"><a class="jive-link-external-small" href="http://www.springframework.org/schema/jms" target="_blank">http://www.springframework.org/schema/jms</a><span> </span><a class="jive-link-external-small" href="http://www.springframework.org/schema/jms/spring-jms-3.0.xsd" target="_blank">http://www.springframework.org/schema/jms/spring-jms-3.0.xsd</a></span></p><p><span style="font-family: andale mono,times; font-size: 8pt;"><a class="jive-link-external-small" href="http://www.springframework.org/schema/tx" target="_blank">http://www.springframework.org/schema/tx</a><span> </span><a class="jive-link-external-small" href="http://www.springframework.org/schema/tx/spring-tx-3.0.xsd" target="_blank">http://www.springframework.org/schema/tx/spring-tx-3.0.xsd</a></span></p><p><span style="font-family: andale mono,times; font-size: 8pt;"><a class="jive-link-external-small" href="http://www.springframework.org/schema/aop" target="_blank">http://www.springframework.org/schema/aop</a><span> </span><a class="jive-link-external-small" href="http://www.springframework.org/schema/aop/spring-aop-3.0.xsd" target="_blank">http://www.springframework.org/schema/aop/spring-aop-3.0.xsd</a></span></p><p><span style="font-family: andale mono,times; font-size: 8pt;"><a class="jive-link-external-small" href="http://www.springframework.org/schema/context" target="_blank">http://www.springframework.org/schema/context</a><span> </span><a class="jive-link-external-small" href="http://www.springframework.org/schema/context/spring-context-3.0.xsd" target="_blank">http://www.springframework.org/schema/context/spring-context-3.0.xsd</a><span>"</span></span></p><p><span style="font-family: andale mono,times; font-size: 8pt;">&#160;&#160;&#160; default-autowire="byName"&gt;</span></p><p><span style="font-family: andale mono,times; font-size: 8pt;">&#160;&#160;&#160; &lt;jee:jndi-lookup id="jmsConnectionFactory" jndi-name="java:/ConnectionFactory"</span></p><p><span style="font-family: andale mono,times; font-size: 8pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160; expected-type="javax.jms.ConnectionFactory" lookup-on-startup="true" /&gt;</span></p><p><span style="font-family: andale mono,times; font-size: 8pt;">&#160;&#160;&#160; &lt;bean id="jndiDestinationResolver" class="org.springframework.jms.support.destination.JndiDestinationResolver" /&gt;</span></p><p><span style="font-family: andale mono,times; font-size: 8pt;">&#160;&#160;&#160; &lt;bean id="applicationSpecificQueueListener" class="com.company.ApplicationSpecificQueueListener" /&gt;</span></p><p><span style="font-family: andale mono,times; font-size: 8pt;">&#160;&#160;&#160; &lt;jms:listener-container container-type="default" destination-type="queue"</span></p><p><span style="font-family: andale mono,times; font-size: 8pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160; destination-resolver="jndiDestinationResolver" connection-factory="jmsConnectionFactory"</span></p><p><span style="font-family: andale mono,times; font-size: 8pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160; acknowledge="auto" concurrency="1"&gt;</span></p><p><span style="font-family: andale mono,times; font-size: 8pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;jms:listener destination="java:/queue/applicationSpecificQueue" ref="applicationSpecificQueueListener" method="onMessage" /&gt;</span></p><p><span style="font-family: andale mono,times; font-size: 8pt;">&#160;&#160;&#160; &lt;/jms:listener-container&gt;</span></p><p><span style="font-family: andale mono,times; font-size: 8pt;">&lt;/beans&gt;</span></p></div>

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Reply to this message by <a href="http://community.jboss.org/message/630969#630969">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in JNDI and Naming at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2083">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>