Fórum

Current URL generates exception searching with Solr

thumbnail
Florencia Hernández, modificado 11 Anos atrás.

Current URL generates exception searching with Solr

Regular Member Postagens: 146 Data de Entrada: 27/03/12 Postagens Recentes
Hi Everyone,

I'm using Liferay 6.1 integrated with Solr 1.4.1. Solr is running on the same machine, in a different tomcat instance than Liferay. When I use the search portlet, I get this exception:


13:49:07,080 ERROR [IncludeTag:426] Current URL /user/joebloggs/home?p_p_id=3&p_p_lifecycle=0&p_p_state=maximized&p_p_mode=view&p_p_col_id=column-1&p_p_col_count=5&_3_struts_action=%2Fsearch%2Fsearch&_3_redirect=%2Fuser%2Fjoebloggs&_3_ke
ywords=crazy&_3_groupId=0 generates exception: null
13:49:07,082 ERROR [IncludeTag:154] java.lang.NullPointerException
        at com.liferay.portal.search.solr.facet.SolrFacetFieldCollector.getTermCollector(SolrFacetFieldCollector.java:52)
        at org.apache.jsp.html.portlet.search.facets.asset_005fentries_jsp._jspService(asset_005fentries_jsp.java:777)
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
        at com.liferay.portal.kernel.servlet.DirectRequestDispatcher.include(DirectRequestDispatcher.java:45)
        at com.liferay.taglib.util.IncludeTag.include(IncludeTag.java:323)
        at com.liferay.taglib.util.IncludeTag._doInclude(IncludeTag.java:418)
        at com.liferay.taglib.util.IncludeTag.doEndTag(IncludeTag.java:92)
        at org.apache.jsp.html.portlet.search.search_jsp._jspService(search_jsp.java:1141)
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
        at com.liferay.portal.kernel.servlet.DirectRequestDispatcher.include(DirectRequestDispatcher.java:45)
        at com.liferay.taglib.util.IncludeTag.include(IncludeTag.java:323)
        at com.liferay.taglib.util.IncludeTag._doInclude(IncludeTag.java:418)
        at com.liferay.taglib.util.IncludeTag.doEndTag(IncludeTag.java:92)
        at org.apache.jsp.html.common.themes.portlet_jsp._jspService(portlet_jsp.java:3809)
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)

The search results are ok, but I get that exception every time I search for something. What do you thing this could be?

Searching in the Solr web console works fine.

TIA,

Florencia.
thumbnail
Florencia Hernández, modificado 11 Anos atrás.

RE: Current URL generates exception searching with Solr

Regular Member Postagens: 146 Data de Entrada: 27/03/12 Postagens Recentes
Can anyone help me with this?

Should I raise a ticket with this issue?
thumbnail
Hitoshi Ozawa, modificado 11 Anos atrás.

RE: Current URL generates exception searching with Solr

Liferay Legend Postagens: 7942 Data de Entrada: 24/03/10 Postagens Recentes
Should I raise a ticket with this issue?


I don't think Solr is officially supported in Liferay 6.1. If you want official support, use the built in Lucene instead.
thumbnail
Corné Aussems, modificado 11 Anos atrás.

RE: Current URL generates exception searching with Solr

Liferay Legend Postagens: 1313 Data de Entrada: 03/10/06 Postagens Recentes
Error also occurs in Liferay 6.1 EE, You might play with Asset and keep just one and then you will have no problems.

    {
        "displayStyle": "asset_entries",
        "weight": 1.5,
        "static": false,
        "order": "OrderHitsDesc",
        "data": {
            "values": ["com.liferay.portlet.journal.model.JournalArticle"],
            "frequencyThreshold": 1
        },
        "label": "asset-type",
        "className": "com.liferay.portal.kernel.search.facet.AssetEntriesFacet",
        "fieldName": "entryClassName"
    },


Error occurs in the asset_entries.jsp

		for (String assetType : assetTypes) {
			TermCollector termCollector = facetCollector.getTermCollector(assetType);


SolrFacetFieldCollector gets a nullpointer on _counts.get(term);

	public TermCollector getTermCollector(String term) {
		Count count = _counts.get(term);

		return new SolrTermCollector(term, (int)count.getCount());
	}


To conclude error stems form populating the facets by the SolrIndexSearcherImpl

List<facetfield> facetFields = queryResponse.getFacetFields(); 
</facetfield>


The facetFields are empty

Probably using SOLR 3.3 or 3.5 will solve things.
See http://issues.liferay.com/browse/LPS-25817

I wil test this later and get back to this topic


I will check this out later
Victor E, modificado 11 Anos atrás.

RE: Current URL generates exception searching with Solr

New Member Postagens: 5 Data de Entrada: 02/03/12 Postagens Recentes
I also encounter the exact same error. I'm using Solr 3.4 with Liferay 6.1CE.
Anyone could advice on this please? Thanks
Rajarshi Chakrabarty, modificado 11 Anos atrás.

RE: Current URL generates exception searching with Solr

New Member Postagens: 14 Data de Entrada: 12/06/12 Postagens Recentes
Hi florencia

You said that "The search results are ok," I am using Liferay 6.1 integrated with Solr 3.6.0 using solr web plugin 6.1.0.1. When i Query for the first time it give me same error as you got and my result page alignment also get disturbed. I dont know how to fix it. When I query for the second time, I get a whole bunch of errors. Are you facing the same problem as i am. Can you please tell me what steps you took???
Naga Surya Dhanunjaya Rao Sriapthy, modificado 10 Anos atrás.

RE: Current URL generates exception searching with Solr

New Member Postagens: 14 Data de Entrada: 25/04/09 Postagens Recentes
Hi,

I do saw this problem exists in 6.1 GA1.

Out of below facets , if you do not find any of the entryclasse from solr result, Then you will get that error.
com.liferay.portlet.bookmarks.model.BookmarksEntry
com.liferay.portlet.blogs.model.BlogsEntry
com.liferay.portlet.calendar.model.CalEvent
com.liferay.portlet.documentlibrary.model.DLFileEntry
com.liferay.portlet.journal.model.JournalArticle
com.liferay.portlet.messageboards.model.MBMessage
com.liferay.portlet.wiki.model.WikiPage
com.liferay.portal.model.User

To fix this, From solr admin UI try to execute the below query for each facet. and find out which entry it is empty and try to add respective entries from Liferay. Then it should fix this issue
Example query from SOLR admin UI: +(companyId:20002) +(+entryClassName:com.liferay.portal.model.User)

Thanks,
Sripathy