lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jennifer Coston <>
Subject RE: Can I use SolrJ 6.3.0 to talk to a Solr 5.2.3 server?
Date Wed, 04 Jan 2017 15:29:38 GMT
Can anyone explain how to get rid of this error?

java.lang.Exception: Assertions mismatch: -ea was not specified but -Dtests.asserts=true
	at __randomizedtesting.SeedInfo.seed([5B25E606A72BD541]:0)
	at org.apache.lucene.util.TestRuleAssertionsRequired$1.evaluate(
	at org.apache.lucene.util.TestRuleMarkFailure$1.evaluate(
	at org.apache.lucene.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(
	at org.apache.lucene.util.TestRuleIgnoreTestSuites$1.evaluate(
	at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(
	at com.carrotsearch.randomizedtesting.ThreadLeakControl$

Here is my test class:

public class SolrCatalogClientTest extends SolrJettyTestBase {

	private static SolrCatalogClient solrClient;	
	protected static JettySolrRunner SOLR;
	public static void setUpBeforeClass() throws Exception {
		System.setProperty("tests.asserts", "false");
		System.setProperty("solr.solr.home", "solr/conf");
		System.setProperty("", "mySolrCore");
		System.setProperty("", new File("target/solr-embedded-data").getAbsolutePath());
		System.out.println("Initializing Solr for JUnit tests");
		SOLR = createJetty(

		solrClient = new SolrCatalogClient();


Should I be using initCore instead of createJetty?

Thank you!

-----Original Message-----
From: Shawn Heisey [] 
Sent: Tuesday, January 03, 2017 2:31 PM
Subject: Re: Can I use SolrJ 6.3.0 to talk to a Solr 5.2.3 server?

On 1/3/2017 10:35 AM, Jennifer Coston wrote:
> 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:

There is no 5.2.3 version of Solr.  The 5.2.x line ended with 5.2.1. 
There is a 5.3.2 version.

If you're using HttpSolrClient, mixing a 5.x server and a 6.x client will be no problem at
all.  If you're using CloudSolrClient you may run into issues because of the very rapid pace
of change in SolrCloud -- mixing major versions is not recommended.  If you're using EmbeddedSolrServer,
then the client and the server are not separate, so upgrading both at once is probably OK,
but the code and the core config might require changes.

> java.util.ServiceConfigurationError: Cannot instantiate SPI class: 
> org.apache.lucene.codecs.simpletext.SimpleTextPostingsFormat

This is an error from a Solr *server*, not a client.  Are you using EmbeddedSolrServer?

> Here are the Solr Dependencies I have in my pom.xml:

You've got a solr-core dependency here.  That is not at all necessary for a SolrJ client,
*unless* you are using EmbeddedSolrServer.  If you are using the embedded server, then things
are much more complicated, and your code may require changes before it will work correctly
with a new major version.  The embedded server is NOT recommended unless you have no other
choice.  The unit tests included with Solr are able to fire up Solr with Jetty for tests,
just like a real separate Solr server.  Your tests can also do this.  Look for tests in the
Lucene/Solr codebase that extend SolrJettyTestBase, and use those as a guide.


View raw message