title: Bean property 'myDataSource' is not writable or has an invalid setter method
body: <p>Getting the following error with this configuration in Spring beans:</p>
  
  <pre><code>&lt;bean name="/login.htm" class="com.virtusa.web.EmployeeController"&gt;
    &lt;property name="service" ref="service"&gt;&lt;/property&gt;
  &lt;/bean&gt;
  
  &lt;bean id="service" class="com.virtusa.service.ServiceIMP"&gt;
    &lt;property name="dao" ref="EmployeeDAO"&gt;&lt;/property&gt;
  &lt;/bean&gt; 
  
  &lt;bean id="EmployeeDAO" class="com.virtusa.dao.EmployeeDAO"&gt;
    &lt;property name="myDataSource" ref="myDataSource" /&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>My spring config file is as follows:</p>
  
  <pre><code>private DataSource myDataSource;
  private JdbcTemplate jdbcTemplate;
  
  public void setDataSource(DataSource myDataSource) {
      this.myDataSource = myDataSource;
       this.jdbcTemplate = new JdbcTemplate(myDataSource);
   }
  </code></pre>
  
  <p>my dao</p>