Ignite with Spring Boot Data JPA

classic Classic list List threaded Threaded
8 messages Options
bitanxen bitanxen
Reply | Threaded
Open this post in threaded view
|

Ignite with Spring Boot Data JPA

This post was updated on .
Hi, I have a running a ignite cluster. Now from my spring boot maven project which is dependent on spring-data-jpa where the jdbc datasource is configured with Ignite. But it's giving me an error that hibernate entitymanager bean is not initialised because it didn't find hibernate.dialect.

Is there any working configuration for Ingite JDBC with Spring Data
JPA??



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
slava.koptilin slava.koptilin
Reply | Threaded
Open this post in threaded view
|

Re: Ignite with Spring Boot Data JPA

Hello,

I don't think I clearly understand the issue you faced.
Please provide more details about the problem so that the community can help you.
Could create a small reproducer project and share it on GitHub?
By the way, the log file from the server node will be helpful as well.

Thanks,
S.

вт, 10 июл. 2018 г. в 22:40, bitanxen <[hidden email]>:
Hi, I have a running a ignite cluster. Now from my spring boot maven project
which is dependent on spring-data-jpa where the jdbc datasource is
configured with Ignite. But it's giving me an error that hibernate
entitymanager bean is not initialised because it didn't find
hibernate.dialect.

Is there any working day configuration for Ingite JDBC with Spring Data
JPA??



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Pavel Vinokurov Pavel Vinokurov
Reply | Threaded
Open this post in threaded view
|

Re: Ignite with Spring Boot Data JPA

Hi

Ignite uses H2 syntax, so you could set H2 dialect:
   <property name="hibernate.dialect" value="org.hibernate.dialect.H2Dialect"/>

Thanks,
Pavel

2018-07-11 0:46 GMT+03:00 Вячеслав Коптилин <[hidden email]>:
Hello,

I don't think I clearly understand the issue you faced.
Please provide more details about the problem so that the community can help you.
Could create a small reproducer project and share it on GitHub?
By the way, the log file from the server node will be helpful as well.

Thanks,
S.

вт, 10 июл. 2018 г. в 22:40, bitanxen <[hidden email]>:
Hi, I have a running a ignite cluster. Now from my spring boot maven project
which is dependent on spring-data-jpa where the jdbc datasource is
configured with Ignite. But it's giving me an error that hibernate
entitymanager bean is not initialised because it didn't find
hibernate.dialect.

Is there any working day configuration for Ingite JDBC with Spring Data
JPA??



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/



--

Regards

Pavel Vinokurov

John Heitor John Heitor
Reply | Threaded
Open this post in threaded view
|

Re: Ignite with Spring Boot Data JPA

In reply to this post by bitanxen
Hi,
I am not too sure if this will help but this is my current setup that I have working on Ignite 2.4.

jpa.database-platform: org.hibernate.dialect.H2Dialect 

and have the following Maven dependency.

        <dependency>
            <groupId>com.h2database</groupId>
            <artifactId>h2</artifactId>
            <version>1.4.196</version>
        </dependency>


Since Spring Boot 2.0 I have also had to exclude the following:

        <dependency>
            <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-data-jpa</artifactId>
                <exclusions>
                    <exclusion>
                        <groupId>com.zaxxer</groupId>
                        <artifactId>HikariCP</artifactId>
                    </exclusion>
                </exclusions>
        </dependency>

All seems to work fine.

Hope this helps.

John

bitanxen bitanxen
Reply | Threaded
Open this post in threaded view
|

Re: Ignite with Spring Boot Data JPA

Hi John,

Thanks a lot for the reply. I will test this out in my setup. Hope this will
help me. Just one question, if you are excluding HikariCP, then how the
Datasource will be created using ignite cluster's URL and credentials?





--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
John Heitor John Heitor
Reply | Threaded
Open this post in threaded view
|

Re: Ignite with Spring Boot Data JPA

Hi,
I did forget to mention that Spring boot would not start correctly with Hikari. I therefore also had to add Tomcat jdbc dependency.
        <dependency>
            <groupId>org.apache.tomcat</groupId>
            <artifactId>tomcat-jdbc</artifactId>
        </dependency>        


On Wed, Jul 11, 2018 at 7:33 AM bitanxen <[hidden email]> wrote:
Hi John,

Thanks a lot for the reply. I will test this out in my setup. Hope this will
help me. Just one question, if you are excluding HikariCP, then how the
Datasource will be created using ignite cluster's URL and credentials?





--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
bitanxen bitanxen
Reply | Threaded
Open this post in threaded view
|

Re: Ignite with Spring Boot Data JPA

Hi John,

after adding h2 db dependency and h2 dialect, it is working like charm.

Just to mention, I haven't executed HikariCP from dependency, So means it
works with it too.

Many thanks for your suggestion.



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
John Heitor John Heitor
Reply | Threaded
Open this post in threaded view
|

Re: Ignite with Spring Boot Data JPA

Great news, glad you managed to get it up and running. I have currently put my Ignite implementation on the back burner due to the fact that it is not yet supporting sql transactions but definitely plan on getting back onto it. Perhaps you can then help me with my HikariCP issue. 

Cheers

On Wed, Jul 11, 2018 at 3:39 PM bitanxen <[hidden email]> wrote:
Hi John,

after adding h2 db dependency and h2 dialect, it is working like charm.

Just to mention, I haven't executed HikariCP from dependency, So means it
works with it too.

Many thanks for your suggestion.



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/