On 1/28/2019 7:45 AM, Will Martin wrote:
We are deployed across the globe in many regions with different use patterns.

Spring-data-solr is front and center for us and has proven pretty darn stable.

"There can be some very strange problems when trying to use SolrJ with Spring.”

I'll start off this reply by saying that I am in no way an expert on Spring libraries. I've used them, but there's plenty that I do not know.

I think that if you're using spring-data-solr, then ONLY use spring-data-solr. Do not try to load SolrJ itself as a dependency ... it will be pulled in automatically. Using a different version of SolrJ than spring-data-solr expects might break spring-data-solr. Accessing SolrJ objects and methods directly in a way not explicitly recommended by spring-data-solr might also cause problems.

When trying to use SolrJ directly and not through spring-data-solr, this is required in the @SpringApplication annotation:

@SpringBootApplication(exclude = { SolrAutoConfiguration.class })

Yes, I have needed this in one of my own Spring Boot projects. Without that, I got some WEIRD exceptions from my program. I no longer recall what they were -- so I have no idea if the exceptions you're getting are the same thing or not.

There may be other subtleties involved with Spring classes and SolrJ that I have never personally encountered. Since you're using spring-data-solr, you really need to talk to Spring first about any problems you encounter, and only come to us if Spring says you need to.

Thanks,
Shawn

Reply via email to