Hi Jennifer,

Take a look at index compatibility beside dependencies. Here is the
explanation:

Index Format Changes

Solr 6 has no support for reading Lucene/Solr 4.x and earlier indexes.  Be
sure to run the Lucene IndexUpgrader included with Solr 5.5 if you might
still have old 4x formatted segments in your index. Alternatively: fully
optimize your index with Solr 5.5 to make sure it consists only of one
up-to-date index segment.

You can read more from here:
https://cwiki.apache.org/confluence/display/solr/Major+Changes+from+Solr+5+to+Solr+6

Kind Regards,
Furkan KAMACI


On Tue, Jan 3, 2017 at 7:35 PM, Jennifer Coston <
jennifer.cos...@raytheon.com> wrote:

> Hello,
>
> I am running into a conflict with Solr and ElasticSearch. We are trying to
> add support for Elastic Search 5.1.1 which requires Lucene 6.3.0 to an
> existing system that uses Solr 5.2.3. At the moment I am using SolrJ 5.3.1
> to talk to the 5.2.3 Server. I was hoping I could just update the SolrJ
> libraries to 6.3.0 so the Lucene conflict goes away, but when I try to run
> my unit tests I'm seeing this error:
>
> java.util.ServiceConfigurationError: Cannot instantiate SPI class:
> org.apache.lucene.codecs.simpletext.SimpleTextPostingsFormat
>                 at org.apache.lucene.util.NamedSPILoader.reload(
> NamedSPILoader.java:82)
>                 at org.apache.lucene.codecs.PostingsFormat.
> reloadPostingsFormats(PostingsFormat.java:132)
>                 at org.apache.solr.core.SolrResourceLoader.
> reloadLuceneSPI(SolrResourceLoader.java:237)
>                 at org.apache.solr.core.SolrResourceLoader.<init>(
> SolrResourceLoader.java:182)
>                 at org.apache.solr.core.SolrResourceLoader.<init>(
> SolrResourceLoader.java:142)
>                 at org.apache.solr.core.CoreContainer.<init>(
> CoreContainer.java:217)
>                 at com.rtn.iaf.catalog.test.SolrAnalyticClientTest.
> setUpBeforeClass(SolrAnalyticClientTest.java:59)
>                 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
>                 at sun.reflect.NativeMethodAccessorImpl.invoke(
> NativeMethodAccessorImpl.java:62)
>                 at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:43)
>                 at java.lang.reflect.Method.invoke(Method.java:498)
>                 at org.junit.runners.model.FrameworkMethod$1.
> runReflectiveCall(FrameworkMethod.java:50)
>                 at org.junit.internal.runners.
> model.ReflectiveCallable.run(ReflectiveCallable.java:12)
>                 at org.junit.runners.model.FrameworkMethod.
> invokeExplosively(FrameworkMethod.java:47)
>                 at org.junit.internal.runners.statements.RunBefores.
> evaluate(RunBefores.java:24)
>                 at org.junit.internal.runners.
> statements.RunAfters.evaluate(RunAfters.java:27)
>                 at org.junit.runners.ParentRunner.run(ParentRunner.
> java:363)
>                 at org.eclipse.jdt.internal.junit4.runner.
> JUnit4TestReference.run(JUnit4TestReference.java:86)
>                 at org.eclipse.jdt.internal.junit.runner.TestExecution.
> run(TestExecution.java:38)
>                 at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.
> runTests(RemoteTestRunner.java:459)
>                 at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.
> runTests(RemoteTestRunner.java:675)
>                 at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.
> run(RemoteTestRunner.java:382)
>                 at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.
> main(RemoteTestRunner.java:192)
> Caused by: java.lang.IllegalAccessException: Class 
> org.apache.lucene.util.NamedSPILoader
> can not access a member of class 
> org.apache.lucene.codecs.simpletext.SimpleTextPostingsFormat
> with modifiers "public"
>                 at sun.reflect.Reflection.ensureMemberAccess(Reflection.
> java:102)
>                 at java.lang.Class.newInstance(Class.java:436)
>                 at org.apache.lucene.util.NamedSPILoader.reload(
> NamedSPILoader.java:72)
>                 ... 22 more
> Is it possible to talk to the 5.2.3 Server using SolrJ 6.3.0?
>
> Here are the Solr Dependencies I have in my pom.xml:
>
> <!-- Solr dependencies -->
>               <dependency>
>                      <groupId>org.apache.solr</groupId>
>                      <artifactId>solr-solrj</artifactId>
>                      <version>6.3.0</version>
>               </dependency>
>               <!-- Required by embedded solr server -->
>               <dependency>
>                      <groupId>org.apache.solr</groupId>
>                      <artifactId>solr-core</artifactId>
>                      <version>6.3.0</version>
>                      <scope>test</scope>
>                      <exclusions>
>                            <exclusion>
>                                   <artifactId>jdk.tools</artifactId>
>                                   <groupId>jdk.tools</groupId>
>                            </exclusion>
>                            <exclusion>
>                                   <artifactId>jetty-
> continuation</artifactId>
>                                   <groupId>org.eclipse.jetty</groupId>
>                            </exclusion>
>                            <exclusion>
>                                   <artifactId>jetty-deploy</artifactId>
>                                   <groupId>org.eclipse.jetty</groupId>
>                            </exclusion>
>                            <exclusion>
>                                   <artifactId>jetty-jmx</artifactId>
>                                   <groupId>org.eclipse.jetty</groupId>
>                            </exclusion>
>                            <exclusion>
>                                   <artifactId>jetty-rewrite</artifactId>
>                                   <groupId>org.eclipse.jetty</groupId>
>                            </exclusion>
>                            <exclusion>
>                                   <artifactId>jetty-servlets</artifactId>
>                                   <groupId>org.eclipse.jetty</groupId>
>                            </exclusion>
>                            <exclusion>
>                                   <artifactId>jetty-util</artifactId>
>                                   <groupId>org.eclipse.jetty</groupId>
>                            </exclusion>
>                            <exclusion>
>                                   <artifactId>hadoop-
> annotations</artifactId>
>                                   <groupId>org.apache.hadoop</groupId>
>                            </exclusion>
>                            <exclusion>
>                                   <artifactId>hadoop-auth</artifactId>
>                                   <groupId>org.apache.hadoop</groupId>
>                            </exclusion>
>                            <exclusion>
>                                   <artifactId>hadoop-common</artifactId>
>                                   <groupId>org.apache.hadoop</groupId>
>                            </exclusion>
>                            <exclusion>
>                                   <artifactId>hadoop-hdfs</artifactId>
>                                   <groupId>org.apache.hadoop</groupId>
>                            </exclusion>
>                      </exclusions>
>               </dependency>
>
> Please let me know if you need any additional information.
>
> Thank you!
> - Jennifer
>
>

Reply via email to