cancel
Showing results for 
Search instead for 
Did you mean: 

Alfresco search after upgrading from 4.0.b to 4.0.d

mdonnelly
Champ in-the-making
Champ in-the-making
We've been attempting to upgrade alfresco 4.0.b to alfresco 4.0.d. After migrating the data from the older to the newer version we've run into the below 'failed request' problem when issuing queries on anything in alfresco, but specifically the repository.

15:52:51,064 ERROR [org.springframework.extensions.webscripts.AbstractRuntime] Exception from executeScript - redirecting to status template error: 01270002 Wrapped Exception (with status template): 01270014 Failed to execute script 'classpath*:alfresco/templates/webscripts/org/alfresco/slingshot/documentlibrary/doclist.get.js': 01270013 Failed to execute search: +PATH:"/app:company_home/st:sites/*/cm:documentLibrary//*" +@cm\:modified:[2012\-2\-20T00\:00\:00.000 TO 2012\-2\-27T23\:59\:59.999] +@cm\:modifier:"mdonnelly" +TYPE:"cm:content" -TYPE:"cm:systemfolder" -TYPE:"fm:forums" -TYPE:"fm:forum" -TYPE:"fm:topic" -TYPE:"fm:post" +(TYPE:"content" OR TYPE:"app:filelink" OR TYPE:"folder")
org.springframework.extensions.webscripts.WebScriptException: 01270002 Wrapped Exception (with status template): 01270014 Failed to execute script 'classpath*:alfresco/templates/webscripts/org/alfresco/slingshot/documentlibrary/doclist.get.js': 01270013 Failed to execute search: +PATH:"/app:company_home/st:sites/*/cm:documentLibrary//*" +@cm\:modified:[2012\-2\-20T00\:00\:00.000 TO 2012\-2\-27T23\:59\:59.999] +@cm\:modifier:"mdonnelly" +TYPE:"cm:content" -TYPE:"cm:systemfolder" -TYPE:"fm:forums" -TYPE:"fm:forum" -TYPE:"fm:topic" -TYPE:"fm:post" +(TYPE:"content" OR TYPE:"app:filelink" OR TYPE:"folder")
   at org.springframework.extensions.webscripts.AbstractWebScript.createStatusException(AbstractWebScript.java:970)
   at org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:171)
   at org.alfresco.repo.web.scripts.RepositoryContainer$2.execute(RepositoryContainer.java:393)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:388)
   at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecute(RepositoryContainer.java:462)
   at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecuteAs(RepositoryContainer.java:500)
   at org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:316)
   at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:372)
   at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:209)
   at org.springframework.extensions.webscripts.servlet.WebScriptServlet.service(WebScriptServlet.java:118)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:58)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
   at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:470)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
   at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
   at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
   at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
   at java.lang.Thread.run(Thread.java:662)
Caused by: org.alfresco.scripts.ScriptException: 01270014 Failed to execute script 'classpath*:alfresco/templates/webscripts/org/alfresco/slingshot/documentlibrary/doclist.get.js': 01270013 Failed to execute search: +PATH:"/app:company_home/st:sites/*/cm:documentLibrary//*" +@cm\:modified:[2012\-2\-20T00\:00\:00.000 TO 2012\-2\-27T23\:59\:59.999] +@cm\:modifier:"mdonnelly" +TYPE:"cm:content" -TYPE:"cm:systemfolder" -TYPE:"fm:forums" -TYPE:"fm:forum" -TYPE:"fm:topic" -TYPE:"fm:post" +(TYPE:"content" OR TYPE:"app:filelink" OR TYPE:"folder")
   at org.alfresco.repo.jscript.RhinoScriptProcessor.execute(RhinoScriptProcessor.java:195)
   at org.alfresco.repo.processor.ScriptServiceImpl.execute(ScriptServiceImpl.java:212)
   at org.alfresco.repo.processor.ScriptServiceImpl.executeScript(ScriptServiceImpl.java:174)
   at org.alfresco.repo.web.scripts.RepositoryScriptProcessor.executeScript(RepositoryScriptProcessor.java:102)
   at org.springframework.extensions.webscripts.AbstractWebScript.executeScript(AbstractWebScript.java:1193)
   at org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:86)
   … 25 more
Caused by: org.alfresco.error.AlfrescoRuntimeException: 01270013 Failed to execute search: +PATH:"/app:company_home/st:sites/*/cm:documentLibrary//*" +@cm\:modified:[2012\-2\-20T00\:00\:00.000 TO 2012\-2\-27T23\:59\:59.999] +@cm\:modifier:"mdonnelly" +TYPE:"cm:content" -TYPE:"cm:systemfolder" -TYPE:"fm:forums" -TYPE:"fm:forum" -TYPE:"fm:topic" -TYPE:"fm:post" +(TYPE:"content" OR TYPE:"app:filelink" OR TYPE:"folder")
   at org.alfresco.repo.jscript.Search.query(Search.java:821)
   at org.alfresco.repo.jscript.Search.query(Search.java:687)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:155)
   at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:243)
   at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:66)
   at org.mozilla.javascript.gen.c6._c19(file:/opt/alfresco-4.0.d/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/slingshot/documentlibrary/doclist.get.js:1153)
   at org.mozilla.javascript.gen.c6.call(file:/opt/alfresco-4.0.d/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/slingshot/documentlibrary/doclist.get.js)
   at org.mozilla.javascript.optimizer.OptRuntime.callName0(OptRuntime.java:108)
   at org.mozilla.javascript.gen.c6._c0(file:/opt/alfresco-4.0.d/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/slingshot/documentlibrary/doclist.get.js:1354)
   at org.mozilla.javascript.gen.c6.call(file:/opt/alfresco-4.0.d/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/slingshot/documentlibrary/doclist.get.js)
   at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:393)
   at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:2834)
   at org.mozilla.javascript.gen.c6.call(file:/opt/alfresco-4.0.d/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/slingshot/documentlibrary/doclist.get.js)
   at org.mozilla.javascript.gen.c6.exec(file:/opt/alfresco-4.0.d/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/slingshot/documentlibrary/doclist.get.js)
   at org.alfresco.repo.jscript.RhinoScriptProcessor.executeScriptImpl(RhinoScriptProcessor.java:483)
   at org.alfresco.repo.jscript.RhinoScriptProcessor.execute(RhinoScriptProcessor.java:191)
   … 30 more
Caused by: org.alfresco.repo.search.impl.lucene.LuceneQueryParserException: 01270012 Request failed 500 /solr/alfresco/alfresco?q=%2BPATH%3A%22%2Fapp%3Acompany_home%2Fst%3Asites%2F*%2Fcm%3AdocumentLibrary%2F%2F*%22+%2B%40cm%5C%3Amodified%3A%5B2012%5C-2%5C-20T00%5C%3A00%5C%3A00.000+TO+2012%5C-2%5C-27T23%5C%3A59%5C%3A59.999%5D+%2B%40cm%5C%3Amodifier%3A%22mdonnelly%22+%2BTYPE%3A%22cm%3Acontent%22+-TYPE%3A%22cm%3Asystemfolder%22+-TYPE%3A%22fm%3Aforums%22+-TYPE%3A%22fm%3Aforum%22+-TYPE%3A%22fm%3Atopic%22+-TYPE%3A%22fm%3Apost%22+%2B%28TYPE%3A%22content%22+OR+TYPE%3A%22app%3Afilelink%22+OR+TYPE%3A%22folder%22%29&wt=json&fl=*%2Cscore&rows=50&df=TEXT&start=0&locale=en_US&sort=%40cm%3Amodified+desc&fq=%7B%21afts%7DAUTHORITY_FILTER_FROM_JSON&fq=%7B%21afts%7DTENANT_FILTER_FROM_JSON
   at org.alfresco.repo.search.impl.solr.SolrQueryHTTPClient.executeQuery(SolrQueryHTTPClient.java:333)
   at org.alfresco.repo.search.impl.solr.SolrQueryLanguage.executeQuery(SolrQueryLanguage.java:49)
   at org.alfresco.repo.search.impl.solr.SolrSearchService.query(SolrSearchService.java:348)
   at org.alfresco.repo.search.SearcherComponent.query(SearcherComponent.java:78)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.alfresco.repo.management.subsystems.SubsystemProxyFactory$1.invoke(SubsystemProxyFactory.java:65)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
   at $Proxy13.query(Unknown Source)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
   at net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:80)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:46)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:147)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
   at $Proxy13.query(Unknown Source)
   at org.alfresco.repo.jscript.Search.query(Search.java:801)
   … 49 more
       
While this can be remedied by using lucene and setting the index recovery mode to FULL before startup, it's not an ideal solution for us since we plan on continually upgrading from one version of alfresco to the next. I did see several issues raised for similar errors, but they seemed to be fixed by going into 4.0.d with a clean build/install (or by using lucene). Is there something about upgrading that is causing issues here? Any suggestions would be appreciated.

Thanks
7 REPLIES 7

andy
Champ on-the-rise
Champ on-the-rise
Hi

Have you got the logs from the SOLR side?
The log just says something went wrong on the SOLR side.

How did you install SOLR?
What exactly did you do to upgrade SOLR?
Can you connect to SOLR and view the SUMMARY information?
See http://wiki.alfresco.com/wiki/Alfresco_And_SOLR#Checking_the_status_of_the_SOLR_index

Andy

mdonnelly
Champ in-the-making
Champ in-the-making
I didn't end up updating anything relating to SOLR during the initial installation of 4.0.d, just used the installation package and started up alfresco. I've been looking into the main alfresco log as well as the tomcat logs, which output this:

Mar 1, 2012 5:39:53 PM org.apache.solr.common.SolrException log
SEVERE: org.alfresco.repo.search.impl.parsers.FTSQueryException: 02010006 line 1:112
mismatched input '.000' expecting TO  ([@11,112:115='.000',<62>,1:112])
        [ftsQuery, ftsDisjunction, ftsImplicitDisjunction, ftsExplicitConjunction, ftsPrefixed, ftsTest, ftsRange, ftsFieldGroupRange, recoverFromMismatchedToken]
        at org.alfresco.repo.search.impl.parsers.FTSQueryParser.buildFTS(FTSQueryParser.java:119)
        at org.alfresco.solr.AlfrescoSolrDataModel.getFTSQuery(AlfrescoSolrDataModel.java:986)
        at org.alfresco.solr.query.AlfrescoFTSQParserPlugin$AlfrescoFTSQParser.parse(AlfrescoFTSQParserPlugin.java:238)
        at org.apache.solr.search.QParser.getQuery(QParser.java:131)
        at org.apache.solr.handler.component.QueryComponent.prepare(QueryComponent.java:103)
        at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:174)
        at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:131)
        at org.apache.solr.core.SolrCore.execute(SolrCore.java:1316)
        at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:338)
        at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:241)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:563)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
        at java.lang.Thread.run(Thread.java:662)
Caused by: MismatchedTokenException(62!=61)
        at org.alfresco.repo.search.impl.parsers.FTSParser.recoverFromMismatchedToken(FTSParser.java:172)
        at org.antlr.runtime.BaseRecognizer.match(BaseRecognizer.java:115)
        at org.alfresco.repo.search.impl.parsers.FTSParser.ftsFieldGroupRange(FTSParser.java:6394)
        at org.alfresco.repo.search.impl.parsers.FTSParser.ftsRange(FTSParser.java:3793)
        at org.alfresco.repo.search.impl.parsers.FTSParser.ftsTest(FTSParser.java:2307)
        at org.alfresco.repo.search.impl.parsers.FTSParser.ftsPrefixed(FTSParser.java:1426)
        at org.alfresco.repo.search.impl.parsers.FTSParser.ftsExplicitConjunction(FTSParser.java:880)
        at org.alfresco.repo.search.impl.parsers.FTSParser.ftsImplicitDisjunction(FTSParser.java:777)
        at org.alfresco.repo.search.impl.parsers.FTSParser.ftsDisjunction(FTSParser.java:444)
        at org.alfresco.repo.search.impl.parsers.FTSParser.ftsQuery(FTSParser.java:322)
        at org.alfresco.repo.search.impl.parsers.FTSQueryParser.buildFTS(FTSQueryParser.java:109)
        … 22 more

If there's a better location to start looking into these solr issues, please let me know. Concerning your second set of questions, when I connect to the solr admin pages to view SUMMARY, I see this:

<?xml version="1.0" encoding="UTF-8"?>
<response>
   <lst name="responseHeader">
      <int name="status">0</int>
      <int name="QTime">0</int>
   </lst>
   <lst name="Summary">
      <lst name="alfresco">
         <long name="Last Index Commit Time">1330642242445</long>
         <date name="Last Index Commit Date">2012-03-01T22:50:42.445Z</date>
         <str name="Lag">0 s</str>
         <str name="Duration">-P0Y</str>
         <bool name="Active">false</bool>
         <long name="Timestamp for last TX on server">1330642242445</long>
         <date name="Date for last TX on server">2012-03-01T22:50:42.445Z</date>
      </lst>
      <lst name="archive">
         <long name="Last Index Commit Time">1330642242445</long>
         <date name="Last Index Commit Date">2012-03-01T22:50:42.445Z</date>
         <str name="Lag">0 s</str>
         <str name="Duration">-P0Y</str>
         <bool name="Active">false</bool>
         <long name="Timestamp for last TX on server">1330642242445</long>
         <date name="Date for last TX on server">2012-03-01T22:50:42.445Z</date>
      </lst>
   </lst>
</response>

Thanks

sydney
Champ in-the-making
Champ in-the-making
Same here, upgraded from 4.0.b to 4.0.d:

Installed 4.0.d fresh from Linux binary package to a fresh OS.
Stopped Alfresco.
Dropped alfresco db, restored the backup db-dump.
Removed everything in /alf_data except of /postgres.
Changed "data.dir.root"-hard references in \alf_data\solr\workspace-SpacesStore\conf\solrcore.properties and \alf_data\solr\archive-SpacesStore\conf\solrcore.properties.
Started Alfresco.

Everything seems to be working fine apart from Solr, Request failed 500.

Have a nice Weekend,

Cheers,

S.

andy
Champ on-the-rise
Champ on-the-rise
Hi

Do you get the same issue with a clean 4.0d?

Does the issue go away if you stop Alfresco, delete the SOLR index data and the model data in each of the config directories, and then restart with SOLR rebuilding the indexes?

I can not recall any reason why the timestamp would fail to parse on 4.0d or why to would be affected by upgrade.
The parse should not have any dependancy on the model or tokenisation - that is done post parse.

Andy

mdonnelly
Champ in-the-making
Champ in-the-making
Clean installation resolves the SOLR issues. Just deleting solr data and forcing a rebuild of the indexes resulted in the same error/problem.

Still, we want to try to upgrade without having to clean out the current repository. Is there anything else I can look at or try in terms of understanding why it's having trouble parsing (past the fact that FTSQueryParser doesn't like the query given)?

michaelk
Champ in-the-making
Champ in-the-making
Clean installation resolves the SOLR issues. Just deleting solr data and forcing a rebuild of the indexes resulted in the same error/problem.

Still, we want to try to upgrade without having to clean out the current repository. Is there anything else I can look at or try in terms of understanding why it's having trouble parsing (past the fact that FTSQueryParser doesn't like the query given)?

What works for me (the only thing that works) is to copy the alf_data directory from the old installation, delete the solr directory and drop in the one from the 'clean' install. The indexes rebuild from the original repository data.

andy
Champ on-the-rise
Champ on-the-rise
Hi

Are you using the SOLR distribution that comes with the 4.0.b or 4.0.d?

You should just need to link up the SOLR data directories - if there are no model changes.

The solr distribution under alf data is specfic to the release.

If you copy in an old alf data directory into a new distribution you need to put back the solr distribution (or not over-write it, or only over-write the data bit, or change the config to find the data)

If any models have changed between two releases you may have to rebuild the SOLR indexes (if the way things have been indexed has changed)

Andy