2 Replies Latest reply on Apr 14, 2011 1:28 PM by ecchuckles

    trouble configuring hibernate assembler

    ecchuckles Level 1

      good day,

           I'm trying to configure a hibernate assembler using the lcds 4.5 beta, When I start lcds I get the following error message:

      Caused by: org.hibernate.MappingException: An AnnotationConfiguration instance is required to use <mapping class="my.model.db.TestClass"...


      the recomendation from googling the error message,  is that I need to set the session factory to use the annotationConfiguration where do I do this within wth lcds context?

      I'm using an annotated class created from fml using the server side generator.

      here is my hibernate.cfg.xml

      <?xml version='1.0' encoding='utf-8'?>
      <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
                      <!-- Database connection settings. -->
                      <property name="connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
                      <property name="connection.url">
                      <property name="connection.username">
                      <property name="connection.password">
                      <!-- JDBC connection pool (use the built-in). -->
                      <property name="connection.pool_size">
                      <!-- SQL dialect. -->
                      <property name="dialect">org.hibernate.dialect.Oracle10gDialect</property>
                      <!-- Enable the Hibernate automatic session context management. -->
                      <property name="current_session_context_class">thread</property>
                      <!-- Disable the second-level cache. -->
                      <property name="cache.provider_class">
                      <property name="show_sql">true</property>
      <mapping class="my.model.db.TestClass" />
                      <!-- Echo all executed SQL to stdout. -->