[jira] [Commented] (IGNITE-9031) SpringCacheManager throws AssertionError during Spring initialization

2018-08-16 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-9031?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16583218#comment-16583218
 ] 

ASF GitHub Bot commented on IGNITE-9031:


Github user asfgit closed the pull request at:

https://github.com/apache/ignite/pull/4511


> SpringCacheManager throws AssertionError during Spring initialization
> -
>
> Key: IGNITE-9031
> URL: https://issues.apache.org/jira/browse/IGNITE-9031
> Project: Ignite
>  Issue Type: Bug
>  Components: spring
>Affects Versions: 2.6
>Reporter: Joel Lang
>Assignee: Amir Akhmedov
>Priority: Major
> Fix For: 2.7
>
>
> When initializing Ignite using an IgniteSpringBean and also having a 
> SpringCacheManager defined, the SpringCacheManager throws an AssertionError 
> in the onApplicationEvent() method due to it being called more than once.
> There is an "assert ignite == null" that fails after the first call.
> This is related to the changes in IGNITE-8740. This happened immediately when 
> I first tried to start Ignite after upgrading from 2.5 to 2.6.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (IGNITE-9031) SpringCacheManager throws AssertionError during Spring initialization

2018-08-14 Thread Amir Akhmedov (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-9031?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16580194#comment-16580194
 ] 

Amir Akhmedov commented on IGNITE-9031:
---

[~vkulichenko], I don't think it's possible since {{ContextRefreshEvent}} is 
published once (when all initialization is done) and from application thread

[https://github.com/spring-projects/spring-framework/blob/master/spring-context/src/main/java/org/springframework/context/support/AbstractApplicationContext.java#L873]

Besides, I looked at documentation and found nothing about multi-threading.

> SpringCacheManager throws AssertionError during Spring initialization
> -
>
> Key: IGNITE-9031
> URL: https://issues.apache.org/jira/browse/IGNITE-9031
> Project: Ignite
>  Issue Type: Bug
>  Components: spring
>Affects Versions: 2.6
>Reporter: Joel Lang
>Assignee: Amir Akhmedov
>Priority: Major
>
> When initializing Ignite using an IgniteSpringBean and also having a 
> SpringCacheManager defined, the SpringCacheManager throws an AssertionError 
> in the onApplicationEvent() method due to it being called more than once.
> There is an "assert ignite == null" that fails after the first call.
> This is related to the changes in IGNITE-8740. This happened immediately when 
> I first tried to start Ignite after upgrading from 2.5 to 2.6.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (IGNITE-9031) SpringCacheManager throws AssertionError during Spring initialization

2018-08-13 Thread Valentin Kulichenko (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-9031?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16578968#comment-16578968
 ] 

Valentin Kulichenko commented on IGNITE-9031:
-

[~aakhmedov], change makes sense to me. However, just to make sure: does this 
need any synchronization? If {{onApplicationEvent}} method can be called by two 
threads concurrently, then the code is not thread-safe. But I would assume that 
Spring either always does this in a single thread, or has a sync lock. Can you 
please check this and confirm?

> SpringCacheManager throws AssertionError during Spring initialization
> -
>
> Key: IGNITE-9031
> URL: https://issues.apache.org/jira/browse/IGNITE-9031
> Project: Ignite
>  Issue Type: Bug
>  Components: spring
>Affects Versions: 2.6
>Reporter: Joel Lang
>Assignee: Amir Akhmedov
>Priority: Major
>
> When initializing Ignite using an IgniteSpringBean and also having a 
> SpringCacheManager defined, the SpringCacheManager throws an AssertionError 
> in the onApplicationEvent() method due to it being called more than once.
> There is an "assert ignite == null" that fails after the first call.
> This is related to the changes in IGNITE-8740. This happened immediately when 
> I first tried to start Ignite after upgrading from 2.5 to 2.6.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (IGNITE-9031) SpringCacheManager throws AssertionError during Spring initialization

2018-08-12 Thread Amir Akhmedov (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-9031?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16577656#comment-16577656
 ] 

Amir Akhmedov commented on IGNITE-9031:
---

[~vkulichenko], can you please review my changes?

> SpringCacheManager throws AssertionError during Spring initialization
> -
>
> Key: IGNITE-9031
> URL: https://issues.apache.org/jira/browse/IGNITE-9031
> Project: Ignite
>  Issue Type: Bug
>  Components: spring
>Affects Versions: 2.6
>Reporter: Joel Lang
>Assignee: Amir Akhmedov
>Priority: Major
>
> When initializing Ignite using an IgniteSpringBean and also having a 
> SpringCacheManager defined, the SpringCacheManager throws an AssertionError 
> in the onApplicationEvent() method due to it being called more than once.
> There is an "assert ignite == null" that fails after the first call.
> This is related to the changes in IGNITE-8740. This happened immediately when 
> I first tried to start Ignite after upgrading from 2.5 to 2.6.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (IGNITE-9031) SpringCacheManager throws AssertionError during Spring initialization

2018-08-09 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-9031?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16575745#comment-16575745
 ] 

ASF GitHub Bot commented on IGNITE-9031:


GitHub user amirakhmedov opened a pull request:

https://github.com/apache/ignite/pull/4511

IGNITE-9031: SpringCacheManager throws AssertionError during Spring i…

…nitialization

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/amirakhmedov/ignite IGNITE-9031

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/ignite/pull/4511.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #4511


commit e8c4b0f96c1ee107fbc024caebdd7323ee17bba4
Author: Amir Akhmedov 
Date:   2018-08-10T04:25:28Z

IGNITE-9031: SpringCacheManager throws AssertionError during Spring 
initialization




> SpringCacheManager throws AssertionError during Spring initialization
> -
>
> Key: IGNITE-9031
> URL: https://issues.apache.org/jira/browse/IGNITE-9031
> Project: Ignite
>  Issue Type: Bug
>  Components: spring
>Affects Versions: 2.6
>Reporter: Joel Lang
>Assignee: Amir Akhmedov
>Priority: Major
>
> When initializing Ignite using an IgniteSpringBean and also having a 
> SpringCacheManager defined, the SpringCacheManager throws an AssertionError 
> in the onApplicationEvent() method due to it being called more than once.
> There is an "assert ignite == null" that fails after the first call.
> This is related to the changes in IGNITE-8740. This happened immediately when 
> I first tried to start Ignite after upgrading from 2.5 to 2.6.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (IGNITE-9031) SpringCacheManager throws AssertionError during Spring initialization

2018-07-19 Thread Joel Lang (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-9031?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16549421#comment-16549421
 ] 

Joel Lang commented on IGNITE-9031:
---

[~aakhmedov] you described the setup I have. Ignite is being started inside of 
a host application which creates more than one {{ApplicationContext}}. This 
isn't Spring MVC.

This host application first creates a {{FileSystemXmlApplicationContext}} using 
root-app-context.xml, which imports ignite.xml.

Later it creates another {{ClassPathXmlApplicationContext}} using 
extensions.xml which uses the previously created context as its parent. This is 
the line in the stack trace when the assertion happens. This would be the root 
cause.

I can post a stripped-down version of the root-app-context.xml and ignite.xml:

*root-app-context.xml:*
{code:xml}

http://www.springframework.org/schema/beans";
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
   xsi:schemaLocation="http://www.springframework.org/schema/beans 
http://www.springframework.org/schema/beans/spring-beans-4.3.xsd";>




cluster.properties









{code}
*ignite.xml:*
{code:xml}

http://www.springframework.org/schema/beans";
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
   xmlns:util="http://www.springframework.org/schema/util";
   xsi:schemaLocation="
   http://www.springframework.org/schema/beans
   http://www.springframework.org/schema/beans/spring-beans-4.3.xsd
   http://www.springframework.org/schema/util
   http://www.springframework.org/schema/util/spring-util-4.3.xsd";>














 
 
 
















{code}

> SpringCacheManager throws AssertionError during Spring initialization
> -
>
> Key: IGNITE-9031
> URL: https://issues.apache.org/jira/browse/IGNITE-9031
> Project: Ignite
>  Issue Type: Bug
>  Components: spring
>Affects Versions: 2.6
>Reporter: Joel Lang
>Assignee: Amir Akhmedov
>Priority: Major
>
> When initializing Ignite using an IgniteSpringBean and also having a 
> SpringCacheManager defined, the SpringCacheManager throws an AssertionError 
> in the onApplicationEvent() method due to it being called more than once.
> There is an "assert ignite == null" that fails after the first call.
> This is related to the changes in IGNITE-8740. This happened immediately when 
> I first tried to start Ignite after upgrading from 2.5 to 2.6.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (IGNITE-9031) SpringCacheManager throws AssertionError during Spring initialization

2018-07-18 Thread Amir Akhmedov (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-9031?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16548720#comment-16548720
 ] 

Amir Akhmedov commented on IGNITE-9031:
---

[~vkulichenko], the only case it can happen, as I see so far, when 
{{ApplicationContext}} which creates {{IgniteSpringBean}} is used as a parent 
for another {{ApplicationContext}}. In this case {{ContextRefreshedEvent}} from 
child will be propagated to the parent. This might be a case of Spring MVC 
application.

[~langj], can you please share your spring configuration, it will help to 
understand the root cause.

> SpringCacheManager throws AssertionError during Spring initialization
> -
>
> Key: IGNITE-9031
> URL: https://issues.apache.org/jira/browse/IGNITE-9031
> Project: Ignite
>  Issue Type: Bug
>  Components: spring
>Affects Versions: 2.6
>Reporter: Joel Lang
>Priority: Major
>
> When initializing Ignite using an IgniteSpringBean and also having a 
> SpringCacheManager defined, the SpringCacheManager throws an AssertionError 
> in the onApplicationEvent() method due to it being called more than once.
> There is an "assert ignite == null" that fails after the first call.
> This is related to the changes in IGNITE-8740. This happened immediately when 
> I first tried to start Ignite after upgrading from 2.5 to 2.6.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (IGNITE-9031) SpringCacheManager throws AssertionError during Spring initialization

2018-07-18 Thread Valentin Kulichenko (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-9031?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16548320#comment-16548320
 ] 

Valentin Kulichenko commented on IGNITE-9031:
-

[~aakhmedov], since you implemented the change in IGNITE-8740, can you please 
take a look at this issue? What are the cases when {{onApplicationEvent}} is 
called more than once?

> SpringCacheManager throws AssertionError during Spring initialization
> -
>
> Key: IGNITE-9031
> URL: https://issues.apache.org/jira/browse/IGNITE-9031
> Project: Ignite
>  Issue Type: Bug
>  Components: spring
>Affects Versions: 2.6
>Reporter: Joel Lang
>Priority: Major
>
> When initializing Ignite using an IgniteSpringBean and also having a 
> SpringCacheManager defined, the SpringCacheManager throws an AssertionError 
> in the onApplicationEvent() method due to it being called more than once.
> There is an "assert ignite == null" that fails after the first call.
> This is related to the changes in IGNITE-8740. This happened immediately when 
> I first tried to start Ignite after upgrading from 2.5 to 2.6.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (IGNITE-9031) SpringCacheManager throws AssertionError during Spring initialization

2018-07-18 Thread Valentin Kulichenko (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-9031?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16548311#comment-16548311
 ] 

Valentin Kulichenko commented on IGNITE-9031:
-

[~langj], can you please attach your configuration?

> SpringCacheManager throws AssertionError during Spring initialization
> -
>
> Key: IGNITE-9031
> URL: https://issues.apache.org/jira/browse/IGNITE-9031
> Project: Ignite
>  Issue Type: Bug
>  Components: spring
>Affects Versions: 2.6
>Reporter: Joel Lang
>Priority: Major
>
> When initializing Ignite using an IgniteSpringBean and also having a 
> SpringCacheManager defined, the SpringCacheManager throws an AssertionError 
> in the onApplicationEvent() method due to it being called more than once.
> There is an "assert ignite == null" that fails after the first call.
> This is related to the changes in IGNITE-8740. This happened immediately when 
> I first tried to start Ignite after upgrading from 2.5 to 2.6.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)