servicemix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Baptiste Onofré (JIRA) <j...@apache.org>
Subject [jira] [Reopened] (SMX4-1637) ElasticSearch bundle 0.90.5 does not work as SPI is not supported
Date Sat, 28 Dec 2013 07:09:50 GMT

     [ https://issues.apache.org/jira/browse/SMX4-1637?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Jean-Baptiste Onofré reopened SMX4-1637:
----------------------------------------


> ElasticSearch bundle 0.90.5 does not work as SPI is not supported
> -----------------------------------------------------------------
>
>                 Key: SMX4-1637
>                 URL: https://issues.apache.org/jira/browse/SMX4-1637
>             Project: ServiceMix 4
>          Issue Type: Bug
>          Components: Bundles
>            Reporter: Charles Moulliard
>            Assignee: Jean-Baptiste Onofré
>             Fix For: bundles-2013.12
>
>
> Existing bundle of SMX - ElasticSearch bundle 0.90.5 does not support SPI (Service Locator)
and in consequence classes cannot be retrieved :
> {code}
> Caused by: java.lang.IllegalArgumentException: A SPI class of type org.apache.lucene.codecs.PostingsFormat
with name 'Memory' does not exist. You need to add the corresponding JAR file supporting this
SPI to your classpath.The current classpath supports the following names: [XBloomFilter, es090,
completion090, Direct]
> 	at org.apache.lucene.util.NamedSPILoader.lookup(NamedSPILoader.java:109)[75:org.apache.servicemix.bundles.elasticsearch:0.90.5.2-SNAPSHOT]
> 	at org.apache.lucene.codecs.PostingsFormat.forName(PostingsFormat.java:100)[75:org.apache.servicemix.bundles.elasticsearch:0.90.5.2-SNAPSHOT]
> 	at org.elasticsearch.index.codec.postingsformat.PostingFormats.<clinit>(PostingFormats.java:70)[75:org.apache.servicemix.bundles.elasticsearch:0.90.5.2-SNAPSHOT]
> 	... 15 more
> {code}
> That means that Require and Provide-Capibility must be added to the MANIFEST file generated
> {code}
>                         <Provide-Capability>
>                             osgi.serviceloader; osgi.serviceloader=org.apache.lucene.codecs.Codec,
>                             osgi.serviceloader; osgi.serviceloader=org.apache.lucene.codecs.PostingsFormat,
>                             osgi.serviceloader; osgi.serviceloader=org.apache.lucene.codecs.DocValuesFormat
>                         </Provide-Capability>
>                         <Require-Capability>
>                             osgi.extender; filter:="(osgi.extender=osgi.serviceloader.registrar)"
>                         </Require-Capability>
> {code}
> and that the files located under META-INF/Services must be merged.
> Remark : As split-package does not work in this situation, the workaround has been to
add as resources files, the files resulting from the merge between classes of lucene-core
and elasticsearch
> {code}
> org.apache.lucene.codecs.Codec
> org.apache.lucene.codecs.DocValuesFormat
> org.apache.lucene.codecs.PostingsFormat
> {code}



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Mime
View raw message