facebook

Spring validation error "referenced bean xxxx not found

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #233011 Reply

    aazurmendi
    Member

    I have different context files
    in springContext.xml I have a reference to a bean “dataSource” define in an other file: applicationContext-database.xml
    why is this flag an error ❓
    <<<<<<<<<<< springContext.xml >>>>>>>>>
    <?xml version=”1.0″ encoding=”UTF-8″?>
    <!DOCTYPE beans PUBLIC “-//SPRING//DTD BEAN//EN” “http://www.springframework.org/dtd/spring-beans.dtd”&gt;

    <beans>

    <!–
    The bean dataSource is define in applicationContext-database.xml
    It use the file hibernate.properties to load the values
    –>

    <bean id=”sessionFactory”
    class=”org.springframework.orm.hibernate.LocalSessionFactoryBean”>
    <property name=”dataSource”>
    <ref bean=”dataSource” />
    </property>
    >>>>>

    #233076 Reply

    Riyad Kalla
    Member

    aazurmendi,
    Can you zip up a small sample project that exhibits this exact problem and email it to support@genuitec.com ATTN Riyad

    #233215 Reply

    Hello,

    to work with different config files in Spring IDE you have to define a Beans Config Set using the project preferences and assign your
    configuration files to the same config set. That will enable Spring IDE’s validator to validate the external reference defined by

    <ref bean="dataSource" /> 
    

    Greetings

    Christian


    http://springide.org
    christian@springide.org

Viewing 3 posts - 1 through 3 (of 3 total)
Reply To: Spring validation error "referenced bean xxxx not found

You must be logged in to post in the forum log in