Announcement Announcement Module
Collapse
No announcement yet.
javax.naming.NameNotFoundException: ConnectionFactory not bound Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • javax.naming.NameNotFoundException: ConnectionFactory not bound

    Hi All,

    I am using JBOSS 4.0.5 GA. with springframework-jms-2.0.8.jar .
    I am new to it and not help to resolve this problem:

    Here is configuration info.

    <bean id="jndiTemplate" class="org.springframework.jndi.JndiTemplate">
    <property name="environment">
    <props>
    <prop key="java.naming.factory.initial">org.jnp.interfac es.NamingContextFactory</prop>
    <prop key="java.naming.provider.url">localhost</prop>
    <prop key="java.naming.factory.url.pkgs">org.jnp.interfa ces:org.jboss.naming</prop>
    </props>
    </property>
    </bean>


    <bean name="jmsQueueConnectionFactory" class="org.springframework.jndi.JndiObjectFactoryB ean">
    <property name="jndiTemplate">
    <ref bean="jndiTemplate"/>
    </property>
    <property name="jndiName" value="UIL2ConnectionFactory"/>
    </bean>

    When i try to deploy application i get following exception:

    org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'jmsQueueConnectionFactory' defined in ServletContext resource [/WEB-INF/conf/spring/photo/applicationContext-queues.xml]: Invocation of init method failed; nested exception is javax.naming.NamingException: Could not dereference object [Root exception is javax.naming.NameNotFoundException: ConnectionFactory not bound]
    Caused by:
    javax.naming.NamingException: Could not dereference object [Root exception is javax.naming.NameNotFoundException: ConnectionFactory not bound]
    at org.jnp.interfaces.NamingContext.resolveLink(Namin gContext.java:1067)
    at org.jnp.interfaces.NamingContext.lookup(NamingCont ext.java:700)
    at org.jnp.interfaces.NamingContext.lookup(NamingCont ext.java:587)
    at javax.naming.InitialContext.lookup(InitialContext. java:351)
    at org.springframework.jndi.JndiTemplate$1.doInContex t(JndiTemplate.java:124)
    at org.springframework.jndi.JndiTemplate.execute(Jndi Template.java:86)
    at org.springframework.jndi.JndiTemplate.lookup(JndiT emplate.java:122)
    at org.springframework.jndi.JndiTemplate.lookup(JndiT emplate.java:147)


    Sorry, if i have posted at wrong place.

    Please help Me.

  • #2
    in place of
    <property name="jndiName" value="UIL2ConnectionFactory"/>
    try using
    <property name="jndiName" value="XAConnectionFactory"/>

    Actually you have to see into jms-ds.xml file inside your jboss for the jndi name used for the connection factory.

    And want to integratethis with ActiveMQ server you can chek this article
    http://springkbase.blogspot.com/2009/06/spring-jms.html

    Here you dont have to touch any configuration of activemq server

    Comment

    Working...
    X