Announcement Announcement Module
Collapse
No announcement yet.
Spring IDE "Referenced bean not found" w/<jee:jndi-lookup> Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring IDE "Referenced bean not found" w/<jee:jndi-lookup>

    Hello folks! I'm having a minor issue with Spring IDE's validation of my bean configuration file(s). I am getting a "Referenced bean not found" warning for each reference to my "dataSource" bean. All of the references to the bean are in the XML file that the bean is declared in. The "dataSource" bean is declared using the <jee:jndi-lookup> tag. I have Google'd this issue, and have only found threads/tickets from a few years ago, indicating things like "this will be fixed when Spring IDE includes support for Spring 2.0 namespaces." Call me crazy, but I don't think that's my issue! :-)

    I'm using Eclipse 3.4.2 and Spring IDE 2.2.2. I installed Spring IDE via the update site http://www.springsource.org/update/e3.4. I installed "Spring IDE Core", "Spring IDE AOP Extension", and "Spring IDE Security Extension".

    Am I missing an extension? Is it possible that I have my project configured incorrectly to cause these warnings? Any suggestions you might have will be appreciated. Here is my XML, with a couple of things "censored":

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    
    <beans xmlns="http://www.springframework.org/schema/beans"
    	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    	xmlns:jee="http://www.springframework.org/schema/jee"
    	xmlns:tx="http://www.springframework.org/schema/tx"
    	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
    		http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee.xsd
    		http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd">
    
    	<jee:jndi-lookup id="dataSource" jndi-name="${datasource.jndi.name}" resource-ref="true" />
    
    	<bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
    		<property name="dataSource" ref="dataSource" />
    	</bean>
    
    	<tx:annotation-driven transaction-manager="transactionManager" />
    
    	<bean id="myDao" class="my.JdbcDao">
    		<property name="dataSource" ref="dataSource" />
    	</bean>
    	
    </beans>

  • #2
    mhurne,

    that looks like a bug to me ;-) Can you raise a JIRA for the Spring IDE project over at jira.springframework.org.

    I'll address this for the next release.

    Christian

    Comment


    • #3
      mhurne,

      can you please install the "Spring IDE OSGi Extension" as this brings in the required discovery mechanism for Spring IDE to detect those additional namespaces.

      HTH

      Christian

      Comment


      • #4
        Christian - I installed the "Spring IDE OSGi Extension" as you requested, and the warnings are gone. Thanks! I take it I should create a JIRA ticket after all?

        Comment

        Working...
        X