com.floragunn/search-guard/0.5 does not work with elasticsearch 1.6.0

I tried to install search-guard as in README.md.
I have installed elasticsearch 1.6.0 on CentOS using rpm.

I have run “sudo bin/plugin -i com.floragunn/search-guard/0.5” in /usr/share/elasticsearch and found the jars in plugins/search-guard directory.

But, when I tried to start elastic search using “sudo /etc/init.d/elasticsearch start” the following error occured.

(left in /var/log/elasticsearch/clustername.log)

2015-06-29 22:09:02,904][INFO ][node ] [Human Top II] version[1.6.0], pid[24173], build[cdd3ac4/2015-06-09T13:36:34Z]

[2015-06-29 22:09:02,905][INFO ][node ] [Human Top II] initializing …

[2015-06-29 22:09:03,154][INFO ][com.floragunn.searchguard.SearchGuardPlugin] Class enhancements for DLS/FLS successful

[2015-06-29 22:09:03,156][INFO ][plugins ] [Human Top II] loaded [searchguard], sites

[2015-06-29 22:09:03,216][INFO ][env ] [Human Top II] using [1] data paths, mounts [[/ (/dev/xvda1)]], net usable_space [1.9gb], net total_space [9.7gb], types [ext4]

[2015-06-29 22:09:04,965][ERROR][bootstrap ] Exception

org.elasticsearch.common.util.concurrent.ExecutionError: java.lang.NoClassDefFoundError: org/elasticsearch/common/ContextHolder

at org.elasticsearch.common.cache.LocalCache$Segment.get(LocalCache.java:2201)

at org.elasticsearch.common.cache.LocalCache.get(LocalCache.java:3937)

at org.elasticsearch.common.cache.LocalCache.getOrLoad(LocalCache.java:3941)

at org.elasticsearch.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4824)

at org.elasticsearch.common.inject.internal.FailableCache.get(FailableCache.java:51)

at org.elasticsearch.common.inject.ConstructorInjectorStore.get(ConstructorInjectorStore.java:50)

at org.elasticsearch.common.inject.ConstructorBindingImpl.initialize(ConstructorBindingImpl.java:50)

at org.elasticsearch.common.inject.InjectorImpl.initializeBinding(InjectorImpl.java:372)

at org.elasticsearch.common.inject.InjectorImpl.createJustInTimeBinding(InjectorImpl.java:645)

at org.elasticsearch.common.inject.InjectorImpl.createJustInTimeBindingRecursive(InjectorImpl.java:580)

at org.elasticsearch.common.inject.InjectorImpl.getJustInTimeBinding(InjectorImpl.java:159)

at org.elasticsearch.common.inject.InjectorImpl.getBindingOrThrow(InjectorImpl.java:119)

at org.elasticsearch.common.inject.InjectorImpl.getInternalFactory(InjectorImpl.java:651)

at org.elasticsearch.common.inject.FactoryProxy.notify(FactoryProxy.java:44)

at org.elasticsearch.common.inject.BindingProcessor.runCreationListeners(BindingProcessor.java:210)

at org.elasticsearch.common.inject.InjectorBuilder.initializeStatically(InjectorBuilder.java:130)

at org.elasticsearch.common.inject.InjectorBuilder.build(InjectorBuilder.java:102)

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:207)

at org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:159)

at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:77)

at org.elasticsearch.bootstrap.Bootstrap.main(Bootstrap.java:245)

at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:32)

Caused by: java.lang.NoClassDefFoundError: org/elasticsearch/common/ContextHolder

at java.lang.Class.getDeclaredConstructors0(Native Method)

at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)

at java.lang.Class.getDeclaredConstructors(Class.java:2020)

at org.elasticsearch.common.inject.spi.InjectionPoint.forConstructorOf(InjectionPoint.java:177)

at org.elasticsearch.common.inject.ConstructorInjectorStore.createConstructor(ConstructorInjectorStore.java:59)

at org.elasticsearch.common.inject.ConstructorInjectorStore.access$000(ConstructorInjectorStore.java:29)

at org.elasticsearch.common.inject.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:37)

at org.elasticsearch.common.inject.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:33)

at org.elasticsearch.common.inject.internal.FailableCache$1.load(FailableCache.java:39)

at org.elasticsearch.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3527)

at org.elasticsearch.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2319)

at org.elasticsearch.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2282)

at org.elasticsearch.common.cache.LocalCache$Segment.get(LocalCache.java:2197)

… 24 more

Caused by: java.lang.ClassNotFoundException: org.elasticsearch.common.ContextHolder

at java.net.URLClassLoader.findClass(URLClassLoader.java:381)

at java.lang.ClassLoader.loadClass(ClassLoader.java:424)

at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)

at java.lang.ClassLoader.loadClass(ClassLoader.java:357)

… 37 more

I have tried on several JVMs (OpenJDK, Oracle, Java 7/8). But the results are the same.

Any Idea?

Version 0.5 works only with elasticsearch 1.5
For elasticsearch 1.6 look here (you have to build this version yourself with maven): https://github.com/floragunncom/search-guard/tree/es1.6

···

Am 29.06.2015 um 15:17 schrieb Joo-Won Jung <sanori@gmail.com>:

I tried to install search-guard as in README.md.
I have installed elasticsearch 1.6.0 on CentOS using rpm.
I have run "sudo bin/plugin -i com.floragunn/search-guard/0.5" in /usr/share/elasticsearch and found the jars in plugins/search-guard directory.

But, when I tried to start elastic search using "sudo /etc/init.d/elasticsearch start" the following error occured.
(left in /var/log/elasticsearch/clustername.log)
2015-06-29 22:09:02,904][INFO ][node ] [Human Top II] version[1.6.0], pid[24173], build[cdd3ac4/2015-06-09T13:36:34Z]
[2015-06-29 22:09:02,905][INFO ][node ] [Human Top II] initializing ...
[2015-06-29 22:09:03,154][INFO ][com.floragunn.searchguard.SearchGuardPlugin] Class enhancements for DLS/FLS successful
[2015-06-29 22:09:03,156][INFO ][plugins ] [Human Top II] loaded [searchguard], sites
[2015-06-29 22:09:03,216][INFO ][env ] [Human Top II] using [1] data paths, mounts [[/ (/dev/xvda1)]], net usable_space [1.9gb], net total_space [9.7gb], types [ext4]
[2015-06-29 22:09:04,965][ERROR][bootstrap ] Exception
org.elasticsearch.common.util.concurrent.ExecutionError: java.lang.NoClassDefFoundError: org/elasticsearch/common/ContextHolder
        at org.elasticsearch.common.cache.LocalCache$Segment.get(LocalCache.java:2201)
        at org.elasticsearch.common.cache.LocalCache.get(LocalCache.java:3937)
        at org.elasticsearch.common.cache.LocalCache.getOrLoad(LocalCache.java:3941)
        at org.elasticsearch.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4824)
        at org.elasticsearch.common.inject.internal.FailableCache.get(FailableCache.java:51)
        at org.elasticsearch.common.inject.ConstructorInjectorStore.get(ConstructorInjectorStore.java:50)
        at org.elasticsearch.common.inject.ConstructorBindingImpl.initialize(ConstructorBindingImpl.java:50)
        at org.elasticsearch.common.inject.InjectorImpl.initializeBinding(InjectorImpl.java:372)
        at org.elasticsearch.common.inject.InjectorImpl.createJustInTimeBinding(InjectorImpl.java:645)
        at org.elasticsearch.common.inject.InjectorImpl.createJustInTimeBindingRecursive(InjectorImpl.java:580)
        at org.elasticsearch.common.inject.InjectorImpl.getJustInTimeBinding(InjectorImpl.java:159)
        at org.elasticsearch.common.inject.InjectorImpl.getBindingOrThrow(InjectorImpl.java:119)
        at org.elasticsearch.common.inject.InjectorImpl.getInternalFactory(InjectorImpl.java:651)
        at org.elasticsearch.common.inject.FactoryProxy.notify(FactoryProxy.java:44)
        at org.elasticsearch.common.inject.BindingProcessor.runCreationListeners(BindingProcessor.java:210)
        at org.elasticsearch.common.inject.InjectorBuilder.initializeStatically(InjectorBuilder.java:130)
        at org.elasticsearch.common.inject.InjectorBuilder.build(InjectorBuilder.java:102)
        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.<init>(InternalNode.java:207)
        at org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:159)
        at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:77)
        at org.elasticsearch.bootstrap.Bootstrap.main(Bootstrap.java:245)
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:32)
Caused by: java.lang.NoClassDefFoundError: org/elasticsearch/common/ContextHolder
        at java.lang.Class.getDeclaredConstructors0(Native Method)
        at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)
        at java.lang.Class.getDeclaredConstructors(Class.java:2020)
        at org.elasticsearch.common.inject.spi.InjectionPoint.forConstructorOf(InjectionPoint.java:177)
        at org.elasticsearch.common.inject.ConstructorInjectorStore.createConstructor(ConstructorInjectorStore.java:59)
        at org.elasticsearch.common.inject.ConstructorInjectorStore.access$000(ConstructorInjectorStore.java:29)
        at org.elasticsearch.common.inject.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:37)
        at org.elasticsearch.common.inject.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:33)
        at org.elasticsearch.common.inject.internal.FailableCache$1.load(FailableCache.java:39)
        at org.elasticsearch.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3527)
        at org.elasticsearch.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2319)
        at org.elasticsearch.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2282)
        at org.elasticsearch.common.cache.LocalCache$Segment.get(LocalCache.java:2197)
        ... 24 more
Caused by: java.lang.ClassNotFoundException: org.elasticsearch.common.ContextHolder
        at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        ... 37 more

I have tried on several JVMs (OpenJDK, Oracle, Java 7/8). But the results are the same.

Any Idea?

--
You received this message because you are subscribed to the Google Groups "Search Guard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to search-guard+unsubscribe@googlegroups.com.
To post to this group, send email to search-guard@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/search-guard/40fcf5c1-e394-49ac-b691-55118a403e0c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Danke schön

It would be better if there are specific instructions for ES 1.6 in README.md or somewhere.

I have succeeded as the following

$ git clone -b es1.6 https://github.com/floragunncom/search-guard.git

(master branch may not work)

$ cd search-guard

$ sudo docker run -it --rm --name my-maven-project -v “$PWD”:/usr/src/mymaven -w /usr/src/mymaven maven mvn package -DskipTests

(CentOS does not have rpm for maven. Therefore I have used maven docker image to build the package)

$ sudo /usr/share/elasticsearch/bin/plugin -u file:.target/releases/search-guard-16-0.6-SNAPSHOT.zip -i search-guard

Hope this helps.

-Sanori

···

On Monday, June 29, 2015 at 11:10:10 PM UTC+9, SG wrote:

Version 0.5 works only with elasticsearch 1.5

For elasticsearch 1.6 look here (you have to build this version yourself with maven): https://github.com/floragunncom/search-guard/tree/es1.6

Am 29.06.2015 um 15:17 schrieb Joo-Won Jung san...@gmail.com:

I tried to install search-guard as in README.md.

I have installed elasticsearch 1.6.0 on CentOS using rpm.

I have run “sudo bin/plugin -i com.floragunn/search-guard/0.5” in /usr/share/elasticsearch and found the jars in plugins/search-guard directory.

But, when I tried to start elastic search using “sudo /etc/init.d/elasticsearch start” the following error occured.

(left in /var/log/elasticsearch/clustername.log)

2015-06-29 22:09:02,904][INFO ][node ] [Human Top II] version[1.6.0], pid[24173], build[cdd3ac4/2015-06-09T13:36:34Z]

[2015-06-29 22:09:02,905][INFO ][node ] [Human Top II] initializing …

[2015-06-29 22:09:03,154][INFO ][com.floragunn.searchguard.SearchGuardPlugin] Class enhancements for DLS/FLS successful

[2015-06-29 22:09:03,156][INFO ][plugins ] [Human Top II] loaded [searchguard], sites

[2015-06-29 22:09:03,216][INFO ][env ] [Human Top II] using [1] data paths, mounts [[/ (/dev/xvda1)]], net usable_space [1.9gb], net total_space [9.7gb], types [ext4]

[2015-06-29 22:09:04,965][ERROR][bootstrap ] Exception

org.elasticsearch.common.util.concurrent.ExecutionError: java.lang.NoClassDefFoundError: org/elasticsearch/common/ContextHolder

    at org.elasticsearch.common.cache.LocalCache$Segment.get(LocalCache.java:2201)
    at org.elasticsearch.common.cache.LocalCache.get(LocalCache.java:3937)
    at org.elasticsearch.common.cache.LocalCache.getOrLoad(LocalCache.java:3941)
    at org.elasticsearch.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4824)
    at org.elasticsearch.common.inject.internal.FailableCache.get(FailableCache.java:51)
    at org.elasticsearch.common.inject.ConstructorInjectorStore.get(ConstructorInjectorStore.java:50)
    at org.elasticsearch.common.inject.ConstructorBindingImpl.initialize(ConstructorBindingImpl.java:50)
    at org.elasticsearch.common.inject.InjectorImpl.initializeBinding(InjectorImpl.java:372)
    at org.elasticsearch.common.inject.InjectorImpl.createJustInTimeBinding(InjectorImpl.java:645)
    at org.elasticsearch.common.inject.InjectorImpl.createJustInTimeBindingRecursive(InjectorImpl.java:580)
    at org.elasticsearch.common.inject.InjectorImpl.getJustInTimeBinding(InjectorImpl.java:159)
    at org.elasticsearch.common.inject.InjectorImpl.getBindingOrThrow(InjectorImpl.java:119)
    at org.elasticsearch.common.inject.InjectorImpl.getInternalFactory(InjectorImpl.java:651)
    at org.elasticsearch.common.inject.FactoryProxy.notify(FactoryProxy.java:44)
    at org.elasticsearch.common.inject.BindingProcessor.runCreationListeners(BindingProcessor.java:210)
    at org.elasticsearch.common.inject.InjectorBuilder.initializeStatically(InjectorBuilder.java:130)
    at org.elasticsearch.common.inject.InjectorBuilder.build(InjectorBuilder.java:102)
    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.<init>(InternalNode.java:207)
    at org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:159)
    at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:77)
    at org.elasticsearch.bootstrap.Bootstrap.main(Bootstrap.java:245)
    at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:32)

Caused by: java.lang.NoClassDefFoundError: org/elasticsearch/common/ContextHolder

    at java.lang.Class.getDeclaredConstructors0(Native Method)
    at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)
    at java.lang.Class.getDeclaredConstructors(Class.java:2020)
    at org.elasticsearch.common.inject.spi.InjectionPoint.forConstructorOf(InjectionPoint.java:177)
    at org.elasticsearch.common.inject.ConstructorInjectorStore.createConstructor(ConstructorInjectorStore.java:59)
    at org.elasticsearch.common.inject.ConstructorInjectorStore.access$000(ConstructorInjectorStore.java:29)
    at org.elasticsearch.common.inject.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:37)
    at org.elasticsearch.common.inject.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:33)
    at org.elasticsearch.common.inject.internal.FailableCache$1.load(FailableCache.java:39)
    at org.elasticsearch.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3527)
    at org.elasticsearch.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2319)
    at org.elasticsearch.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2282)
    at org.elasticsearch.common.cache.LocalCache$Segment.get(LocalCache.java:2197)
    ... 24 more

Caused by: java.lang.ClassNotFoundException: org.elasticsearch.common.ContextHolder

    at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    ... 37 more

I have tried on several JVMs (OpenJDK, Oracle, Java 7/8). But the results are the same.

Any Idea?


You received this message because you are subscribed to the Google Groups “Search Guard” group.

To unsubscribe from this group and stop receiving emails from it, send an email to search-guard...@googlegroups.com.

To post to this group, send email to search...@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/search-guard/40fcf5c1-e394-49ac-b691-55118a403e0c%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

I comfirmed that install Search-guard for ES1.6 with “git clone https://github.com/floragunncom/search-guard.git” is not working.

You must use “git clone -b es1.6 https://github.com/floragunncom/search-guard.git

Thank you for your confirmation.

···

On Tuesday, June 30, 2015 at 4:58:13 PM UTC+9, Truong Van Linh wrote:

I comfirmed that install Search-guard for ES1.6 with “git clone https://github.com/floragunncom/search-guard.git” is not working.

You must use “git clone -b es1.6 https://github.com/floragunncom/search-guard.git

Hello,
I haven’t been able to make search-guard work with ES 1.6.
I did this
git clone -b es1.6 https://github.com/floragunncom/search-guard.git
then `mvn package -DskipTests
/usr/bin/elasticsearch-plugin -u file:./target/search-guard-16-0.6-SNAPSHOT.jar -i search-guard

I get this error
https://gist.github.com/vanga/8f0fdb5157cd22046a0a

I am on ArchLinux
`

···

On Monday, June 29, 2015 at 6:47:33 PM UTC+5:30, Joo-Won Jung wrote:

I tried to install search-guard as in README.md.
I have installed elasticsearch 1.6.0 on CentOS using rpm.

I have run “sudo bin/plugin -i com.floragunn/search-guard/0.5” in /usr/share/elasticsearch and found the jars in plugins/search-guard directory.

But, when I tried to start elastic search using “sudo /etc/init.d/elasticsearch start” the following error occured.

(left in /var/log/elasticsearch/clustername.log)

2015-06-29 22:09:02,904][INFO ][node ] [Human Top II] version[1.6.0], pid[24173], build[cdd3ac4/2015-06-09T13:36:34Z]

[2015-06-29 22:09:02,905][INFO ][node ] [Human Top II] initializing …

[2015-06-29 22:09:03,154][INFO ][com.floragunn.searchguard.SearchGuardPlugin] Class enhancements for DLS/FLS successful

[2015-06-29 22:09:03,156][INFO ][plugins ] [Human Top II] loaded [searchguard], sites

[2015-06-29 22:09:03,216][INFO ][env ] [Human Top II] using [1] data paths, mounts [[/ (/dev/xvda1)]], net usable_space [1.9gb], net total_space [9.7gb], types [ext4]

[2015-06-29 22:09:04,965][ERROR][bootstrap ] Exception

org.elasticsearch.common.util.concurrent.ExecutionError: java.lang.NoClassDefFoundError: org/elasticsearch/common/ContextHolder

at org.elasticsearch.common.cache.LocalCache$Segment.get(LocalCache.java:2201)

at org.elasticsearch.common.cache.LocalCache.get(LocalCache.java:3937)

at org.elasticsearch.common.cache.LocalCache.getOrLoad(LocalCache.java:3941)

at org.elasticsearch.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4824)

at org.elasticsearch.common.inject.internal.FailableCache.get(FailableCache.java:51)

at org.elasticsearch.common.inject.ConstructorInjectorStore.get(ConstructorInjectorStore.java:50)

at org.elasticsearch.common.inject.ConstructorBindingImpl.initialize(ConstructorBindingImpl.java:50)

at org.elasticsearch.common.inject.InjectorImpl.initializeBinding(InjectorImpl.java:372)

at org.elasticsearch.common.inject.InjectorImpl.createJustInTimeBinding(InjectorImpl.java:645)

at org.elasticsearch.common.inject.InjectorImpl.createJustInTimeBindingRecursive(InjectorImpl.java:580)

at org.elasticsearch.common.inject.InjectorImpl.getJustInTimeBinding(InjectorImpl.java:159)

at org.elasticsearch.common.inject.InjectorImpl.getBindingOrThrow(InjectorImpl.java:119)

at org.elasticsearch.common.inject.InjectorImpl.getInternalFactory(InjectorImpl.java:651)

at org.elasticsearch.common.inject.FactoryProxy.notify(FactoryProxy.java:44)

at org.elasticsearch.common.inject.BindingProcessor.runCreationListeners(BindingProcessor.java:210)

at org.elasticsearch.common.inject.InjectorBuilder.initializeStatically(InjectorBuilder.java:130)

at org.elasticsearch.common.inject.InjectorBuilder.build(InjectorBuilder.java:102)

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:207)

at org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:159)

at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:77)

at org.elasticsearch.bootstrap.Bootstrap.main(Bootstrap.java:245)

at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:32)

Caused by: java.lang.NoClassDefFoundError: org/elasticsearch/common/ContextHolder

at java.lang.Class.getDeclaredConstructors0(Native Method)

at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)

at java.lang.Class.getDeclaredConstructors(Class.java:2020)

at org.elasticsearch.common.inject.spi.InjectionPoint.forConstructorOf(InjectionPoint.java:177)

at org.elasticsearch.common.inject.ConstructorInjectorStore.createConstructor(ConstructorInjectorStore.java:59)

at org.elasticsearch.common.inject.ConstructorInjectorStore.access$000(ConstructorInjectorStore.java:29)

at org.elasticsearch.common.inject.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:37)

at org.elasticsearch.common.inject.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:33)

at org.elasticsearch.common.inject.internal.FailableCache$1.load(FailableCache.java:39)

at org.elasticsearch.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3527)

at org.elasticsearch.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2319)

at org.elasticsearch.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2282)

at org.elasticsearch.common.cache.LocalCache$Segment.get(LocalCache.java:2197)

… 24 more

Caused by: java.lang.ClassNotFoundException: org.elasticsearch.common.ContextHolder

at java.net.URLClassLoader.findClass(URLClassLoader.java:381)

at java.lang.ClassLoader.loadClass(ClassLoader.java:424)

at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)

at java.lang.ClassLoader.loadClass(ClassLoader.java:357)

… 37 more

I have tried on several JVMs (OpenJDK, Oracle, Java 7/8). But the results are the same.

Any Idea?

NVM, I just didn’t know how to build a package with maven, I was passing the jar file. Pls ignore the above post.

Thanks

···

On Friday, July 10, 2015 at 12:20:16 AM UTC+5:30, Pradeep Reddy wrote:

Hello,
I haven’t been able to make search-guard work with ES 1.6.
I did this
git clone -b es1.6 https://github.com/floragunncom/search-guard.git
then `mvn package -DskipTests
/usr/bin/elasticsearch-plugin -u file:./target/search-guard-16-0.6-SNAPSHOT.jar -i search-guard

I get this error
https://gist.github.com/vanga/8f0fdb5157cd22046a0a

I am on ArchLinux
`

On Monday, June 29, 2015 at 6:47:33 PM UTC+5:30, Joo-Won Jung wrote:

I tried to install search-guard as in README.md.
I have installed elasticsearch 1.6.0 on CentOS using rpm.

I have run “sudo bin/plugin -i com.floragunn/search-guard/0.5” in /usr/share/elasticsearch and found the jars in plugins/search-guard directory.

But, when I tried to start elastic search using “sudo /etc/init.d/elasticsearch start” the following error occured.

(left in /var/log/elasticsearch/clustername.log)

2015-06-29 22:09:02,904][INFO ][node ] [Human Top II] version[1.6.0], pid[24173], build[cdd3ac4/2015-06-09T13:36:34Z]

[2015-06-29 22:09:02,905][INFO ][node ] [Human Top II] initializing …

[2015-06-29 22:09:03,154][INFO ][com.floragunn.searchguard.SearchGuardPlugin] Class enhancements for DLS/FLS successful

[2015-06-29 22:09:03,156][INFO ][plugins ] [Human Top II] loaded [searchguard], sites

[2015-06-29 22:09:03,216][INFO ][env ] [Human Top II] using [1] data paths, mounts [[/ (/dev/xvda1)]], net usable_space [1.9gb], net total_space [9.7gb], types [ext4]

[2015-06-29 22:09:04,965][ERROR][bootstrap ] Exception

org.elasticsearch.common.util.concurrent.ExecutionError: java.lang.NoClassDefFoundError: org/elasticsearch/common/ContextHolder

at org.elasticsearch.common.cache.LocalCache$Segment.get(LocalCache.java:2201)

at org.elasticsearch.common.cache.LocalCache.get(LocalCache.java:3937)

at org.elasticsearch.common.cache.LocalCache.getOrLoad(LocalCache.java:3941)

at org.elasticsearch.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4824)

at org.elasticsearch.common.inject.internal.FailableCache.get(FailableCache.java:51)

at org.elasticsearch.common.inject.ConstructorInjectorStore.get(ConstructorInjectorStore.java:50)

at org.elasticsearch.common.inject.ConstructorBindingImpl.initialize(ConstructorBindingImpl.java:50)

at org.elasticsearch.common.inject.InjectorImpl.initializeBinding(InjectorImpl.java:372)

at org.elasticsearch.common.inject.InjectorImpl.createJustInTimeBinding(InjectorImpl.java:645)

at org.elasticsearch.common.inject.InjectorImpl.createJustInTimeBindingRecursive(InjectorImpl.java:580)

at org.elasticsearch.common.inject.InjectorImpl.getJustInTimeBinding(InjectorImpl.java:159)

at org.elasticsearch.common.inject.InjectorImpl.getBindingOrThrow(InjectorImpl.java:119)

at org.elasticsearch.common.inject.InjectorImpl.getInternalFactory(InjectorImpl.java:651)

at org.elasticsearch.common.inject.FactoryProxy.notify(FactoryProxy.java:44)

at org.elasticsearch.common.inject.BindingProcessor.runCreationListeners(BindingProcessor.java:210)

at org.elasticsearch.common.inject.InjectorBuilder.initializeStatically(InjectorBuilder.java:130)

at org.elasticsearch.common.inject.InjectorBuilder.build(InjectorBuilder.java:102)

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:207)

at org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:159)

at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:77)

at org.elasticsearch.bootstrap.Bootstrap.main(Bootstrap.java:245)

at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:32)

Caused by: java.lang.NoClassDefFoundError: org/elasticsearch/common/ContextHolder

at java.lang.Class.getDeclaredConstructors0(Native Method)

at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)

at java.lang.Class.getDeclaredConstructors(Class.java:2020)

at org.elasticsearch.common.inject.spi.InjectionPoint.forConstructorOf(InjectionPoint.java:177)

at org.elasticsearch.common.inject.ConstructorInjectorStore.createConstructor(ConstructorInjectorStore.java:59)

at org.elasticsearch.common.inject.ConstructorInjectorStore.access$000(ConstructorInjectorStore.java:29)

at org.elasticsearch.common.inject.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:37)

at org.elasticsearch.common.inject.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:33)

at org.elasticsearch.common.inject.internal.FailableCache$1.load(FailableCache.java:39)

at org.elasticsearch.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3527)

at org.elasticsearch.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2319)

at org.elasticsearch.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2282)

at org.elasticsearch.common.cache.LocalCache$Segment.get(LocalCache.java:2197)

… 24 more

Caused by: java.lang.ClassNotFoundException: org.elasticsearch.common.ContextHolder

at java.net.URLClassLoader.findClass(URLClassLoader.java:381)

at java.lang.ClassLoader.loadClass(ClassLoader.java:424)

at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)

at java.lang.ClassLoader.loadClass(ClassLoader.java:357)

… 37 more

I have tried on several JVMs (OpenJDK, Oracle, Java 7/8). But the results are the same.

Any Idea?