AnsweredAssumed Answered

Keyword-Search-Script returns Error 500

Question asked by cfe on Sep 24, 2010
Hello,

executing Alfresco Keyword Search via script (Either Search Engine Plugin or custom search routine) regularily results in an error
org.alfresco.service.cmr.repository.InvalidNodeRefException - Node does not exist: workspace://SpacesStore/02d6a8db-b72b-4792-8fcc-b14fa1c2d5b3

The cause seems to be, that Lucene returns a node, which isnt contained in the contentstore anymore, but in the contentstore.deleted.
After pushing EagerContentCleanup this error appears less often, but the problem still persists.

Quicksearching in the browserclient works fine (the execptions can be seen in the logs, but they are handled)

Would be happy with your input!

The Web Script /alfresco/wcservice/api/search/keyword has responded with a status of 500 - Internal Error.

500 Description:    An error inside the HTTP server which prevented it from fulfilling the request.

Message:    08240005 Wrapped Exception (with status template): 08240379 Error during processing of the template 'get(icon16) failed on instance of org.alfresco.repo.web.scripts.bean.KeywordSearch$SearchTemplateNode'. Please contact your system administrator.
    
Exception:    org.alfresco.service.cmr.repository.InvalidNodeRefException - Node does not exist: workspace://SpacesStore/02d6a8db-b72b-4792-8fcc-b14fa1c2d5b3
    
    org.alfresco.repo.node.db.DbNodeServiceImpl.getNodePairNotNull(DbNodeServiceImpl.java:143)
    org.alfresco.repo.node.db.DbNodeServiceImpl.getType(DbNodeServiceImpl.java:564)
    sun.reflect.GeneratedMethodAccessor285.invoke(Unknown Source)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    java.lang.reflect.Method.invoke(Method.java:597)
    org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
    org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
    org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
    org.alfresco.repo.tenant.MultiTNodeServiceInterceptor.invoke(MultiTNodeServiceInterceptor.java:104)
    org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
    org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
    $Proxy10.getType(Unknown Source)
    sun.reflect.GeneratedMethodAccessor285.invoke(Unknown Source)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    java.lang.reflect.Method.invoke(Method.java:597)
    org.alfresco.repo.service.StoreRedirectorProxyFactory$RedirectorInvocationHandler.invoke(StoreRedirectorProxyFactory.java:215)
    $Proxy11.getType(Unknown Source)
    sun.reflect.GeneratedMethodAccessor285.invoke(Unknown Source)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    java.lang.reflect.Method.invoke(Method.java:597)
    org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
    org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
    org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
    org.alfresco.repo.node.MLPropertyInterceptor.invoke(MLPropertyInterceptor.java:303)
    org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
    org.alfresco.repo.node.MLPropertyInterceptor.invoke(MLPropertyInterceptor.java:303)
    org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
    org.alfresco.repo.node.NodeRefPropertyMethodInterceptor.invoke(NodeRefPropertyMethodInterceptor.java:269)
    org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
    org.alfresco.repo.node.NodeRefPropertyMethodInterceptor.invoke(NodeRefPropertyMethodInterceptor.java:269)
    org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
    org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
    $Proxy10.getType(Unknown Source)
    sun.reflect.GeneratedMethodAccessor285.invoke(Unknown Source)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    java.lang.reflect.Method.invoke(Method.java:597)
    org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
    org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
    org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
    net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:80)
    org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
    org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:43)
    org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
    org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:135)
    org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
    org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
    org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
    org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
    $Proxy10.getType(Unknown Source)
    org.alfresco.repo.template.TemplateNode.getType(TemplateNode.java:186)
    org.alfresco.repo.template.BaseContentNode.getIsDocument(BaseContentNode.java:97)
    org.alfresco.repo.template.BaseContentNode.getIcon16(BaseContentNode.java:166)
    sun.reflect.GeneratedMethodAccessor771.invoke(Unknown Source)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    java.lang.reflect.Method.invoke(Method.java:597)
    freemarker.ext.beans.BeansWrapper.invokeMethod(BeansWrapper.java:835)
    freemarker.ext.beans.BeanModel.invokeThroughDescriptor(BeanModel.java:276)
    freemarker.ext.beans.BeanModel.get(BeanModel.java:183)
    freemarker.core.Dot._getAsTemplateModel(Dot.java:76)
    freemarker.core.Expression.getAsTemplateModel(Expression.java:89)
    freemarker.core.Expression.getStringValue(Expression.java:93)
    freemarker.core.DollarVariable.accept(DollarVariable.java:76)
    freemarker.core.Environment.visit(Environment.java:208)
    freemarker.core.MixedContent.accept(MixedContent.java:92)
    freemarker.core.Environment.visit(Environment.java:208)
    freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:179)
    freemarker.core.Environment.visit(Environment.java:415)
    freemarker.core.IteratorBlock.accept(IteratorBlock.java:102)
    freemarker.core.Environment.visit(Environment.java:208)
    freemarker.core.MixedContent.accept(MixedContent.java:92)
    freemarker.core.Environment.visit(Environment.java:208)
    freemarker.core.Environment.process(Environment.java:188)
    freemarker.template.Template.process(Template.java:237)
    org.alfresco.repo.template.FreeMarkerProcessor.process(FreeMarkerProcessor.java:197)
    org.springframework.extensions.webscripts.AbstractWebScript.renderTemplate(AbstractWebScript.java:569)
    org.springframework.extensions.webscripts.DeclarativeWebScript.renderFormatTemplate(DeclarativeWebScript.java:263)
    org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:143)
    org.alfresco.repo.web.scripts.RepositoryContainer$2.execute(RepositoryContainer.java:367)
    org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:321)
    org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecute(RepositoryContainer.java:417)
    org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecuteAs(RepositoryContainer.java:434)
    org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:298)
    org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:307)
    org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:178)
    org.springframework.extensions.webscripts.servlet.WebScriptServlet.service(WebScriptServlet.java:116)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    org.alfresco.repo.webdav.auth.BaseNTLMAuthenticationFilter.doFilter(BaseNTLMAuthenticationFilter.java:238)
    org.alfresco.web.app.servlet.WebScriptNTLMAuthenticationFilter.doFilter(WebScriptNTLMAuthenticationFilter.java:99)
    sun.reflect.GeneratedMethodAccessor471.invoke(Unknown Source)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    java.lang.reflect.Method.invoke(Method.java:597)
    org.alfresco.repo.management.subsystems.ChainingSubsystemProxyFactory$1.invoke(ChainingSubsystemProxyFactory.java:103)
    org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
    org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
    $Proxy203.doFilter(Unknown Source)
    org.alfresco.repo.web.filter.beans.BeanProxyFilter.doFilter(BeanProxyFilter.java:82)
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
    org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
    org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
    org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
    java.lang.Thread.run(Thread.java:619)
    

greetings,
Chris

Outcomes