You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by bitanxen <bi...@gmail.com> on 2018/07/10 19:40:46 UTC

Ignite with Spring Boot Data JPA

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/

Re: Ignite with Spring Boot Data JPA

Posted by Pavel Vinokurov <vi...@gmail.com>.
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 Вячеслав Коптилин <sl...@gmail.com>:

> 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 <bi...@gmail.com>:
>
>> 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

Re: Ignite with Spring Boot Data JPA

Posted by Вячеслав Коптилин <sl...@gmail.com>.
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 <bi...@gmail.com>:

> 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/
>

Re: Ignite with Spring Boot Data JPA

Posted by John Heitor <jo...@heitorprojects.com>.
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 <bi...@gmail.com> 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/
>

Re: Ignite with Spring Boot Data JPA

Posted by bitanxen <bi...@gmail.com>.
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/

Re: Ignite with Spring Boot Data JPA

Posted by John Heitor <jo...@heitorprojects.com>.
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 <bi...@gmail.com> 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/
>

Re: Ignite with Spring Boot Data JPA

Posted by bitanxen <bi...@gmail.com>.
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/

Re: Ignite with Spring Boot Data JPA

Posted by John Heitor <jo...@heitorprojects.com>.
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

​