Re: [Elastic Search] exception on startup
Just a guess - it looks like that you are trying to create a index with a name that is already existing. Possible solutions are : - check if the index is already created - delete the file-based storage (this approach is used in the unit tests) - Use each time a new name What is the context of this myapp ? Cheers, jj 2015-06-09 13:23 GMT+02:00 Niclas Hedhman nic...@hedhman.org: Paul (since you wrote this once upon a time), I get an exception every time the Elastic Search Extension is loaded, even if I wipe the $HOME/Library/Application Support/myapp where it seems that ES extension is using (oh, yeah I am using the file system store) Any ideas? Is it expected? Caused by: org.elasticsearch.indices.IndexAlreadyExistsException: [qi4j_index] already exists at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService.validateIndexName(MetaDataCreateIndexService.java:164) at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService.validate(MetaDataCreateIndexService.java:539) at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService.access$100(MetaDataCreateIndexService.java:89) at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService$2.execute(MetaDataCreateIndexService.java:229) at org.elasticsearch.cluster.service.InternalClusterService$UpdateTask.run(InternalClusterService.java:328) at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:153) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ... 1 more Cheers -- Niclas Hedhman, Software Developer http://zest.apache.org - New Energy for Java
Re: [Elastic Search] exception on startup
hmm, first time run ? Thats indeed strange.. ok, if you want I can take a look on the ES issue since I spend sometime on this indexer.. cheers, jj 2015-06-09 13:55 GMT+02:00 Niclas Hedhman nic...@hedhman.org: Well, how can there be an existing Index the first time it is run? Remember, I am not using ES directly, only that the ES extension attaches itself to the EntityStateListener notification... Just now, I go another problem, so I suspect that I am missing some crucial setup/assembly part. Perhaps I just change to the RDF indexer instead... Caused by: java.lang.NullPointerException at org.qi4j.index.elasticsearch.ElasticSearchIndexer$Mixin.notifyChanges(ElasticSearchIndexer.java:105) at org.qi4j.spi.entitystore.StateChangeNotificationConcern$1.commit(StateChangeNotificationConcern.java:44) at org.qi4j.spi.entitystore.ConcurrentModificationCheckConcern$ConcurrentCheckingEntityStoreUnitOfWork$1.commit(ConcurrentModificationCheckConcern.java:117) at org.qi4j.api.configuration.Configuration$ConfigurationMixin.initializeConfigurationInstance(Configuration.java:281) On Tue, Jun 9, 2015 at 7:42 PM, Jiri Jetmar juergen.jet...@gmail.com wrote: Just a guess - it looks like that you are trying to create a index with a name that is already existing. Possible solutions are : - check if the index is already created - delete the file-based storage (this approach is used in the unit tests) - Use each time a new name What is the context of this myapp ? Cheers, jj 2015-06-09 13:23 GMT+02:00 Niclas Hedhman nic...@hedhman.org: Paul (since you wrote this once upon a time), I get an exception every time the Elastic Search Extension is loaded, even if I wipe the $HOME/Library/Application Support/myapp where it seems that ES extension is using (oh, yeah I am using the file system store) Any ideas? Is it expected? Caused by: org.elasticsearch.indices.IndexAlreadyExistsException: [qi4j_index] already exists at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService.validateIndexName(MetaDataCreateIndexService.java:164) at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService.validate(MetaDataCreateIndexService.java:539) at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService.access$100(MetaDataCreateIndexService.java:89) at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService$2.execute(MetaDataCreateIndexService.java:229) at org.elasticsearch.cluster.service.InternalClusterService$UpdateTask.run(InternalClusterService.java:328) at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:153) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ... 1 more Cheers -- Niclas Hedhman, Software Developer http://zest.apache.org - New Energy for Java -- Niclas Hedhman, Software Developer http://zest.apache.org - New Energy for Java
Re: [Elastic Search] exception on startup
That second one is probably a consequence of the first problem, as the client=null at passivation... On Tue, Jun 9, 2015 at 7:55 PM, Niclas Hedhman nic...@hedhman.org wrote: Well, how can there be an existing Index the first time it is run? Remember, I am not using ES directly, only that the ES extension attaches itself to the EntityStateListener notification... Just now, I go another problem, so I suspect that I am missing some crucial setup/assembly part. Perhaps I just change to the RDF indexer instead... Caused by: java.lang.NullPointerException at org.qi4j.index.elasticsearch.ElasticSearchIndexer$Mixin.notifyChanges(ElasticSearchIndexer.java:105) at org.qi4j.spi.entitystore.StateChangeNotificationConcern$1.commit(StateChangeNotificationConcern.java:44) at org.qi4j.spi.entitystore.ConcurrentModificationCheckConcern$ConcurrentCheckingEntityStoreUnitOfWork$1.commit(ConcurrentModificationCheckConcern.java:117) at org.qi4j.api.configuration.Configuration$ConfigurationMixin.initializeConfigurationInstance(Configuration.java:281) On Tue, Jun 9, 2015 at 7:42 PM, Jiri Jetmar juergen.jet...@gmail.com wrote: Just a guess - it looks like that you are trying to create a index with a name that is already existing. Possible solutions are : - check if the index is already created - delete the file-based storage (this approach is used in the unit tests) - Use each time a new name What is the context of this myapp ? Cheers, jj 2015-06-09 13:23 GMT+02:00 Niclas Hedhman nic...@hedhman.org: Paul (since you wrote this once upon a time), I get an exception every time the Elastic Search Extension is loaded, even if I wipe the $HOME/Library/Application Support/myapp where it seems that ES extension is using (oh, yeah I am using the file system store) Any ideas? Is it expected? Caused by: org.elasticsearch.indices.IndexAlreadyExistsException: [qi4j_index] already exists at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService.validateIndexName(MetaDataCreateIndexService.java:164) at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService.validate(MetaDataCreateIndexService.java:539) at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService.access$100(MetaDataCreateIndexService.java:89) at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService$2.execute(MetaDataCreateIndexService.java:229) at org.elasticsearch.cluster.service.InternalClusterService$UpdateTask.run(InternalClusterService.java:328) at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:153) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ... 1 more Cheers -- Niclas Hedhman, Software Developer http://zest.apache.org - New Energy for Java -- Niclas Hedhman, Software Developer http://zest.apache.org - New Energy for Java -- Niclas Hedhman, Software Developer http://zest.apache.org - New Energy for Java
Re: [Elastic Search] exception on startup
Well, how can there be an existing Index the first time it is run? Remember, I am not using ES directly, only that the ES extension attaches itself to the EntityStateListener notification... Just now, I go another problem, so I suspect that I am missing some crucial setup/assembly part. Perhaps I just change to the RDF indexer instead... Caused by: java.lang.NullPointerException at org.qi4j.index.elasticsearch.ElasticSearchIndexer$Mixin.notifyChanges(ElasticSearchIndexer.java:105) at org.qi4j.spi.entitystore.StateChangeNotificationConcern$1.commit(StateChangeNotificationConcern.java:44) at org.qi4j.spi.entitystore.ConcurrentModificationCheckConcern$ConcurrentCheckingEntityStoreUnitOfWork$1.commit(ConcurrentModificationCheckConcern.java:117) at org.qi4j.api.configuration.Configuration$ConfigurationMixin.initializeConfigurationInstance(Configuration.java:281) On Tue, Jun 9, 2015 at 7:42 PM, Jiri Jetmar juergen.jet...@gmail.com wrote: Just a guess - it looks like that you are trying to create a index with a name that is already existing. Possible solutions are : - check if the index is already created - delete the file-based storage (this approach is used in the unit tests) - Use each time a new name What is the context of this myapp ? Cheers, jj 2015-06-09 13:23 GMT+02:00 Niclas Hedhman nic...@hedhman.org: Paul (since you wrote this once upon a time), I get an exception every time the Elastic Search Extension is loaded, even if I wipe the $HOME/Library/Application Support/myapp where it seems that ES extension is using (oh, yeah I am using the file system store) Any ideas? Is it expected? Caused by: org.elasticsearch.indices.IndexAlreadyExistsException: [qi4j_index] already exists at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService.validateIndexName(MetaDataCreateIndexService.java:164) at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService.validate(MetaDataCreateIndexService.java:539) at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService.access$100(MetaDataCreateIndexService.java:89) at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService$2.execute(MetaDataCreateIndexService.java:229) at org.elasticsearch.cluster.service.InternalClusterService$UpdateTask.run(InternalClusterService.java:328) at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:153) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ... 1 more Cheers -- Niclas Hedhman, Software Developer http://zest.apache.org - New Energy for Java -- Niclas Hedhman, Software Developer http://zest.apache.org - New Energy for Java
[Elastic Search] exception on startup
Paul (since you wrote this once upon a time), I get an exception every time the Elastic Search Extension is loaded, even if I wipe the $HOME/Library/Application Support/myapp where it seems that ES extension is using (oh, yeah I am using the file system store) Any ideas? Is it expected? Caused by: org.elasticsearch.indices.IndexAlreadyExistsException: [qi4j_index] already exists at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService.validateIndexName(MetaDataCreateIndexService.java:164) at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService.validate(MetaDataCreateIndexService.java:539) at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService.access$100(MetaDataCreateIndexService.java:89) at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService$2.execute(MetaDataCreateIndexService.java:229) at org.elasticsearch.cluster.service.InternalClusterService$UpdateTask.run(InternalClusterService.java:328) at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:153) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ... 1 more Cheers -- Niclas Hedhman, Software Developer http://zest.apache.org - New Energy for Java
Re: [Elastic Search] exception on startup
Ok, the reason is found... The most typical of problems... The Configuration object of the ES extension triggers the StateChangeNotification back to the ElasticSearch extension, which isn't ready to process it yet. Was this the reason why we always need a Configuration Layer, and a Config Module in Infra can't be made work? Cheers On Tue, Jun 9, 2015 at 8:01 PM, Niclas Hedhman nic...@hedhman.org wrote: That second one is probably a consequence of the first problem, as the client=null at passivation... On Tue, Jun 9, 2015 at 7:55 PM, Niclas Hedhman nic...@hedhman.org wrote: Well, how can there be an existing Index the first time it is run? Remember, I am not using ES directly, only that the ES extension attaches itself to the EntityStateListener notification... Just now, I go another problem, so I suspect that I am missing some crucial setup/assembly part. Perhaps I just change to the RDF indexer instead... Caused by: java.lang.NullPointerException at org.qi4j.index.elasticsearch.ElasticSearchIndexer$Mixin.notifyChanges(ElasticSearchIndexer.java:105) at org.qi4j.spi.entitystore.StateChangeNotificationConcern$1.commit(StateChangeNotificationConcern.java:44) at org.qi4j.spi.entitystore.ConcurrentModificationCheckConcern$ConcurrentCheckingEntityStoreUnitOfWork$1.commit(ConcurrentModificationCheckConcern.java:117) at org.qi4j.api.configuration.Configuration$ConfigurationMixin.initializeConfigurationInstance(Configuration.java:281) On Tue, Jun 9, 2015 at 7:42 PM, Jiri Jetmar juergen.jet...@gmail.com wrote: Just a guess - it looks like that you are trying to create a index with a name that is already existing. Possible solutions are : - check if the index is already created - delete the file-based storage (this approach is used in the unit tests) - Use each time a new name What is the context of this myapp ? Cheers, jj 2015-06-09 13:23 GMT+02:00 Niclas Hedhman nic...@hedhman.org: Paul (since you wrote this once upon a time), I get an exception every time the Elastic Search Extension is loaded, even if I wipe the $HOME/Library/Application Support/myapp where it seems that ES extension is using (oh, yeah I am using the file system store) Any ideas? Is it expected? Caused by: org.elasticsearch.indices.IndexAlreadyExistsException: [qi4j_index] already exists at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService.validateIndexName(MetaDataCreateIndexService.java:164) at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService.validate(MetaDataCreateIndexService.java:539) at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService.access$100(MetaDataCreateIndexService.java:89) at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService$2.execute(MetaDataCreateIndexService.java:229) at org.elasticsearch.cluster.service.InternalClusterService$UpdateTask.run(InternalClusterService.java:328) at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:153) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ... 1 more Cheers -- Niclas Hedhman, Software Developer http://zest.apache.org - New Energy for Java -- Niclas Hedhman, Software Developer http://zest.apache.org - New Energy for Java -- Niclas Hedhman, Software Developer http://zest.apache.org - New Energy for Java -- Niclas Hedhman, Software Developer http://zest.apache.org - New Energy for Java
Re: [Elastic Search] exception on startup
Yeah, and that is why I was putting it in a Config MODULE inside Infra Layer... But Wait!! There is MORE !!! a. ES Config is in the Config Module b. On manipulation of that Configuration Entity Composite, the StateNotificationConcern will locate all visible StateChangeListeners and call them. c. The ElasticSearchIndexer implements this and must either reside inside the Storage Module, with Visibility.module, or if it has its own Indexing Module (my case), the StateNotication will see it... BAM. So!! Either Indexer need to be Visibility.module and inside the Storage Module, OR the Configuration needs to be in its own Layer below. On Tue, Jun 9, 2015 at 8:18 PM, Jiri Jetmar juergen.jet...@gmail.com wrote: hmm.. I think it was because of the In-Memory EntityStore required for the configuration.. Thats the reason for the dedicated config module.. This chicken-egg issue.. at least when I remember correctly.. 2015-06-09 14:13 GMT+02:00 Niclas Hedhman nic...@hedhman.org: Ok, the reason is found... The most typical of problems... The Configuration object of the ES extension triggers the StateChangeNotification back to the ElasticSearch extension, which isn't ready to process it yet. Was this the reason why we always need a Configuration Layer, and a Config Module in Infra can't be made work? Cheers On Tue, Jun 9, 2015 at 8:01 PM, Niclas Hedhman nic...@hedhman.org wrote: That second one is probably a consequence of the first problem, as the client=null at passivation... On Tue, Jun 9, 2015 at 7:55 PM, Niclas Hedhman nic...@hedhman.org wrote: Well, how can there be an existing Index the first time it is run? Remember, I am not using ES directly, only that the ES extension attaches itself to the EntityStateListener notification... Just now, I go another problem, so I suspect that I am missing some crucial setup/assembly part. Perhaps I just change to the RDF indexer instead... Caused by: java.lang.NullPointerException at org.qi4j.index.elasticsearch.ElasticSearchIndexer$Mixin.notifyChanges(ElasticSearchIndexer.java:105) at org.qi4j.spi.entitystore.StateChangeNotificationConcern$1.commit(StateChangeNotificationConcern.java:44) at org.qi4j.spi.entitystore.ConcurrentModificationCheckConcern$ConcurrentCheckingEntityStoreUnitOfWork$1.commit(ConcurrentModificationCheckConcern.java:117) at org.qi4j.api.configuration.Configuration$ConfigurationMixin.initializeConfigurationInstance(Configuration.java:281) On Tue, Jun 9, 2015 at 7:42 PM, Jiri Jetmar juergen.jet...@gmail.com wrote: Just a guess - it looks like that you are trying to create a index with a name that is already existing. Possible solutions are : - check if the index is already created - delete the file-based storage (this approach is used in the unit tests) - Use each time a new name What is the context of this myapp ? Cheers, jj 2015-06-09 13:23 GMT+02:00 Niclas Hedhman nic...@hedhman.org: Paul (since you wrote this once upon a time), I get an exception every time the Elastic Search Extension is loaded, even if I wipe the $HOME/Library/Application Support/myapp where it seems that ES extension is using (oh, yeah I am using the file system store) Any ideas? Is it expected? Caused by: org.elasticsearch.indices.IndexAlreadyExistsException: [qi4j_index] already exists at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService.validateIndexName(MetaDataCreateIndexService.java:164) at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService.validate(MetaDataCreateIndexService.java:539) at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService.access$100(MetaDataCreateIndexService.java:89) at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService$2.execute(MetaDataCreateIndexService.java:229) at org.elasticsearch.cluster.service.InternalClusterService$UpdateTask.run(InternalClusterService.java:328) at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:153) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ... 1 more Cheers -- Niclas Hedhman, Software Developer http://zest.apache.org - New Energy for Java -- Niclas Hedhman, Software Developer http://zest.apache.org - New Energy for Java -- Niclas Hedhman, Software Developer http://zest.apache.org - New Energy for Java -- Niclas Hedhman, Software Developer
Re: [Elastic Search] exception on startup
On 9.6.2015 15:44, Niclas Hedhman wrote: Yeah, and that is why I was putting it in a Config MODULE inside Infra Layer... But Wait!! There is MORE !!! a. ES Config is in the Config Module b. On manipulation of that Configuration Entity Composite, the StateNotificationConcern will locate all visible StateChangeListeners and call them. c. The ElasticSearchIndexer implements this and must either reside inside the Storage Module, with Visibility.module, or if it has its own Indexing Module (my case), the StateNotication will see it... BAM. So!! Either Indexer need to be Visibility.module and inside the Storage Module, OR the Configuration needs to be in its own Layer below. Slightly off-topic and not helpful to the actual problem solving: I remember stumbling upon this issue some years ago when I was still actively using Java (and Qi4j). I think the underlying problem is that Qi4j is coupling too tightly the concepts of 'entity' and 'configuration composite'. Thus basically forcing a pattern of having separate configuration layer for any serious and big application. This is not necessarily a bad idea in itself, a good application design usually tends to put configuration stuff into its own, usually lowermost layer. Problem is, as your application becomes more complex to assemble (e.g. the test case you are running), issues like this start to arise and are very problematic to debug. IMO for Qi4j/Zest 3.0, the whole configuration aspect should be revisited and re-thought properly. Especially new users are guaranteed to stumble on problems like this, thus making adaptation of Qi4j/Zest really slow and troublesome.
Re: [Elastic Search] exception on startup
The concept of having Configuration as Entities was a great thing, IMHO, and we shouldn't toss that out because of this issue at the configuration of the stuff that handles the configuration-part. But, maybe a separate mechanism should be used specifically for EntityStores and Indexing subsystems, since they are very very unlikely to be modified in the same manner. Let's keep this open... On Tue, Jun 9, 2015 at 9:18 PM, Paul Merlin p...@nosphere.org wrote: Hey gang, Yes that's an assembly issue. Every now an then I myself fight with this. This is very hard for newcomers, and very frustrating for every others ;) Maybe Stan is right and we should do something about it in 3. Cheers /Paul -- Niclas Hedhman, Software Developer http://zest.apache.org - New Energy for Java