The problem you are seeing is caused by this exception
Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
The latest version of solrj depends on slf4j so you need to include that as a dependency by changing the portal-dependency-jars property in liferay-plugin-package.properties to this
1portal-dependency-jars=\
2 commons-codec.jar,\
3 commons-httpclient.jar,\
4 slf4j-api.jar,\
5 slf4j-log4j12.jar
Unfortunately the 6.0.6 plugin has some issues it wont work properly unless you make some changes to SolrIndexSearcherImpl
Here's a patch for that :
1--- a/liferay-plugins-sdk/webs/solr-web/docroot/WEB-INF/src/com/liferay/portal/search/solr/SolrIndexSearcherImpl.java
2+++ b/liferay-plugins-sdk/webs/solr-web/docroot/WEB-INF/src/com/liferay/portal/search/solr/SolrIndexSearcherImpl.java
3@@ -26,11 +26,7 @@ import com.liferay.portal.kernel.search.IndexSearcher;
4 import com.liferay.portal.kernel.search.Query;
5 import com.liferay.portal.kernel.search.SearchException;
6 import com.liferay.portal.kernel.search.Sort;
7-import com.liferay.portal.kernel.util.StringBundler;
8-import com.liferay.portal.kernel.util.StringPool;
9-import com.liferay.portal.kernel.util.StringUtil;
10-import com.liferay.portal.kernel.util.Time;
11-import com.liferay.portal.kernel.util.Validator;
12+import com.liferay.portal.kernel.util.*;
13
14 import java.util.Collection;
15 import java.util.HashSet;
16@@ -156,12 +152,15 @@ public class SolrIndexSearcherImpl implements IndexSearcher {
17
18 Collection<String> names = solrDocument.getFieldNames();
19
20- for (String name : names) {
21- Field field = new Field(
22- name, solrDocument.getFieldValue(name).toString(), false);
23+ for (String name : names) {
24+ Field field = new Field(
25+ name,
26+ ArrayUtil.toStringArray(
27+ solrDocument.getFieldValues(name).toArray()), false);
28+
29+ document.add(field);
30+ }
31
32- document.add(field);
33- }
34
35 float score = Float.valueOf(
36 solrDocument.getFieldValue("score").toString());
Please sign in to flag this as inappropriate.