title: java.lang.ClassCastException: org.hibernate.type.StringType cannot be cast to org.hibernate.type.VersionType
body: <p>I am developing a database connector in order to retrieve data from a Oracle database. I have used the Hibernate tool included as a plug-in in Eclipse for the generation of the Hibernate mapping files because I have a lot of classes and tables to map. However, when I run the application, I have just get the following Exception:</p>
  
  <pre><code>java.lang.ClassCastException: org.hibernate.type.StringType cannot be cast to org.hibernate.type.VersionType
      at org.hibernate.tuple.PropertyFactory.buildVersionProperty(PropertyFactory.java:107)
      at org.hibernate.tuple.entity.EntityMetamodel.&lt;init&gt;(EntityMetamodel.java:181)
      at org.hibernate.persister.entity.AbstractEntityPersister.&lt;init&gt;(AbstractEntityPersister.java:485)
      at org.hibernate.persister.entity.SingleTableEntityPersister.&lt;init&gt;(SingleTableEntityPersister.java:133)
      at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:84)
      at org.hibernate.impl.SessionFactoryImpl.&lt;init&gt;(SessionFactoryImpl.java:286)
      at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1845)
      at eu.cartif.dwhconn.database.DBManager.checkDWHStatus(DBManager.java:57)
      at eu.cartif.dwhconn.database.DBManager.main(DBManager.java:24)
  </code></pre>
  
  <p>I think the problem could be the type of the property of the hbm file: </p>
  
  <pre><code>&lt;hibernate-mapping&gt;
  &lt;class name="eu.cartif.dwhconn.database.Ifcactorrole" table="IFCACTORROLE"&gt;
      &lt;id name="role" type="string"&gt;
          &lt;column name="ROLE" length="50" /&gt;
          &lt;generator class="assigned" /&gt;
      &lt;/id&gt;
      &lt;property name="userdefinedrole" type="string"&gt;
          &lt;column name="USERDEFINEDROLE" /&gt;
      &lt;/property&gt;
      &lt;property name="description" type="string"&gt;
          &lt;column name="DESCRIPTION" length="3000" /&gt;
      &lt;/property&gt;
      &lt;set name="ifcpersons" table="IFCPERSON" inverse="true" lazy="true" fetch="select"&gt;
          &lt;key&gt;
              &lt;column name="ROLES" length="50" /&gt;
          &lt;/key&gt;
          &lt;one-to-many class="eu.cartif.dwhconn.database.Ifcperson" /&gt;
      &lt;/set&gt;
      &lt;set name="ifcpersonandorganizations" table="IFCPERSONANDORGANIZATION" inverse="true" lazy="true" fetch="select"&gt;
          &lt;key&gt;
              &lt;column name="ROLES" length="50" /&gt;
          &lt;/key&gt;
          &lt;one-to-many class="eu.cartif.dwhconn.database.Ifcpersonandorganization" /&gt;
      &lt;/set&gt;
  &lt;/class&gt;
  &lt;/hibernate-mapping&gt;
  </code></pre>
  
  <p>However, I am not sure about it and I would not like to change all the types in all the hbms if that is not the solution. Anyone could help me, please.</p>
  
  <p>Thank you very much in advance,
  May you have a nice day</p>