title: Spring Injected Bean property is null
body: <p>I'm pretty new to the whole idea of injecting beans, so speak slowly. :)</p>
  
  <p>I've got a class that injects a bean, but when the property is accessed, the property is null and I get a null-pointer exception.</p>
  
  <p>From /project-TRUNK/war-module/src/main/webapp/WEB-INF/spring-config/spring-bean.xml</p>
  
  <pre><code> &lt;bean id="linkCheck"
    class="com.dogwatch.util.LinkCheck"&gt;
    &lt;property name="linkDao" ref="jdbcLinkDao" /&gt;
   &lt;/bean&gt;
  </code></pre>
  
  <p>From /project-TRUNK/war-module/src/main/webapp/WEB-INF/spring-config/spring-dao.xml</p>
  
  <pre><code> &lt;bean id="jdbcLinkDao" class="com.dogwatch.util.jdbcLinkDao"&gt;
    &lt;property name="dataSource" ref="dataSource" /&gt;
    &lt;property name="linkJdbcDataTypesSupport" ref="linkJdbcDataTypesSupport"/&gt;
   &lt;/bean&gt;
  </code></pre>
  
  <p>The DAO bean is known to be good and works in several other classes.</p>
  
  <pre><code>package com.dogwatch.util;
  public class LinkCheck {
  
   private LinkDAO linkDao;
  
  
   public LinkDAO getLinkDao() {
    return linkDao;
   }
  
   public void setLinkDao(LinkDAO linkDao) {
    this. linkDao = linkDao;
   }
  }
  </code></pre>
  
  <p>I've been comparing it to other classes that use the same DAO bean and I can't find any differences.</p>
  
  <p>I do see the bean getting defined in:</p>
  
  <blockquote>
    <p>INFO [2010-01-15 01:10:05,838] [main]
    [XmlBeanDefinitionReader]
    [XmlBeanDefinitionReader.java:323] -
    Loading XML bean definitions from URL
    [file:war-module/src/main/webapp/WEB-INF/spring-config/spring-dao.xml]
    INFO [2010-01-15 01:10:05,858] [main]
    [XmlBeanDefinitionReader]
    [XmlBeanDefinitionReader.java:323] -
    Loading XML bean definitions from URL
    [file:war-module/src/main/webapp/WEB-INF/spring-config/spring-bean.xml]
    INFO [2010-01-15 01:10:06,597] [main]
    [DefaultListableBeanFactory]
    [DefaultListableBeanFactory.java:414]
    - Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@3c01d5a0:
    defining beans [(snip) jdbcLinkDao,
    linkCheck(snip)businessLoggingAspect,org.springframework.beans.factory.config.PropertyPlaceholderConfigurer#1];
    root of factory hierarchy</p>
  </blockquote>
  
  <p>Does anyone have any suggestions on how to go about troubleshooting bean injection?</p>