Error in custom provider, org.elasticsearch.common.inject.CreationException


(Michal Wegorek) #1

PROBLEM:

main 09/02 16:53:34 ERROR myapp.Main (main line 58): exception caught
in main()
com.google.inject.CreationException: Guice creation errors:

  1. Error in custom provider,
    org.elasticsearch.common.inject.CreationException: Guice creation
    errors:

  2. Error injecting constructor, java.lang.NoSuchFieldError:
    CHARSET_UTF_8
    at
    org.elasticsearch.indices.analysis.IndicesAnalysisService.(Unknown
    Source)
    while locating
    org.elasticsearch.indices.analysis.IndicesAnalysisService
    for parameter 4 at
    org.elasticsearch.indices.InternalIndicesService.(Unknown
    Source)
    while locating org.elasticsearch.indices.InternalIndicesService
    while locating org.elasticsearch.indices.IndicesService
    for parameter 4 at
    org.elasticsearch.node.service.NodeService.(Unknown Source)
    while locating org.elasticsearch.node.service.NodeService
    Caused by: java.lang.NoSuchFieldError: CHARSET_UTF_8
    at org.apache.lucene.analysis.br.BrazilianAnalyzer
    $DefaultSetHolder.(BrazilianAnalyzer.java:98)
    at
    org.apache.lucene.analysis.br.BrazilianAnalyzer.(BrazilianAnalyzer.java:

at

org.elasticsearch.indices.analysis.IndicesAnalysisService.(IndicesAnalysisService.java:
133)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:
39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:
27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at org.elasticsearch.common.inject.DefaultConstructionProxyFactory
$1.newInstance(DefaultConstructionProxyFactory.java:54)
at
org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:
86)
at org.elasticsearch.common.inject.ConstructorBindingImpl
$Factory.get(ConstructorBindingImpl.java:103)
at org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter
$1.call(ProviderToInternalFactoryAdapter.java:45)
at
org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:
823)
at
org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:
42)
at org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:56)
at
org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:
49)
at
org.elasticsearch.common.inject.SingleParameterInjector.inject(SingleParameterInjector.java:
42)
at
org.elasticsearch.common.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:
66)
at
org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:
85)
at org.elasticsearch.common.inject.ConstructorBindingImpl
$Factory.get(ConstructorBindingImpl.java:103)
at org.elasticsearch.common.inject.FactoryProxy.get(FactoryProxy.java:
56)
at org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter
$1.call(ProviderToInternalFactoryAdapter.java:45)
at
org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:
823)
at
org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:
42)
at org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:56)
at
org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:
49)
at
org.elasticsearch.common.inject.SingleParameterInjector.inject(SingleParameterInjector.java:
42)
at
org.elasticsearch.common.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:
66)
at
org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:
85)
at org.elasticsearch.common.inject.ConstructorBindingImpl
$Factory.get(ConstructorBindingImpl.java:103)
at org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter
$1.call(ProviderToInternalFactoryAdapter.java:45)
at
org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:
823)
at
org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:
42)
at org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:56)
at
org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:
49)
at org.elasticsearch.common.inject.InjectorBuilder
$1.call(InjectorBuilder.java:204)
at org.elasticsearch.common.inject.InjectorBuilder
$1.call(InjectorBuilder.java:197)
at
org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:
816)
at
org.elasticsearch.common.inject.InjectorBuilder.loadEagerSingletons(InjectorBuilder.java:
197)
at
org.elasticsearch.common.inject.InjectorBuilder.injectDynamically(InjectorBuilder.java:
179)
at
org.elasticsearch.common.inject.InjectorBuilder.build(InjectorBuilder.java:
114)
at org.elasticsearch.common.inject.Guice.createInjector(Guice.java:
93)
at org.elasticsearch.common.inject.Guice.createInjector(Guice.java:
70)
at
org.elasticsearch.common.inject.ModulesBuilder.createInjector(ModulesBuilder.java:
58)
at
org.elasticsearch.node.internal.InternalNode.(InternalNode.java:
148)
at org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:159)
at org.elasticsearch.node.NodeBuilder.node(NodeBuilder.java:166)
at
pl.testtest.isc.edbox.batch.filenameindexer.elasticsearch.guice.ESClientProvider.startClient(ESClientProvider.java:
69)
at
pl.testtest.isc.edbox.batch.filenameindexer.elasticsearch.guice.ESClientProvider.get(ESClientProvider.java:
50)
at
pl.testtest.isc.edbox.batch.filenameindexer.elasticsearch.guice.ESClientProvider.get(ESClientProvider.java:
18)
at
com.google.inject.BoundProviderFactory.get(BoundProviderFactory.java:
58)
at com.google.inject.ExposedKeyFactory.get(ExposedKeyFactory.java:58)
at
com.google.inject.SingleParameterInjector.inject(SingleParameterInjector.java:
42)
at
com.google.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:
66)
at
com.google.inject.ConstructorInjector.construct(ConstructorInjector.java:
84)
at com.google.inject.ConstructorBindingImpl
$Factory.get(ConstructorBindingImpl.java:111)
at com.google.inject.FactoryProxy.get(FactoryProxy.java:56)
at com.google.inject.ProviderToInternalFactoryAdapter
$1.call(ProviderToInternalFactoryAdapter.java:45)
at com.google.inject.InjectorImpl.callInContext(InjectorImpl.java:
811)
at
com.google.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:
42)
at com.google.inject.Scopes$1$1.get(Scopes.java:54)
at
com.google.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:
48)
at com.google.inject.ExposedKeyFactory.get(ExposedKeyFactory.java:58)
at
com.google.inject.SingleParameterInjector.inject(SingleParameterInjector.java:
42)
at
com.google.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:
66)
at
com.google.inject.ConstructorInjector.construct(ConstructorInjector.java:
84)
at com.google.inject.ConstructorBindingImpl
$Factory.get(ConstructorBindingImpl.java:111)
at com.google.inject.ProviderToInternalFactoryAdapter
$1.call(ProviderToInternalFactoryAdapter.java:45)
at com.google.inject.InjectorImpl.callInContext(InjectorImpl.java:
811)
at
com.google.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:
42)
at com.google.inject.Scopes$1$1.get(Scopes.java:54)
at
com.google.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:
48)
at com.google.inject.InjectorBuilder$1.call(InjectorBuilder.java:200)
at com.google.inject.InjectorBuilder$1.call(InjectorBuilder.java:194)
at com.google.inject.InjectorImpl.callInContext(InjectorImpl.java:
804)
at
com.google.inject.InjectorBuilder.loadEagerSingletons(InjectorBuilder.java:
194)
at
com.google.inject.InjectorBuilder.injectDynamically(InjectorBuilder.java:
176)
at com.google.inject.InjectorBuilder.build(InjectorBuilder.java:113)
at com.google.inject.Guice.createInjector(Guice.java:92)
at pl.testtest.isc.edbox.app.BaseGuiceApp.start(BaseGuiceApp.java:31)
at pl.testtest.isc.edbox.Main.main(Main.java:50)

ENVIRONMENT:

  • Using ES java client in java application, this is error on
    application start
  • ES 0.18.7
  • java 1.6.0_26
  • ubuntu unity
  • This error appeared at some point (after 2 weeks of coding), no
    updates where made, unable to point which code updates made this error
    visible, on some machines error appears, on others not.

QUESTON:

  • Where this error comes from?

Please help,
Michal.


(Karussell) #2

How do you handle dependencies? It looks like a versioning problem.

peter.

On 9 Feb., 17:42, Michal Wegorek wegor...@gmail.com wrote:

PROBLEM:

main 09/02 16:53:34 ERROR myapp.Main (main line 58): exception caught
in main()
com.google.inject.CreationException: Guice creation errors:

  1. Error in custom provider,
    org.elasticsearch.common.inject.CreationException: Guice creation
    errors:

  2. Error injecting constructor, java.lang.NoSuchFieldError:
    CHARSET_UTF_8
    at
    org.elasticsearch.indices.analysis.IndicesAnalysisService.(Unknown
    Source)
    while locating
    org.elasticsearch.indices.analysis.IndicesAnalysisService
    for parameter 4 at
    org.elasticsearch.indices.InternalIndicesService.(Unknown
    Source)
    while locating org.elasticsearch.indices.InternalIndicesService
    while locating org.elasticsearch.indices.IndicesService
    for parameter 4 at
    org.elasticsearch.node.service.NodeService.(Unknown Source)
    while locating org.elasticsearch.node.service.NodeService
    Caused by: java.lang.NoSuchFieldError: CHARSET_UTF_8
    at org.apache.lucene.analysis.br.BrazilianAnalyzer
    $DefaultSetHolder.(BrazilianAnalyzer.java:98)
    at
    org.apache.lucene.analysis.br.BrazilianAnalyzer.(BrazilianAnalyzer.java:

  3. at
    org.elasticsearch.indices.analysis.IndicesAnalysisService.(IndicesAnalysisService.java:

  4. at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
    Method)
    at
    sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:

  5. at
    

sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:
27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at org.elasticsearch.common.inject.DefaultConstructionProxyFactory
$1.newInstance(DefaultConstructionProxyFactory.java:54)
at
org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:
86)
at org.elasticsearch.common.inject.ConstructorBindingImpl
$Factory.get(ConstructorBindingImpl.java:103)
at org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter
$1.call(ProviderToInternalFactoryAdapter.java:45)
at
org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:
823)
at
org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:
42)
at org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:56)
at
org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:
49)
at
org.elasticsearch.common.inject.SingleParameterInjector.inject(SingleParameterInjector.java:
42)
at
org.elasticsearch.common.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:
66)
at
org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:
85)
at org.elasticsearch.common.inject.ConstructorBindingImpl
$Factory.get(ConstructorBindingImpl.java:103)
at org.elasticsearch.common.inject.FactoryProxy.get(FactoryProxy.java:
56)
at org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter
$1.call(ProviderToInternalFactoryAdapter.java:45)
at
org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:
823)
at
org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:
42)
at org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:56)
at
org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:
49)
at
org.elasticsearch.common.inject.SingleParameterInjector.inject(SingleParameterInjector.java:
42)
at
org.elasticsearch.common.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:
66)
at
org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:
85)
at org.elasticsearch.common.inject.ConstructorBindingImpl
$Factory.get(ConstructorBindingImpl.java:103)
at org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter
$1.call(ProviderToInternalFactoryAdapter.java:45)
at
org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:
823)
at
org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:
42)
at org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:56)
at
org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:
49)
at org.elasticsearch.common.inject.InjectorBuilder
$1.call(InjectorBuilder.java:204)
at org.elasticsearch.common.inject.InjectorBuilder
$1.call(InjectorBuilder.java:197)
at
org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:
816)
at
org.elasticsearch.common.inject.InjectorBuilder.loadEagerSingletons(InjectorBuilder.java:
197)
at
org.elasticsearch.common.inject.InjectorBuilder.injectDynamically(InjectorBuilder.java:
179)
at
org.elasticsearch.common.inject.InjectorBuilder.build(InjectorBuilder.java:
114)
at org.elasticsearch.common.inject.Guice.createInjector(Guice.java:
93)
at org.elasticsearch.common.inject.Guice.createInjector(Guice.java:
70)
at
org.elasticsearch.common.inject.ModulesBuilder.createInjector(ModulesBuilder.java:
58)
at
org.elasticsearch.node.internal.InternalNode.(InternalNode.java:
148)
at org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:159)
at org.elasticsearch.node.NodeBuilder.node(NodeBuilder.java:166)
at
pl.testtest.isc.edbox.batch.filenameindexer.elasticsearch.guice.ESClientProvider.startClient(ESClientProvider.java:
69)
at
pl.testtest.isc.edbox.batch.filenameindexer.elasticsearch.guice.ESClientProvider.get(ESClientProvider.java:
50)
at
pl.testtest.isc.edbox.batch.filenameindexer.elasticsearch.guice.ESClientProvider.get(ESClientProvider.java:
18)
at
com.google.inject.BoundProviderFactory.get(BoundProviderFactory.java:
58)
at com.google.inject.ExposedKeyFactory.get(ExposedKeyFactory.java:58)
at
com.google.inject.SingleParameterInjector.inject(SingleParameterInjector.java:
42)
at
com.google.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:
66)
at
com.google.inject.ConstructorInjector.construct(ConstructorInjector.java:
84)
at com.google.inject.ConstructorBindingImpl
$Factory.get(ConstructorBindingImpl.java:111)
at com.google.inject.FactoryProxy.get(FactoryProxy.java:56)
at com.google.inject.ProviderToInternalFactoryAdapter
$1.call(ProviderToInternalFactoryAdapter.java:45)
at com.google.inject.InjectorImpl.callInContext(InjectorImpl.java:
811)
at
com.google.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:
42)
at com.google.inject.Scopes$1$1.get(Scopes.java:54)
at
com.google.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:
48)
at com.google.inject.ExposedKeyFactory.get(ExposedKeyFactory.java:58)
at
com.google.inject.SingleParameterInjector.inject(SingleParameterInjector.java:
42)
at
com.google.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:
66)
at
com.google.inject.ConstructorInjector.construct(ConstructorInjector.java:
84)
at com.google.inject.ConstructorBindingImpl
$Factory.get(ConstructorBindingImpl.java:111)
at com.google.inject.ProviderToInternalFactoryAdapter
$1.call(ProviderToInternalFactoryAdapter.java:45)
at com.google.inject.InjectorImpl.callInContext(InjectorImpl.java:
811)
at
com.google.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:
42)
at com.google.inject.Scopes$1$1.get(Scopes.java:54)
at
com.google.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:
48)
at com.google.inject.InjectorBuilder$1.call(InjectorBuilder.java:200)
at com.google.inject.InjectorBuilder$1.call(InjectorBuilder.java:194)
at com.google.inject.InjectorImpl.callInContext(InjectorImpl.java:
804)
at
com.google.inject.InjectorBuilder.loadEagerSingletons(InjectorBuilder.java:
194)
at
com.google.inject.InjectorBuilder.injectDynamically(InjectorBuilder.java:
176)
at com.google.inject.InjectorBuilder.build(InjectorBuilder.java:113)
at com.google.inject.Guice.createInjector(Guice.java:92)
at pl.testtest.isc.edbox.app.BaseGuiceApp.start(BaseGuiceApp.java:31)
at pl.testtest.isc.edbox.Main.main(Main.java:50)

ENVIRONMENT:

  • Using ES java client in java application, this is error on
    application start
  • ES 0.18.7
  • java 1.6.0_26
  • ubuntu unity
  • This error appeared at some point (after 2 weeks of coding), no
    updates where made, unable to point which code updates made this error
    visible, on some machines error appears, on others not.

QUESTON:

  • Where this error comes from?

Please help,
Michal.


(system) #3