Skip to Content
avatar image
Former Member

I am facing a dialect problem while connecting an odata service with hanadb ?

//persistence.xml

<persistence-unit name="odataJPAService"
        transaction-type="RESOURCE_LOCAL">
        <provider>org.hibernate.ejb.HibernatePersistence</provider>
        <class>com.airdit.model.Parts</class>
        <class>com.airdit.model.ShipVia</class>
        <class>com.airdit.model.Supplier</class>
        <class>com.airdit.model.SupplierStatus</class>
        <class>com.airdit.model.SupplierParts</class>
        <exclude-unlisted-classes>true</exclude-unlisted-classes>
        <properties>
          <property name="hibernate.dialect" value="org.hibernate.dialect.HANARowStoreDialect"></property>
         <property name="hibernate.connection.datasource" value="java:comp/env/jdbc/DefaultDB"></property>
        <property name="hibernate.hbm2ddl.auto" value="create"></property>
        <property name="hibernate.default_schema" value="ODATA"></property>
        
        <!--  
        
            <property name="javax.persistence.jdbc.user" value="root" />
            <property name="javax.persistence.jdbc.password" value="root" />
            <property name="javax.persistence.jdbc.url" value="jdbc:mysql://localhost:3306/odata" />
            <property name="hibernate.connection.driver_class" value="com.mysql.jdbc.Driver"></property>
            <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect" />
            <property name="hibernate.max_fetch_depth" value="3" />
            <property name="hibernate.hbm2ddl.auto" value="update"></property>
            <property name="jboss.as.jpa.providerModule" value="hibernate3-bundled" 
                
                -->
            <property name="hibernate.show_sql" value="true" />
            <property name="hibernate.format_sql" value="true" />
        </properties>
    </persistence-unit>
</persistence>

 //when i try to connect my application with hanadb i am getting an hibernate exception specifying dialect property not matching can somebody suggest me what to do.
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Nov 21, 2017 at 06:03 AM

    Hello Suresh, As i know Hibernate support two kinds of types dialect for Hana Database. Please double confirm your database store setting by using column store or row store. The dialect should be matched with database store type. thanks.

    SAP HANA (column store)org.hibernate.dialect.HANAColumnStoreDialect

    SAP HANA (row store)org.hibernate.dialect.HANARowStoreDialect

    Add comment
    10|10000 characters needed characters exceeded