Page 1 of 1

Solr issue in BLC 2.2.0

Posted: Wed Mar 13, 2013 5:25 pm
by staleks
Hi all,

I've migrated BLC from 2.0.1-GA to 2.2.0-GA, and now I am facing with some interesting issue.

In our application we extended SolrSearchServiceImpl from blc-framework.jar. and made our own implementation in our "core" module. e.g. "com.mycompanyname.core.search.service.solr.ExtendedSolrSearchServiceImpl".

I have a problem while application context starts with a message that file solr-default.xml can't be found.

I think that I have isolated a problem, constructor of a SolrSearchServiceImpl is changed and following line is actually problemtic one:

Code: Select all

File solrXml = copyConfigToSolrHome(this.getClass().getResourceAsStream("/solr-default.xml"), solrServer, "solr-default.xml");


What I can see from the code is that new blc-framework-2.2.0.jar has solr-default.xml on tha classpath of that JAR, but this line can't find it in our "core", nor in "site" no matter where I put it.


Can someone help me with this please?

What "bumps" in my head is that I should rewrite my own constructor but I was wondering whether there is more elegant solution.

Thank You

Re: Solr issue in BLC 2.2.0

Posted: Wed Mar 13, 2013 5:30 pm
by phillipuniverse
If you've already subclassed, just override the copyConfigToSolrHome method and ignore the 'configIs' parameter and load your own solr-default.xml however you like.

Re: Solr issue in BLC 2.2.0

Posted: Wed Mar 13, 2013 5:38 pm
by staleks
Thanks :)

I am working on it just now and I figured it out that I couldn't just simply rewrite constructor since super(String solrHome) must be part of subclassed constructor. Therefore my idea was bad.

Rewriting method copyConfigToSolrHome() sounds much, much better.

Re: Solr issue in BLC 2.2.0

Posted: Thu Apr 03, 2014 4:07 pm
by starlight95
Hi,

Currently I have the same exception, but I updated broadleaf to 3.1.0 version. The workaround found in this thread is not really adapted to my situation because I don't want override this class, so I need to find a solution.

I tried to copy paste the existing solar-default.xml from broadleaf framework into my site application, but both are declared in my class path and I got the same result...

The original thread of my issue is here.