title: Spring - Attribute 'name' is not allowed to appear in element 'constructor-arg'
body: <p>I am using hsqldb as a db in my program. I want to inject the constructor values over spring.</p>
  
  <p>Here is my bean:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;beans xmlns="http://www.springframework.org/schema/beans"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://www.springframework.org/schema/beans 
      http://www.springframework.org/schema/beans/spring-beans.xsd"&gt;
  
      &lt;bean id="ConnectionManager" class="at.tuwien.group2.vpm.persistence.ConnectionManager"
          scope="singleton"&gt;
          &lt;constructor-arg name="url" value="jdbc:hsqldb:file:vpmDatabasetest" /&gt;
          &lt;constructor-arg name="user" value="sa" /&gt;
          &lt;constructor-arg name="password" value="" /&gt;
      &lt;/bean&gt;
  </code></pre>
  
  <p>My Constructor looks like that:</p>
  
  <pre><code>public ConnectionManager(String url, String user, String password) {
      if(url == null || user == null || password == null) {
          throw new NullPointerException("Paramaeter cannot be null!");
      }
      this.url = url;
      this.user = user;
      this.password = password;
  }
  </code></pre>
  
  <p>However, when I want to execute the code I get:</p>
  
  <p>Attribute 'name' is not allowed to appear in element 'constructor-arg'</p>
  
  <p>Attribute 'name' is not allowed to appear in element 'constructor-arg'</p>
  
  <p>What should I use instead?</p>