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...

Alfresco SDK 3.0 Walkthrough, Part 2

If you missed our first part of this walkthrough series, you’ll want to check that out first, as it will inform this one. In the last post we talked about setting up the base project and discussed the pom files. Now, we’ll dive a little deeper into the folder structures and other files, and how they’ll… Read more »

Read More

It’s here! Alfresco to Dropbox Connector

As mentioned in a previous post we’ve been working on a way to synchronize content from Alfresco to Dropbox. Where do I get it? You can get the project as well as installation instructions right here at our github. What can we expect? Since this is just a beta release, there will still be bugs and issues… Read more »

Read More

Coming soon: Alfresco Connector for Dropbox

Lately here at Fika we’ve been thinking of a fun new Community project for Alfresco that will provide users a way to connect to their content. In that regard, we noticed an Alfresco integration for Dropbox[1] that was mostly finished, but needed to be updated. The API it used is being retired by Dropbox at… Read more »

Read More