Error using elasticsearch with OSGi


(Vivek Sachdeva) #1

I am using elastic search 1.0.1 and have following dependency in POM.

org.apache.servicemix.bundles

org.apache.servicemix.bundles.elasticsearch
1.0.0_1

I am getting multiple errors some of them being:

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

  1. Error injecting constructor, java.lang.NoClassDefFoundError:
    sun/misc/Unsafe
    at org.elasticsearch.threadpool.ThreadPool.(Unknown Source)
    while locating org.elasticsearch.threadpool.ThreadPool
    Caused by: java.lang.NoClassDefFoundError: sun/misc/Unsafe

  2. Error injecting constructor, java.lang.NoClassDefFoundError: Could not
    initialize class org.elasticsearch.common.util.concurrent.jsr166e.LongAdder
    at org.elasticsearch.threadpool.ThreadPool.(Unknown Source)
    while locating org.elasticsearch.threadpool.ThreadPool
    for parameter 1 at
    org.elasticsearch.transport.netty.NettyTransport.(Unknown Source)
    while locating org.elasticsearch.transport.netty.NettyTransport
    while locating org.elasticsearch.transport.Transport
    for parameter 1 at
    org.elasticsearch.transport.TransportService.(Unknown Source)
    while locating org.elasticsearch.transport.TransportService
    Caused by: java.lang.NoClassDefFoundError: Could not initialize class
    org.elasticsearch.common.util.concurrent.jsr166e.LongAdder

Any idea!!!!

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/0f279584-8e33-4194-8fad-d5db2dbea82e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


(Vivek Sachdeva) #2

I am using:
TransportClient transportClient = new TransportClient(settingsBuilder())

where

def settingsBuilder() {
def transportSettings = ImmutableSettings.settingsBuilder().put("
cluster.name", "elasticsearch");
transportSettings.put("client.transport.ping_timeout", "60000")
transportSettings.put("client.transport.ignore_cluster_name", true)
// Use the "sniff" feature of transport client ?
transportSettings.put("client.transport.sniff", false)
return transportSettings
}

On Tue, Jul 22, 2014 at 5:45 PM, Vivek Sachdeva <
vivek.sachdeva@intelligrape.com> wrote:

I am using elastic search 1.0.1 and have following dependency in POM.

org.apache.servicemix.bundles

org.apache.servicemix.bundles.elasticsearch
1.0.0_1

I am getting multiple errors some of them being:

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

  1. Error injecting constructor, java.lang.NoClassDefFoundError:
    sun/misc/Unsafe
    at org.elasticsearch.threadpool.ThreadPool.(Unknown Source)
    while locating org.elasticsearch.threadpool.ThreadPool
    Caused by: java.lang.NoClassDefFoundError: sun/misc/Unsafe

  2. Error injecting constructor, java.lang.NoClassDefFoundError: Could not
    initialize class org.elasticsearch.common.util.concurrent.jsr166e.LongAdder
    at org.elasticsearch.threadpool.ThreadPool.(Unknown Source)
    while locating org.elasticsearch.threadpool.ThreadPool
    for parameter 1 at
    org.elasticsearch.transport.netty.NettyTransport.(Unknown Source)
    while locating org.elasticsearch.transport.netty.NettyTransport
    while locating org.elasticsearch.transport.Transport
    for parameter 1 at
    org.elasticsearch.transport.TransportService.(Unknown Source)
    while locating org.elasticsearch.transport.TransportService
    Caused by: java.lang.NoClassDefFoundError: Could not initialize class
    org.elasticsearch.common.util.concurrent.jsr166e.LongAdder

Any idea!!!!

--
You received this message because you are subscribed to a topic in the
Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/elasticsearch/1vDijYLylwc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/0f279584-8e33-4194-8fad-d5db2dbea82e%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/0f279584-8e33-4194-8fad-d5db2dbea82e%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

--
Thanks & Regards.
Vivek Sachdeva
Intelligrape Software Pvt. Ltd.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CABpbMD2KfXLHEVR9C01K-FxT9-KsA76bJ7ybKVdrK8JSwb%3DD7A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


(system) #3