Alfresco 5.0.1 plus Solr4 Upgrade Issue

With Alfresco 5 comes an upgraded version of Solr (v4). This is a BIG deal. Alfresco 4.x only supports the Alfresco Solr distribution which housed an older version of Solr, v1.4. To put this in perspective, Solr’s current stable build is version 5.2.1. We’re excited to employ all the new features of Solr with some of our clients!

While upgrading Alfresco and migrating to Solr 4 we did run into one issue that caused us to lose search for a day. Running basic searches returned no results. Here is the symptom found in the solr.log file:

2015-06-16 21:21:53,048 ERROR [solr.servlet.SolrDispatchFilter] [http-bio-8443-exec-5] null:org.alfresco.service.namespace.InvalidQNameException: A QName must consist of a local name
at org.alfresco.service.namespace.QName.createQName(QName.java:67)
at org.alfresco.repo.search.impl.parsers.AlfrescoFunctionEvaluationContext.getLuceneFieldName(AlfrescoFunctionEvaluationContext.java:377)
at org.alfresco.solr.AlfrescoSolr4FunctionEvaluationContext.getLuceneFieldName(AlfrescoSolr4FunctionEvaluationContext.java:59)
at org.alfresco.solr.AlfrescoSolrDataModel.mapProperty(AlfrescoSolrDataModel.java:2132)
at org.alfresco.solr.component.RewriteFacetParametersComponent.rewriteFacetFieldList(RewriteFacetParametersComponent.java:176)
at org.alfresco.solr.component.RewriteFacetParametersComponent.fixFacetParams(RewriteFacetParametersComponent.java:75)
at org.alfresco.solr.component.RewriteFacetParametersComponent.prepare(RewriteFacetParametersComponent.java:53)
at org.apache.solr.handler.component.AlfrescoSearchHandler.handleRequestBody(AlfrescoSearchHandler.java:233)
at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135)
at org.apache.solr.core.SolrCore.execute(SolrCore.java:1962)
at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:777)
at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:418)
at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:207)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:612)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:314)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)

 

When migrating to Solr4 and running Alfresco 5.0.1 you need to remove all custom Share configs that affect Search. This means any config using Search as the condition:

<config condition="Search" evaluator="string-compare" replace="true">

 

An easy way to do this is by running a search on your file system for this string pattern

find . -name \*.xml | xargs grep condition\=\"Search

By removing these custom configurations we were able to run search successfully.

 

Edit: This issue was documented in Jira and is marked resolved for the next Service Pack, v5.0.2.

https://issues.alfresco.com/jira/browse/MNT-14012

Leave a Reply

Your email address will not be published. Required fields are marked *

From our Blog...

Configuring Alfresco SAML SSO Module with Okta IdP

Alfresco recently released a new patch for their SAML Single Sign On solution module. This module allows Alfresco user’s to configure their Alfresco installation with their Single Sign On (SSO) Identity Provider. In this tutorial, I’ll explain the process of configuring Okta to be used with the module. Note: This tutorial is assuming you’ve followed… Read more »

Read More

Content Migration: Being Prepared

Much like negotiating a treaty between two countries who do not share a common language, someone will be faced with the task of translating. If that translator is not properly prepared the outcome might create more problems than it solves.

Read More

Debugging and Integration Testing in Alfresco SDK 3.0

Alfresco has updated its SDK! See our articles here and here about the basics. In its current state, SDK 3.0 doesn’t support unit testing. It does, however, have a robust Integration Testing framework which, in many ways, covers the same ground and then some. In this article I’ll be going into the basics of Integration… Read more »

Read More