title: how to resolve org.springframework.beans.NotWritablePropertyException
body: <p>hi i am using spring config.xml to config my embedded database hsqldb. my spring config is as below:</p>
  
  <p></p>
  
  <pre><code>&lt;jdbc:embedded-database id="dataSource" type="HSQL"&gt;
      &lt;jdbc:script location="classpath:schema.sql" /&gt;
  
  &lt;/jdbc:embedded-database&gt;
  &lt;bean id="adapterDataSource" class="org.apache.commons.dbcp.BasicDataSource"
      destroy-method="close"&gt;
      &lt;property name="datasource" ref="dataSource"&gt;&lt;/property&gt;
      &lt;property name="driverClassName" value="org.hsqldb.jdbcDriver" /&gt;
      &lt;property name="url" value="jdbc:hsqldb:file:data/db/lmexadapter_db" /&gt;
      &lt;property name="username" value="sa" /&gt;
      &lt;property name="password" value="" /&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>when run run my appication which is using above spring config.xml it give me a exception as below:</p>
  
  <p>org.springframework.beans.NotWritablePropertyException: Invalid property 'datasource' of bean class [org.apache.commons.dbcp.BasicDataSource]: Bean property 'datasource' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?</p>
  
  <p>please help to resolve this as soon as possible</p>
  
  <p>Thank you</p>