<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><a href="https://issues.jboss.org/browse/ISPN-2232">https://issues.jboss.org/browse/ISPN-2232</a></div><div><br></div><div>Tnx.</div><div><br class="Apple-interchange-newline"><blockquote type="cite">That's a bug. We have tests that check stop/start/stop procedure:<br><a href="https://github.com/infinispan/infinispan/blob/master/core/src/test/java/org/infinispan/jmx/CacheMBeanTest.java#L55">https://github.com/infinispan/infinispan/blob/master/core/src/test/java/org/infinispan/jmx/CacheMBeanTest.java#L55</a><br><br>But not tests that check that procedure with the query module in.<br><br>Fill it in http://issues.jboss.org/browse/ISPN and we'll sort it out.<br><br>Cheers,<br><br>On Aug 27, 2012, at 11:15 PM, Ales Justin wrote:<br><br><blockquote type="cite">Uh, the workaround results in NPE:<br><br>23:10:27,160 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host]] (http-/192.168.1.101:8080-2) Exception sending request initialized lifecycle event to listener instance of class org.jboss.capedwarf.appidentity.GAEListener: java.lang.NullPointerException<br><span class="Apple-tab-span" style="white-space:pre">        </span>at org.infinispan.query.impl.LifecycleManager.cacheStarted(LifecycleManager.java:125)<br><span class="Apple-tab-span" style="white-space:pre">        </span>at org.infinispan.factories.ComponentRegistry.start(ComponentRegistry.java:178) [infinispan-core-5.2.0.ALPHA2.jar:5.2.0.ALPHA2]<br><span class="Apple-tab-span" style="white-space:pre">        </span>at org.infinispan.CacheImpl.start(CacheImpl.java:523) [infinispan-core-5.2.0.ALPHA2.jar:5.2.0.ALPHA2]<br><span class="Apple-tab-span" style="white-space:pre">        </span>at org.infinispan.AbstractDelegatingCache.start(AbstractDelegatingCache.java:343) [infinispan-core-5.2.0.ALPHA2.jar:5.2.0.ALPHA2]<br><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jboss.capedwarf.common.infinispan.InfinispanUtils.checkCache(InfinispanUtils.java:72) [capedwarf-common-1.0.0-SNAPSHOT.jar:1.0.0-SNAPSHOT]<br><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jboss.capedwarf.common.infinispan.InfinispanUtils.getCache(InfinispanUtils.java:82) [capedwarf-common-1.0.0-SNAPSHOT.jar:1.0.0-SNAPSHOT]<br><br>This is the code I added:<br><br> &nbsp;&nbsp;private static &lt;K, V&gt; Cache&lt;K, V&gt; checkCache(String cacheName) {<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;final Cache&lt;K, V&gt; cache = cacheManager.getCache(cacheName, false);<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (cache != null) {<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;final ComponentStatus status = cache.getStatus();<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (status != ComponentStatus.INITIALIZING &amp;&amp; status != ComponentStatus.RUNNING) {<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cache.start();<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return cache;<br> &nbsp;&nbsp;}<br><br>Any other idea?<br><br>-Ales<br><br>On Aug 27, 2012, at 10:51 PM, Ales Justin &lt;ales.justin@gmail.com&gt; wrote:<br><br><blockquote type="cite">OK, let me try this workaround.<br><br>But should Cache::stop also remove it or not?<br><br>If yes, I might dig deeper into finding the culprit,<br>if not, then the workaround should do, I guess.<br><br>-Ales<br><br><blockquote type="cite">As a workaround, couldn't you check what the status of the cache is before using it? If it's stopped, you could call cache.start() again.<br><br>On Aug 25, 2012, at 3:44 PM, Ales Justin wrote:<br><br><blockquote type="cite">When running CapeDwarf tests these days I get this broken behavior:<br>(using: Ispan 5.2.0.Alpha2)<br><br>On 1st test all works OK:<br>* getting the X cache<br>* passing it to SearchManager (from Ispan Query)<br>* doing queries, etc<br>* stopping the X cache on app (aka Arquillian test) undeploy<br><br>But when running 2nd app (more Arquillian tests) it breaks.<br><br>I'm again using X cache, via this lookup:<br>(where toCacheName == X)<br><br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;final Cache&lt;K, V&gt; cache = cacheManager.getCache(toCacheName(config, appId), false);<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (cache != null)<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return cache;<br><br>And I actually get some cache, where I would expect none.<br><br>Since this cache is not new, it's never run against Ispan Query's LifecycleManager,<br>hence there is no QueryInterceptor in its component registry.<br><br>Which is where the app breaks: SearchManager requires QueryInterceptor in cache' component registry.<br><br>Shouldn't Cache::stop also remove the cache from EmbeddedCacheManager?<br>btw: this used to work, dunno when it broke ...<br><br>Anyone else seeing something similar?<br><br>-Ales<br><br>----------<br><br>15:32:06,810 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host]] (http-/192.168.1.101:8080-3) Exception sending request initialized lifecycle event to listener instance of class org.jboss.capedwarf.appidentity.GAEListener: java.lang.IllegalArgumentException: Indexing was not enabled on this cache. class org.infinispan.query.backend.QueryInterceptor not found in registry<br><span class="Apple-tab-span" style="white-space:pre">        </span>at org.infinispan.query.impl.ComponentRegistryUtils.getComponent(ComponentRegistryUtils.java:40)<br><span class="Apple-tab-span" style="white-space:pre">        </span>at org.infinispan.query.SearchManagerImpl.&lt;init&gt;(SearchManagerImpl.java:57)<br><span class="Apple-tab-span" style="white-space:pre">        </span>at org.infinispan.query.Search.getSearchManager(Search.java:39)<br><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jboss.capedwarf.datastore.AbstractDatastoreService.&lt;init&gt;(AbstractDatastoreService.java:61) [capedwarf-datastore-1.0.0-SNAPSHOT.jar:1.0.0-SNAPSHOT]<br><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jboss.capedwarf.datastore.JBossDatastoreService.&lt;init&gt;(JBossDatastoreService.java:56) [capedwarf-datastore-1.0.0-SNAPSHOT.jar:1.0.0-SNAPSHOT]<br><span class="Apple-tab-span" style="white-space:pre">        </span>at com.google.appengine.api.datastore.DatastoreServiceFactory.getDatastoreService(DatastoreServiceFactory.java) [appengine-api-1.0-sdk-1.7.0.jar:]<br><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jboss.capedwarf.log.JBossLogService.requestStarted(JBossLogService.java:215) [capedwarf-log-1.0.0-SNAPSHOT.jar:1.0.0-SNAPSHOT]<br></blockquote></blockquote><br></blockquote><br><br>_______________________________________________<br>infinispan-dev mailing list<br>infinispan-dev@lists.jboss.org<br>https://lists.jboss.org/mailman/listinfo/infinispan-dev<br></blockquote><br>--<br>Galder Zamarreņo<br>Sr. Software Engineer<br>Infinispan, JBoss Cache<br><br><br>_______________________________________________<br>infinispan-dev mailing list<br>infinispan-dev@lists.jboss.org<br>https://lists.jboss.org/mailman/listinfo/infinispan-dev<br></blockquote></div><br></body></html>