Skip to Content
0

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

Aug 30, 2017 at 02:51 PM

23

avatar image
Former Member
//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.
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Richard Zhao
Nov 21, 2017 at 06:03 AM
0

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

Share
10 |10000 characters needed characters left characters exceeded