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

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

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

Michal Wegorek
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:

1) Error injecting constructor, java.lang.NoSuchFieldError:
CHARSET_UTF_8
  at
org.elasticsearch.indices.analysis.IndicesAnalysisService.<init>(Unknown
Source)
  while locating
org.elasticsearch.indices.analysis.IndicesAnalysisService
    for parameter 4 at
org.elasticsearch.indices.InternalIndicesService.<init>(Unknown
Source)
  while locating org.elasticsearch.indices.InternalIndicesService
  while locating org.elasticsearch.indices.IndicesService
    for parameter 4 at
org.elasticsearch.node.service.NodeService.<init>(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.<clinit>(BrazilianAnalyzer.java:98)
        at
org.apache.lucene.analysis.br.BrazilianAnalyzer.<init>(BrazilianAnalyzer.java:
119)
        at
org.elasticsearch.indices.analysis.IndicesAnalysisService.<init>(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.<init>(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.
Reply | Threaded
Open this post in threaded view
|

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

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

peter.

On 9 Feb., 17:42, Michal Wegorek <[hidden email]> 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:
>
> 1) Error injecting constructor, java.lang.NoSuchFieldError:
> CHARSET_UTF_8
>   at
> org.elasticsearch.indices.analysis.IndicesAnalysisService.<init>(Unknown
> Source)
>   while locating
> org.elasticsearch.indices.analysis.IndicesAnalysisService
>     for parameter 4 at
> org.elasticsearch.indices.InternalIndicesService.<init>(Unknown
> Source)
>   while locating org.elasticsearch.indices.InternalIndicesService
>   while locating org.elasticsearch.indices.IndicesService
>     for parameter 4 at
> org.elasticsearch.node.service.NodeService.<init>(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.<clinit>(BrazilianAnalyzer.java:98)
>         at
> org.apache.lucene.analysis.br.BrazilianAnalyzer.<init>(BrazilianAnalyzer.java:
> 119)
>         at
> org.elasticsearch.indices.analysis.IndicesAnalysisService.<init>(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.<init>(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.