title: Error with parsing Hibernate Man.hbm.xml
body: <p>I can not run my hibernate application. I'm constantly getting this error:</p>
  
  <pre><code>SLF4J: Class path contains multiple SLF4J bindings.
  SLF4J: Found binding in [jar:file:/C:/Users/MAG/.m2/repository/org/slf4j/slf4j-jdk14/1.7.2/slf4j-jdk14-1.7.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
  SLF4J: Found binding in [jar:file:/C:/Users/MAG/.m2/repository/org/slf4j/slf4j-log4j12/1.5.8/slf4j-log4j12-1.5.8.jar!/org/slf4j/impl/StaticLoggerBinder.class]
  SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
  SLF4J: Actual binding is of type [org.slf4j.impl.JDK14LoggerFactory]
  2013-02-14 14:49:05 org.hibernate.cfg.Environment &lt;clinit&gt;
  INFO: Hibernate 3.3.0.SP1
  2013-02-14 14:49:05 org.hibernate.cfg.Environment &lt;clinit&gt;
  INFO: hibernate.properties not found
  2013-02-14 14:49:05 org.hibernate.cfg.Environment buildBytecodeProvider
  INFO: Bytecode provider name : javassist
  2013-02-14 14:49:05 org.hibernate.cfg.Environment &lt;clinit&gt;
  INFO: using JDK 1.4 java.sql.Timestamp handling
  2013-02-14 14:49:05 org.hibernate.cfg.Configuration configure
  INFO: configuring from resource: /hibernate.cfg.xml
  2013-02-14 14:49:05 org.hibernate.cfg.Configuration getConfigurationInputStream
  INFO: Configuration resource: /hibernate.cfg.xml
  2013-02-14 14:49:05 org.hibernate.cfg.Configuration addResource
  INFO: Reading mappings from resource : model/man/Man.hbm.xml
  2013-02-14 14:49:06 org.hibernate.util.XMLHelper$ErrorLogger error
  SEVERE: Error parsing XML: XML InputStream(25) Attribute "name" must be declared for element type "many-to-many".
  2013-02-14 14:49:06 org.hibernate.util.XMLHelper$ErrorLogger error
  SEVERE: Error parsing XML: XML InputStream(33) Attribute "name" must be declared for element type "many-to-many".
  2013-02-14 14:49:06 org.hibernate.util.XMLHelper$ErrorLogger error
  SEVERE: Error parsing XML: XML InputStream(38) The content of element type "set" must match "(meta*,subselect?,cache?,synchronize*,comment?,key,(element|one-to-many|many-to-many|composite-element|many-to-any),loader?,sql-insert?,sql-update?,sql-delete?,sql-delete-all?,filter*)".
  </code></pre>
  
  <p>The idea of my program is that:
  <strong>Man</strong> is super class for <strong>Owner</strong> and <strong>Renter</strong>.<br>
  Owner can have many Flats but Flat can have one Owner.<br>
  Renter can have many RenterBills but RenterBill can have one Renter.<br>
  Renter can have many Flats and Flats can have many renters.    </p>
  
  <p>My Man.hbm.xml:</p>
  
  <p>
  
  </p>
  
  <pre><code>&lt;class name="Man" table="MEN"&gt;
      &lt;id name="id" column="MAN_ID"&gt;
          &lt;generator class="native" /&gt;
      &lt;/id&gt;
      &lt;property name="pesel" column="MAN_PESEL" /&gt;
      &lt;property name="idNumber" column="MAN_ID_NUMBER" /&gt;
      &lt;property name="email" column="MAN_EMAIL" /&gt;
      &lt;property name="name" column="MAN_NAME" /&gt;
      &lt;property name="surname" column="MAN_SURNAME" /&gt;
      &lt;property name="telephoneNumber" column="MAN_TELEPHONE_NUMBER" /&gt;
      &lt;many-to-one name="address" column="ADDRESS_ID" not-null="true" /&gt;
  
      &lt;joined-subclass name="Owner" table="OWNERS"&gt;
          &lt;key column="MAN_ID" /&gt;
          &lt;property name="password" column="OWNER_PASSWORD" not-null="true" /&gt;
          &lt;property name="seed" column="OWNER_SEED" not-null="true" /&gt;
          &lt;set name="flats" table="OWNER_FLATS"&gt;
              &lt;key column="MAN_ID" /&gt;
              &lt;many-to-many name="flats" column="FLAT_ID" class="Flat" /&gt;
          &lt;/set&gt;
      &lt;/joined-subclass&gt;
  
      &lt;joined-subclass name="Renter" table="RENTERS"&gt;
          &lt;key column="MAN_ID" /&gt;
          &lt;set name="flats" table="RENTER_FLATS"&gt;
              &lt;key column="MAN_ID" /&gt;
              &lt;many-to-many name="flats" column="FLAT_ID" class="Flat" /&gt;
          &lt;/set&gt;
          &lt;set name="bills" table="RENTER_BILLS"&gt;
              &lt;key column="MAN_ID" /&gt;
              &lt;many-to-one name="bills" column="RENTER_BILL_ID" class="RenterBill" /&gt;
          &lt;/set&gt;
      &lt;/joined-subclass&gt;
  &lt;/class&gt;
  </code></pre>
  
  <p></p>
  
  <p>Java classes:
  Man.java</p>
  
  <pre><code>package model.man;
  import model.addresses.Address;
  public abstract class Man {
  
      private int id;
      private String pesel;
      private String idNumber;
      private String email;
      private String name;
      private String surname;
      private String telephoneNumber;
      private Address address;
  
         /* getters setters */
  }
  </code></pre>
  
  <p>Owner.java</p>
  
  <pre><code>package model.man;
  
  import java.util.Iterator;
  import java.util.Set;
  
  import model.flat.Flat;
  
  public class Owner extends Man implements Iterable&lt;Flat&gt; {
  
      private String password;
      private String seed;
      private Set&lt;Flat&gt; flats;
  
      /* getters setters */
  }
  </code></pre>
  
  <p>Renter.java</p>
  
  <pre><code>package model.man;
  
  import java.util.HashSet;
  import java.util.Set;
  
  import model.bills.RenterBill;
  import model.flat.Flat;
  
  public class Renter extends Man {
  
      private Set&lt;Flat&gt; flats = new HashSet&lt;Flat&gt;();
      private Set&lt;RenterBill&gt; bills = new HashSet&lt;RenterBill&gt;();
  
                  /* getters setters */
  }
  </code></pre>