Running node of elasticsearch inside JBoss App causing org.elasticsearch.common.inject.CreationException: Guice creation errors

Hey,

I am trying to run elastic search node (0.90.0) in my JBoss(5.1 with jdk
1.7) application,
with regular code:
nodeBuilder.clusterName(clusterName);
nodeBuilder.data(true);
node = nodeBuilder.node();
client = node.client();

and having exception with something like 229 Guice errors on different
classes:

org.elasticsearch.common.inject.CreationException: Guice creation errors:

  1. Error injecting constructor, java.lang.IllegalStateException: This is a
    proxy used to support circular references involving constructors. The
    object we're proxying is not constructed yet. Please wait until after
    injection has completed to use this object.
    at org.elasticsearch.cache.NodeCache.(Unknown Source)
    while locating org.elasticsearch.cache.NodeCache
    Caused by: java.lang.IllegalStateException: This is a proxy used to support
    circular references involving constructors. The object we're proxying is
    not constructed yet. Please wait until after injection has completed to use
    this object.
    at
    org.elasticsearch.common.inject.internal.ConstructionContext$DelegatingInvocationHandler.invoke(ConstructionContext.java:102)
    at $Proxy1017.add(Unknown Source)
    at org.elasticsearch.cache.NodeCache.(NodeCache.java:44)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at
    sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    at
    sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
    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:98)
    at
    org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45)
    at
    org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:819)
    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:45)
    at
    org.elasticsearch.common.inject.InjectorBuilder$1.call(InjectorBuilder.java:200)
    at
    org.elasticsearch.common.inject.InjectorBuilder$1.call(InjectorBuilder.java:193)
    at
    org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:812)
    at
    org.elasticsearch.common.inject.InjectorBuilder.loadEagerSingletons(InjectorBuilder.java:193)
    at
    org.elasticsearch.common.inject.InjectorBuilder.injectDynamically(InjectorBuilder.java:175)
    at
    org.elasticsearch.common.inject.InjectorBuilder.build(InjectorBuilder.java:110)
    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:59)
    at
    org.elasticsearch.node.internal.InternalNode.(InternalNode.java:164)
    at org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:159)
    at org.elasticsearch.node.NodeBuilder.node(NodeBuilder.java:166)

...
...

229 errors
at
org.elasticsearch.common.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:343)
at
org.elasticsearch.common.inject.InjectorBuilder.injectDynamically(InjectorBuilder.java:178)
at
org.elasticsearch.common.inject.InjectorBuilder.build(InjectorBuilder.java:110)
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:59)
at
org.elasticsearch.node.internal.InternalNode.(InternalNode.java:164)
at org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:159)
at org.elasticsearch.node.NodeBuilder.node(NodeBuilder.java:166)

Someone experienced with running node of ElasticSearch inside Jboss?
Any Idea why this happens and if possible to solve?

Igor.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Did you update from a previous version to 0.90?
Any chance that you did not clean jboss tmp folders or your app target folder?

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr | @scrutmydocs

Le 7 mai 2013 à 09:44, Igor Romanov igorrom@gmail.com a écrit :

Hey,

I am trying to run Elasticsearch node (0.90.0) in my JBoss(5.1 with jdk 1.7) application,
with regular code:
nodeBuilder.clusterName(clusterName);
nodeBuilder.data(true);
node = nodeBuilder.node();
client = node.client();

and having exception with something like 229 Guice errors on different classes:

org.elasticsearch.common.inject.CreationException: Guice creation errors:

  1. Error injecting constructor, java.lang.IllegalStateException: This is a proxy used to support circular references involving constructors. The object we're proxying is not constructed yet. Please wait until after injection has completed to use this object.
    at org.elasticsearch.cache.NodeCache.(Unknown Source)
    while locating org.elasticsearch.cache.NodeCache
    Caused by: java.lang.IllegalStateException: This is a proxy used to support circular references involving constructors. The object we're proxying is not constructed yet. Please wait until after injection has completed to use this object.
    at org.elasticsearch.common.inject.internal.ConstructionContext$DelegatingInvocationHandler.invoke(ConstructionContext.java:102)
    at $Proxy1017.add(Unknown Source)
    at org.elasticsearch.cache.NodeCache.(NodeCache.java:44)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
    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:98)
    at org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45)
    at org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:819)
    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:45)
    at org.elasticsearch.common.inject.InjectorBuilder$1.call(InjectorBuilder.java:200)
    at org.elasticsearch.common.inject.InjectorBuilder$1.call(InjectorBuilder.java:193)
    at org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:812)
    at org.elasticsearch.common.inject.InjectorBuilder.loadEagerSingletons(InjectorBuilder.java:193)
    at org.elasticsearch.common.inject.InjectorBuilder.injectDynamically(InjectorBuilder.java:175)
    at org.elasticsearch.common.inject.InjectorBuilder.build(InjectorBuilder.java:110)
    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:59)
    at org.elasticsearch.node.internal.InternalNode.(InternalNode.java:164)
    at org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:159)
    at org.elasticsearch.node.NodeBuilder.node(NodeBuilder.java:166)

...
...

229 errors
at org.elasticsearch.common.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:343)
at org.elasticsearch.common.inject.InjectorBuilder.injectDynamically(InjectorBuilder.java:178)
at org.elasticsearch.common.inject.InjectorBuilder.build(InjectorBuilder.java:110)
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:59)
at org.elasticsearch.node.internal.InternalNode.(InternalNode.java:164)
at org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:159)
at org.elasticsearch.node.NodeBuilder.node(NodeBuilder.java:166)

Someone experienced with running node of Elasticsearch inside Jboss?
Any Idea why this happens and if possible to solve?

Igor.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No, I started working on this only with 0.90 like week ago
Before we didn't have Elasticsearch at all.

On Tuesday, May 7, 2013 10:47:42 AM UTC+3, David Pilato wrote:

Did you update from a previous version to 0.90?
Any chance that you did not clean jboss tmp folders or your app target
folder?

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet https://twitter.com/dadoonet | @elasticsearchfrhttps://twitter.com/elasticsearchfr
| @scrutmydocs https://twitter.com/scrutmydocs

Le 7 mai 2013 à 09:44, Igor Romanov <igo...@gmail.com <javascript:>> a
écrit :

Hey,

I am trying to run Elasticsearch node (0.90.0) in my JBoss(5.1 with jdk
1.7) application,
with regular code:
nodeBuilder.clusterName(clusterName);
nodeBuilder.data(true);
node = nodeBuilder.node();
client = node.client();

and having exception with something like 229 Guice errors on different
classes:

org.elasticsearch.common.inject.CreationException: Guice creation errors:

  1. Error injecting constructor, java.lang.IllegalStateException: This is a
    proxy used to support circular references involving constructors. The
    object we're proxying is not constructed yet. Please wait until after
    injection has completed to use this object.
    at org.elasticsearch.cache.NodeCache.(Unknown Source)
    while locating org.elasticsearch.cache.NodeCache
    Caused by: java.lang.IllegalStateException: This is a proxy used to
    support circular references involving constructors. The object we're
    proxying is not constructed yet. Please wait until after injection has
    completed to use this object.
    at
    org.elasticsearch.common.inject.internal.ConstructionContext$DelegatingInvocationHandler.invoke(ConstructionContext.java:102)
    at $Proxy1017.add(Unknown Source)
    at org.elasticsearch.cache.NodeCache.(NodeCache.java:44)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at
    sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    at
    sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
    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:98)
    at
    org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45)
    at
    org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:819)
    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:45)
    at
    org.elasticsearch.common.inject.InjectorBuilder$1.call(InjectorBuilder.java:200)
    at
    org.elasticsearch.common.inject.InjectorBuilder$1.call(InjectorBuilder.java:193)
    at
    org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:812)
    at
    org.elasticsearch.common.inject.InjectorBuilder.loadEagerSingletons(InjectorBuilder.java:193)
    at
    org.elasticsearch.common.inject.InjectorBuilder.injectDynamically(InjectorBuilder.java:175)
    at
    org.elasticsearch.common.inject.InjectorBuilder.build(InjectorBuilder.java:110)
    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:59)
    at
    org.elasticsearch.node.internal.InternalNode.(InternalNode.java:164)
    at org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:159)
    at org.elasticsearch.node.NodeBuilder.node(NodeBuilder.java:166)

...
...

229 errors
at
org.elasticsearch.common.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:343)
at
org.elasticsearch.common.inject.InjectorBuilder.injectDynamically(InjectorBuilder.java:178)
at
org.elasticsearch.common.inject.InjectorBuilder.build(InjectorBuilder.java:110)
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:59)
at
org.elasticsearch.node.internal.InternalNode.(InternalNode.java:164)
at org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:159)
at org.elasticsearch.node.NodeBuilder.node(NodeBuilder.java:166)

Someone experienced with running node of Elasticsearch inside Jboss?
Any Idea why this happens and if possible to solve?

Igor.

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearc...@googlegroups.com <javascript:>.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

I've never heard about such errors. In my former job, I was using ES embedded in a Webapp running under JBoss5 as well and did not have these issues.
I never tested it with ES 0.90.

Anyone else tried it?

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr | @scrutmydocs

Le 7 mai 2013 à 09:49, Igor Romanov igorrom@gmail.com a écrit :

No, I started working on this only with 0.90 like week ago
Before we didn't have Elasticsearch at all.

On Tuesday, May 7, 2013 10:47:42 AM UTC+3, David Pilato wrote:
Did you update from a previous version to 0.90?
Any chance that you did not clean jboss tmp folders or your app target folder?

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr | @scrutmydocs

Le 7 mai 2013 à 09:44, Igor Romanov igo...@gmail.com a écrit :

Hey,

I am trying to run Elasticsearch node (0.90.0) in my JBoss(5.1 with jdk 1.7) application,
with regular code:
nodeBuilder.clusterName(clusterName);
nodeBuilder.data(true);
node = nodeBuilder.node();
client = node.client();

and having exception with something like 229 Guice errors on different classes:

org.elasticsearch.common.inject.CreationException: Guice creation errors:

  1. Error injecting constructor, java.lang.IllegalStateException: This is a proxy used to support circular references involving constructors. The object we're proxying is not constructed yet. Please wait until after injection has completed to use this object.
    at org.elasticsearch.cache.NodeCache.(Unknown Source)
    while locating org.elasticsearch.cache.NodeCache
    Caused by: java.lang.IllegalStateException: This is a proxy used to support circular references involving constructors. The object we're proxying is not constructed yet. Please wait until after injection has completed to use this object.
    at org.elasticsearch.common.inject.internal.ConstructionContext$DelegatingInvocationHandler.invoke(ConstructionContext.java:102)
    at $Proxy1017.add(Unknown Source)
    at org.elasticsearch.cache.NodeCache.(NodeCache.java:44)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
    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:98)
    at org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45)
    at org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:819)
    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:45)
    at org.elasticsearch.common.inject.InjectorBuilder$1.call(InjectorBuilder.java:200)
    at org.elasticsearch.common.inject.InjectorBuilder$1.call(InjectorBuilder.java:193)
    at org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:812)
    at org.elasticsearch.common.inject.InjectorBuilder.loadEagerSingletons(InjectorBuilder.java:193)
    at org.elasticsearch.common.inject.InjectorBuilder.injectDynamically(InjectorBuilder.java:175)
    at org.elasticsearch.common.inject.InjectorBuilder.build(InjectorBuilder.java:110)
    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:59)
    at org.elasticsearch.node.internal.InternalNode.(InternalNode.java:164)
    at org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:159)
    at org.elasticsearch.node.NodeBuilder.node(NodeBuilder.java:166)

...
...

229 errors
at org.elasticsearch.common.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:343)
at org.elasticsearch.common.inject.InjectorBuilder.injectDynamically(InjectorBuilder.java:178)
at org.elasticsearch.common.inject.InjectorBuilder.build(InjectorBuilder.java:110)
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:59)
at org.elasticsearch.node.internal.InternalNode.(InternalNode.java:164)
at org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:159)
at org.elasticsearch.node.NodeBuilder.node(NodeBuilder.java:166)

Someone experienced with running node of Elasticsearch inside Jboss?
Any Idea why this happens and if possible to solve?

Igor.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearc...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Solved the issue, I was working with JDK 7u5, upgraded it to 7u21

Thanks!
Igor

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.