hql console 4 hibernate with annotaions

I can't seem to get the hql console working for hibernate with annotation mappings, always get this exception:

java.lang.RuntimeException: org.hibernate.MappingException: An AnnotationConfiguration instance is required to use <mapping />


<hibernate-configuration>
    <session-factory>
        <!-- HSQL -->
        <!-- Beispiel: jdbc:hsqldb:hsql://localhost/xdb -->
        <property name="dialect">ch.rtc.tech.dbAccess.dialect.BaDbs_HSQLDialect</property>
        <property name="connection.driver_class">org.hsqldb.jdbcDriver</property>
        <property name="connection.username">username</property>
        <property name="connection.password">password</property>
        <property name="show_sql">false</property>
        <property name="connection.url">jdbc:hsqldb:mem:xdb</property>    
        <mapping />    
    </session-factory>
</hibernate-configuration>





Language injection too isn't working

1 comment

Fixed. Now it is ensured that AnnotationConfiguration is created if "class" or "package" mappings are present in cfg.xml.

On 09.04.2010 14:20, Tilman Rossmy wrote:

I can't seem to get the hql console working for hibernate with annotation mappings, always get this exception:

>

java.lang.RuntimeException: org.hibernate.MappingException: An AnnotationConfiguration instance is required to use<mapping />

>
>

<hibernate-configuration>
     <session-factory>
         <!-- HSQL -->
         <!-- Beispiel: jdbc:hsqldb:hsql://localhost/xdb -->
         <property name="dialect">ch.rtc.tech.dbAccess.dialect.BaDbs_HSQLDialect</property>
         <property name="connection.driver_class">org.hsqldb.jdbcDriver</property>
         <property name="connection.username">username</property>
         <property name="connection.password">password</property>
         <property name="show_sql">false</property>
         <property name="connection.url">jdbc:hsqldb:mem:xdb</property>
         <mapping />
     </session-factory>
</hibernate-configuration>

>
>
>
>
>

Language injection too isn't working

>

---
Original message URL: http://www.jetbrains.net/devnet/message/5260439#5260439


0

Please sign in to leave a comment.