1
我在java中使用嵌入式elasticsearch,並將其用作主數據存儲。但是,當我將數據添加到索引它給一些奇怪的例外將數據添加到與嵌入式彈性搜索相關的PostingFormats中的索引時出錯
java.lang.NoClassDefFoundError: Could not initialize class org.elasticsearch.index.codec.postingsformat.PostingFormats.
版本:Java的1.7,SUSE LINUX 11,elasticsearch 1.1.0
我在我的Windows運行相同的代碼,以及作爲Ubuntu的,它運行良好
以下是異常跟蹤。
org.elasticsearch.common.util.concurrent.UncategorizedExecutionException: Failed execution
at org.elasticsearch.action.support.AdapterActionFuture.rethrowExecutionException(AdapterActionFuture.java:90) ~[uber-indexer-0.0.1-SNAPSHOT.jar:na]
at org.elasticsearch.action.support.AdapterActionFuture.actionGet(AdapterActionFuture.java:50) ~[uber-indexer-0.0.1-SNAPSHOT.jar:na]
at com.iwebezo.indexer.manager.ProductsManager.saveScrapedProductsES(ProductsManager.java:128) ~[uber-indexer-0.0.1-SNAPSHOT.jar:na]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_67]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_67]
at java.lang.Thread.run(Thread.java:745) [na:1.7.0_67]
Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.elasticsearch.index.codec.postingsformat.PostingFormats
at org.elasticsearch.index.codec.CodecModule.configurePostingsFormats(CodecModule.java:126) ~[uber-indexer-0.0.1-SNAPSHOT.jar:na]
at org.elasticsearch.index.codec.CodecModule.configure(CodecModule.java:178) ~[uber-indexer-0.0.1-SNAPSHOT.jar:na]
at org.elasticsearch.common.inject.AbstractModule.configure(AbstractModule.java:60) ~[uber-indexer-0.0.1-SNAPSHOT.jar:na]
at org.elasticsearch.common.inject.spi.Elements$RecordingBinder.install(Elements.java:204) ~[uber-indexer-0.0.1-SNAPSHOT.jar:na]
at org.elasticsearch.common.inject.spi.Elements.getElements(Elements.java:85) ~[uber-indexer-0.0.1-SNAPSHOT.jar:na]
at org.elasticsearch.common.inject.InjectorShell$Builder.build(InjectorShell.java:130) ~[uber-indexer-0.0.1-SNAPSHOT.jar:na]
at org.elasticsearch.common.inject.InjectorBuilder.build(InjectorBuilder.java:99) ~[uber-indexer-0.0.1-SNAPSHOT.jar:na]
at org.elasticsearch.common.inject.InjectorImpl.createChildInjector(InjectorImpl.java:131) ~[uber-indexer-0.0.1-SNAPSHOT.jar:na]
at org.elasticsearch.common.inject.ModulesBuilder.createChildInjector(ModulesBuilder.java:69) ~[uber-indexer-0.0.1-SNAPSHOT.jar:na]
at org.elasticsearch.indices.InternalIndicesService.createIndex(InternalIndicesService.java:298) ~[uber-indexer-0.0.1-SNAPSHOT.jar:na]
at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService$2.execute(MetaDataCreateIndexService.java:343) ~[uber-indexer-0.0.1-SNAPSHOT.jar:na]
at org.elasticsearch.cluster.service.InternalClusterService$UpdateTask.run(InternalClusterService.java:308) ~[uber-indexer-0.0.1-SNAPSHOT.jar:na]
at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:134) ~[uber-indexer-0.0.1-SNAPSHOT.jar:na]
... 3 common frames omitted
感謝張貼這個......爲我節省了很多時間! – Dave 2015-05-01 16:42:57