You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ignite.apache.org by Вадим Опольский <va...@gmail.com> on 2017/03/27 14:14:44 UTC

Re: IGNITE - 4760 : working in hibernate module

Valentin, OK.

To enabled it in my environment I done next:
- built project with command - mvn clean package -DskipTests -Prelease,lgpl
- added folder hibernate to modules in project structure
- added library to dependencies (without it import doesn't working)

After that I have a lot of error, for instance:
- Class 'AccessStrategy' must either be declared abstract or implement
abstract method 'remove(SharedSessionContractImplementor, Object) in
'RegionAccessStrategy'

generateCacheKey
getCacheKeyId
getRegion
insert
afterInsert
update
afterUpdate
insert
afterInsert
update
get
putFromLoad
lockItem
unlockItem
remove

Do anybody know the easier way to resolve this issue?

Also tried to reimport all maven projects and cleansed repository in .m2.

Vadim Opolski

[image: Встроенное изображение 1]







2017-03-25 2:42 GMT+03:00 Valentin Kulichenko <valentin.kulichenko@gmail.com
>:

> Vadim,
>
> ignite-hibernate module is a part of 'lgpl' profile. Apparently it's not
> enabled in your environment.
>
> -Val
>
> On Fri, Mar 24, 2017 at 4:38 PM, Вадим Опольский <va...@gmail.com>
> wrote:
>
> > Hello everybody,
> >
> > I want to resolve issue №4760
> > https://issues.apache.org/jira/browse/IGNITE-4760
> >
> > To find solution I'm going to change method threadLocalForCache and to
> add
> > Junit test.
> >
> > Why folder hibernate is not a module ? Can I added it ?
> >
> > Vadim Opolski
> >
>

Re: IGNITE - 4760 : working in hibernate module

Posted by Вадим Опольский <va...@gmail.com>.
Denis, review please this test. The problem was recreated in the
updating part ( //updating ).

https://github.com/vadopolski/ignite/pull/1/files
<https://github.com/vadopolski/ignite/pull/1/files>

Changes supposed by Cameron Braid in threadLocalForCache method doesn't
make the test successfully executed. Perhaps, the issue is necessary to
resolve by another way.
Do you have any idea how to fix it?

Vadim



2017-04-05 21:58 GMT+03:00 Denis Magda <dm...@apache.org>:

> > How to reproduce situation when updates can be recorded to another
> region?
>
> Don’t you just need to define multiple caches that will be mapped to
> Hibernate regions and initiate a transaction that updates several regions
> (caches) at once?
>
> —
> Denis
>
> > On Apr 3, 2017, at 10:39 AM, Вадим Опольский <va...@gmail.com>
> wrote:
> >
> > Hello everyone!
> >
> > I added some change to method threadLocalForCache  and added test
> > testEntityCacheNonStrictFails.
> >
> > How to reproduce situation when updates can be recorded to another
> region?
> >
> > https://github.com/vadopolski/ignite/blob/5aa25f3830fef14ac507ed73872d62
> b2969a7411/modules/hibernate/src/main/java/org/apache/
> ignite/cache/hibernate/HibernateRegionFactory.java
> >
> > https://github.com/vadopolski/ignite/blob/5aa25f3830fef14ac507ed73872d62
> b2969a7411/modules/hibernate/src/test/java/org/apache/
> ignite/cache/hibernate/HibernateL2CacheConfigurationSelfTest.java
> >
> > PullRequest
> > https://github.com/vadopolski/ignite/pull/4/files
> >
> > Vadim
> >
> >
> >
> > 2017-03-27 18:20 GMT+03:00 Denis Magda <dm...@apache.org>:
> >
> >> Vadim,
> >>
> >> What IDE do you use? My recommendation would be to set up everything
> let’s
> >> say under IntellijIDEA or Eclipse and after that trying to compile from
> a
> >> terminal.
> >>
> >> This is how you can easily prepare the dev env in IntellijIDEA:
> >> https://cwiki.apache.org/confluence/display/IGNITE/Project+Setup <
> >> https://cwiki.apache.org/confluence/display/IGNITE/Project+Setup>
> >>
> >> —
> >> Denis
> >>
> >>> On Mar 27, 2017, at 7:14 AM, Вадим Опольский <va...@gmail.com>
> >> wrote:
> >>>
> >>> Valentin, OK.
> >>>
> >>> To enabled it in my environment I done next:
> >>> - built project with command - mvn clean package -DskipTests
> >> -Prelease,lgpl
> >>> - added folder hibernate to modules in project structure
> >>> - added library to dependencies (without it import doesn't working)
> >>>
> >>> After that I have a lot of error, for instance:
> >>> - Class 'AccessStrategy' must either be declared abstract or implement
> >> abstract method 'remove(SharedSessionContractImplementor, Object) in
> >> 'RegionAccessStrategy'
> >>>
> >>> generateCacheKey
> >>> getCacheKeyId
> >>> getRegion
> >>> insert
> >>> afterInsert
> >>> update
> >>> afterUpdate
> >>> insert
> >>> afterInsert
> >>> update
> >>> get
> >>> putFromLoad
> >>> lockItem
> >>> unlockItem
> >>> remove
> >>>
> >>> Do anybody know the easier way to resolve this issue?
> >>>
> >>> Also tried to reimport all maven projects and cleansed repository in
> .m2.
> >>> Vadim Opolski
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>> 2017-03-25 2:42 GMT+03:00 Valentin Kulichenko <
> >> valentin.kulichenko@gmail.com <ma...@gmail.com>>:
> >>> Vadim,
> >>>
> >>> ignite-hibernate module is a part of 'lgpl' profile. Apparently it's
> not
> >>> enabled in your environment.
> >>>
> >>> -Val
> >>>
> >>> On Fri, Mar 24, 2017 at 4:38 PM, Вадим Опольский <vaopolskij@gmail.com
> >> <ma...@gmail.com>>
> >>> wrote:
> >>>
> >>>> Hello everybody,
> >>>>
> >>>> I want to resolve issue №4760
> >>>> https://issues.apache.org/jira/browse/IGNITE-4760 <
> >> https://issues.apache.org/jira/browse/IGNITE-4760>
> >>>>
> >>>> To find solution I'm going to change method threadLocalForCache and to
> >> add
> >>>> Junit test.
> >>>>
> >>>> Why folder hibernate is not a module ? Can I added it ?
> >>>>
> >>>> Vadim Opolski
> >>>>
> >>>
> >>
> >>
>
>

Re: IGNITE - 4760 : working in hibernate module

Posted by Denis Magda <dm...@apache.org>.
> How to reproduce situation when updates can be recorded to another region?

Don’t you just need to define multiple caches that will be mapped to Hibernate regions and initiate a transaction that updates several regions (caches) at once?

—
Denis

> On Apr 3, 2017, at 10:39 AM, Вадим Опольский <va...@gmail.com> wrote:
> 
> Hello everyone!
> 
> I added some change to method threadLocalForCache  and added test
> testEntityCacheNonStrictFails.
> 
> How to reproduce situation when updates can be recorded to another region?
> 
> https://github.com/vadopolski/ignite/blob/5aa25f3830fef14ac507ed73872d62b2969a7411/modules/hibernate/src/main/java/org/apache/ignite/cache/hibernate/HibernateRegionFactory.java
> 
> https://github.com/vadopolski/ignite/blob/5aa25f3830fef14ac507ed73872d62b2969a7411/modules/hibernate/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheConfigurationSelfTest.java
> 
> PullRequest
> https://github.com/vadopolski/ignite/pull/4/files
> 
> Vadim
> 
> 
> 
> 2017-03-27 18:20 GMT+03:00 Denis Magda <dm...@apache.org>:
> 
>> Vadim,
>> 
>> What IDE do you use? My recommendation would be to set up everything let’s
>> say under IntellijIDEA or Eclipse and after that trying to compile from a
>> terminal.
>> 
>> This is how you can easily prepare the dev env in IntellijIDEA:
>> https://cwiki.apache.org/confluence/display/IGNITE/Project+Setup <
>> https://cwiki.apache.org/confluence/display/IGNITE/Project+Setup>
>> 
>> —
>> Denis
>> 
>>> On Mar 27, 2017, at 7:14 AM, Вадим Опольский <va...@gmail.com>
>> wrote:
>>> 
>>> Valentin, OK.
>>> 
>>> To enabled it in my environment I done next:
>>> - built project with command - mvn clean package -DskipTests
>> -Prelease,lgpl
>>> - added folder hibernate to modules in project structure
>>> - added library to dependencies (without it import doesn't working)
>>> 
>>> After that I have a lot of error, for instance:
>>> - Class 'AccessStrategy' must either be declared abstract or implement
>> abstract method 'remove(SharedSessionContractImplementor, Object) in
>> 'RegionAccessStrategy'
>>> 
>>> generateCacheKey
>>> getCacheKeyId
>>> getRegion
>>> insert
>>> afterInsert
>>> update
>>> afterUpdate
>>> insert
>>> afterInsert
>>> update
>>> get
>>> putFromLoad
>>> lockItem
>>> unlockItem
>>> remove
>>> 
>>> Do anybody know the easier way to resolve this issue?
>>> 
>>> Also tried to reimport all maven projects and cleansed repository in .m2.
>>> Vadim Opolski
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 2017-03-25 2:42 GMT+03:00 Valentin Kulichenko <
>> valentin.kulichenko@gmail.com <ma...@gmail.com>>:
>>> Vadim,
>>> 
>>> ignite-hibernate module is a part of 'lgpl' profile. Apparently it's not
>>> enabled in your environment.
>>> 
>>> -Val
>>> 
>>> On Fri, Mar 24, 2017 at 4:38 PM, Вадим Опольский <vaopolskij@gmail.com
>> <ma...@gmail.com>>
>>> wrote:
>>> 
>>>> Hello everybody,
>>>> 
>>>> I want to resolve issue №4760
>>>> https://issues.apache.org/jira/browse/IGNITE-4760 <
>> https://issues.apache.org/jira/browse/IGNITE-4760>
>>>> 
>>>> To find solution I'm going to change method threadLocalForCache and to
>> add
>>>> Junit test.
>>>> 
>>>> Why folder hibernate is not a module ? Can I added it ?
>>>> 
>>>> Vadim Opolski
>>>> 
>>> 
>> 
>> 


Re: IGNITE - 4760 : working in hibernate module

Posted by Вадим Опольский <va...@gmail.com>.
Hello everyone!

I added some change to method threadLocalForCache  and added test
testEntityCacheNonStrictFails.

How to reproduce situation when updates can be recorded to another region?

https://github.com/vadopolski/ignite/blob/5aa25f3830fef14ac507ed73872d62b2969a7411/modules/hibernate/src/main/java/org/apache/ignite/cache/hibernate/HibernateRegionFactory.java

https://github.com/vadopolski/ignite/blob/5aa25f3830fef14ac507ed73872d62b2969a7411/modules/hibernate/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheConfigurationSelfTest.java

PullRequest
https://github.com/vadopolski/ignite/pull/4/files

Vadim



2017-03-27 18:20 GMT+03:00 Denis Magda <dm...@apache.org>:

> Vadim,
>
> What IDE do you use? My recommendation would be to set up everything let’s
> say under IntellijIDEA or Eclipse and after that trying to compile from a
> terminal.
>
> This is how you can easily prepare the dev env in IntellijIDEA:
> https://cwiki.apache.org/confluence/display/IGNITE/Project+Setup <
> https://cwiki.apache.org/confluence/display/IGNITE/Project+Setup>
>
> —
> Denis
>
> > On Mar 27, 2017, at 7:14 AM, Вадим Опольский <va...@gmail.com>
> wrote:
> >
> > Valentin, OK.
> >
> > To enabled it in my environment I done next:
> > - built project with command - mvn clean package -DskipTests
> -Prelease,lgpl
> > - added folder hibernate to modules in project structure
> > - added library to dependencies (without it import doesn't working)
> >
> > After that I have a lot of error, for instance:
> > - Class 'AccessStrategy' must either be declared abstract or implement
> abstract method 'remove(SharedSessionContractImplementor, Object) in
> 'RegionAccessStrategy'
> >
> > generateCacheKey
> > getCacheKeyId
> > getRegion
> > insert
> > afterInsert
> > update
> > afterUpdate
> > insert
> > afterInsert
> > update
> > get
> > putFromLoad
> > lockItem
> > unlockItem
> > remove
> >
> > Do anybody know the easier way to resolve this issue?
> >
> > Also tried to reimport all maven projects and cleansed repository in .m2.
> > Vadim Opolski
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > 2017-03-25 2:42 GMT+03:00 Valentin Kulichenko <
> valentin.kulichenko@gmail.com <ma...@gmail.com>>:
> > Vadim,
> >
> > ignite-hibernate module is a part of 'lgpl' profile. Apparently it's not
> > enabled in your environment.
> >
> > -Val
> >
> > On Fri, Mar 24, 2017 at 4:38 PM, Вадим Опольский <vaopolskij@gmail.com
> <ma...@gmail.com>>
> > wrote:
> >
> > > Hello everybody,
> > >
> > > I want to resolve issue №4760
> > > https://issues.apache.org/jira/browse/IGNITE-4760 <
> https://issues.apache.org/jira/browse/IGNITE-4760>
> > >
> > > To find solution I'm going to change method threadLocalForCache and to
> add
> > > Junit test.
> > >
> > > Why folder hibernate is not a module ? Can I added it ?
> > >
> > > Vadim Opolski
> > >
> >
>
>

Re: IGNITE - 4760 : working in hibernate module

Posted by Вадим Опольский <va...@gmail.com>.
Denis, thank you for instruction.

I've successfully applied it:

1) cloned project by my fork - https://github.com/vadopolski/ignite
2) created project from existing sources
3) built it - mvn clean package -DskipTests -Prelease,lgpl
4) created module from existing sources (import module from external model)

Vadim Opolski

2017-03-27 18:20 GMT+03:00 Denis Magda <dm...@apache.org>:

> Vadim,
>
> What IDE do you use? My recommendation would be to set up everything let’s
> say under IntellijIDEA or Eclipse and after that trying to compile from a
> terminal.
>
> This is how you can easily prepare the dev env in IntellijIDEA:
> https://cwiki.apache.org/confluence/display/IGNITE/Project+Setup <
> https://cwiki.apache.org/confluence/display/IGNITE/Project+Setup>
>
> —
> Denis
>
> > On Mar 27, 2017, at 7:14 AM, Вадим Опольский <va...@gmail.com>
> wrote:
> >
> > Valentin, OK.
> >
> > To enabled it in my environment I done next:
> > - built project with command - mvn clean package -DskipTests
> -Prelease,lgpl
> > - added folder hibernate to modules in project structure
> > - added library to dependencies (without it import doesn't working)
> >
> > After that I have a lot of error, for instance:
> > - Class 'AccessStrategy' must either be declared abstract or implement
> abstract method 'remove(SharedSessionContractImplementor, Object) in
> 'RegionAccessStrategy'
> >
> > generateCacheKey
> > getCacheKeyId
> > getRegion
> > insert
> > afterInsert
> > update
> > afterUpdate
> > insert
> > afterInsert
> > update
> > get
> > putFromLoad
> > lockItem
> > unlockItem
> > remove
> >
> > Do anybody know the easier way to resolve this issue?
> >
> > Also tried to reimport all maven projects and cleansed repository in .m2.
> > Vadim Opolski
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > 2017-03-25 2:42 GMT+03:00 Valentin Kulichenko <
> valentin.kulichenko@gmail.com <ma...@gmail.com>>:
> > Vadim,
> >
> > ignite-hibernate module is a part of 'lgpl' profile. Apparently it's not
> > enabled in your environment.
> >
> > -Val
> >
> > On Fri, Mar 24, 2017 at 4:38 PM, Вадим Опольский <vaopolskij@gmail.com
> <ma...@gmail.com>>
> > wrote:
> >
> > > Hello everybody,
> > >
> > > I want to resolve issue №4760
> > > https://issues.apache.org/jira/browse/IGNITE-4760 <
> https://issues.apache.org/jira/browse/IGNITE-4760>
> > >
> > > To find solution I'm going to change method threadLocalForCache and to
> add
> > > Junit test.
> > >
> > > Why folder hibernate is not a module ? Can I added it ?
> > >
> > > Vadim Opolski
> > >
> >
>
>

Re: IGNITE - 4760 : working in hibernate module

Posted by Denis Magda <dm...@apache.org>.
Vadim, 

What IDE do you use? My recommendation would be to set up everything let’s say under IntellijIDEA or Eclipse and after that trying to compile from a terminal.

This is how you can easily prepare the dev env in IntellijIDEA:
https://cwiki.apache.org/confluence/display/IGNITE/Project+Setup <https://cwiki.apache.org/confluence/display/IGNITE/Project+Setup>

—
Denis

> On Mar 27, 2017, at 7:14 AM, Вадим Опольский <va...@gmail.com> wrote:
> 
> Valentin, OK.
> 
> To enabled it in my environment I done next:
> - built project with command - mvn clean package -DskipTests -Prelease,lgpl
> - added folder hibernate to modules in project structure
> - added library to dependencies (without it import doesn't working)
> 
> After that I have a lot of error, for instance:
> - Class 'AccessStrategy' must either be declared abstract or implement abstract method 'remove(SharedSessionContractImplementor, Object) in 'RegionAccessStrategy'
> 
> generateCacheKey
> getCacheKeyId
> getRegion
> insert
> afterInsert
> update
> afterUpdate
> insert
> afterInsert
> update
> get
> putFromLoad
> lockItem
> unlockItem
> remove
> 
> Do anybody know the easier way to resolve this issue?
> 
> Also tried to reimport all maven projects and cleansed repository in .m2.
> Vadim Opolski
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 2017-03-25 2:42 GMT+03:00 Valentin Kulichenko <valentin.kulichenko@gmail.com <ma...@gmail.com>>:
> Vadim,
> 
> ignite-hibernate module is a part of 'lgpl' profile. Apparently it's not
> enabled in your environment.
> 
> -Val
> 
> On Fri, Mar 24, 2017 at 4:38 PM, Вадим Опольский <vaopolskij@gmail.com <ma...@gmail.com>>
> wrote:
> 
> > Hello everybody,
> >
> > I want to resolve issue №4760
> > https://issues.apache.org/jira/browse/IGNITE-4760 <https://issues.apache.org/jira/browse/IGNITE-4760>
> >
> > To find solution I'm going to change method threadLocalForCache and to add
> > Junit test.
> >
> > Why folder hibernate is not a module ? Can I added it ?
> >
> > Vadim Opolski
> >
>