cancel
Showing results for 
Search instead for 
Did you mean: 

Stack Trace when performing category operations

pitt1
Champ in-the-making
Champ in-the-making
I have Alfresco Enterprise (trial) 1.3.1 installed (Linux/Tomcat/Oracle DB), and I'm getting all kinds of errors when it comes to categories.  First of all, I go to a document, click the "view details" icon, then go to "run action" in the right panel.  I select the "link item to category" option, then "select values to add".  I click to add a category in the subsequent page, and get a big stack trace.  The below stack trace is what shows up in the tomcat log file, and an abbreviated version shows up on the web client as well.

I have also gotten similar errors when trying to simply add a category directly from the category pane in the document details page, and when trying to add a new category via the admin console.  Help!?!


10:59:29,154 ERROR [[localhost].[/alfresco].[jsp]] Servlet.service() for servlet jsp threw exception
org.alfresco.repo.search.SearcherException: Index has no root node.  Check that the correct index locations are being used.
        at org.alfresco.repo.search.impl.lucene.query.LeafScorer.initialise(LeafScorer.java:224)
        at org.alfresco.repo.search.impl.lucene.query.LeafScorer.<init>(LeafScorer.java:134)
        at org.alfresco.repo.search.impl.lucene.query.PathScorer.createPathScorer(PathScorer.java:159)
        at org.alfresco.repo.search.impl.lucene.query.PathQuery$StructuredFieldWeight.scorer(PathQuery.java:250)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:85)
        at org.apache.lucene.search.Hits.getMoreDocs(Hits.java:64)
        at org.apache.lucene.search.Hits.<init>(Hits.java:43)
        at org.apache.lucene.search.Searcher.search(Searcher.java:33)
        at org.apache.lucene.search.Searcher.search(Searcher.java:27)
        at org.alfresco.repo.search.impl.lucene.LuceneSearcherImpl2.query(LuceneSearcherImpl2.java:256)
        at org.alfresco.repo.search.impl.lucene.LuceneSearcherImpl2.query(LuceneSearcherImpl2.java:179)
        at org.alfresco.repo.search.impl.lucene.LuceneCategoryServiceImpl.getClassificationNodes(LuceneCategoryServiceImpl.java:207)
        at org.alfresco.repo.search.impl.lucene.LuceneCategoryServiceImpl.getCategories(LuceneCategoryServiceImpl.java:194)
        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:585)
        at org.alfresco.repo.service.StoreRedirectorProxyFactory$RedirectorInvocationHandler.invoke(StoreRedirectorProxyFactory.java:213)
        at $Proxy41.getCategories(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:585)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:335)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:181)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148)
        at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:116)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
        at net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:80)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
        at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:41)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176)
        at $Proxy42.getCategories(Unknown Source)
        at org.alfresco.web.ui.repo.component.UICategorySelector.getRootChildren(UICategorySelector.java:133)
        at org.alfresco.web.ui.repo.component.AbstractItemSelector.encodeBegin(AbstractItemSelector.java:477)
        at javax.faces.webapp.UIComponentTag.encodeBegin(UIComponentTag.java:337)
        at javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:224)
        at org.apache.jsp.jsp.actions.link_002dcategory_jsp._jspx_meth_r_categorySelector_0(link_002dcategory_jsp.java:1239)
        at org.apache.jsp.jsp.actions.link_002dcategory_jsp._jspService(link_002dcategory_jsp.java:498)
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
        at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
        at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
        at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
        at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:415)
        at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:234)
        at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:352)
        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:106)
        at org.alfresco.web.app.servlet.AlfrescoFacesServlet.service(AlfrescoFacesServlet.java:49)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at org.alfresco.web.app.servlet.AuthenticationFilter.doFilter(AuthenticationFilter.java:73)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
        at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
        at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
        at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
        at java.lang.Thread.run(Thread.java:595)
2 REPLIES 2

paulhh
Champ in-the-making
Champ in-the-making
Hi

From the log messages, it looks like the indexes are not being found - the alf_data directory in the Alfresco installation location.  This only usually happens if you've been moving things around or changing the configuration.  There's a properties file in tomcat/shared/classes/alfresco/extension/ that defines the dir_root location - check what that is set to and whether there is anything at the location defined.

Cheers
Paul.

pitt1
Champ in-the-making
Champ in-the-making
Thanks Paul,  After I posted this, a colleague of mine (who apparently has superior googling skills) found several related posts

http://forums.alfresco.com/viewtopic.php?t=1382&highlight=index+root+node
http://forums.alfresco.com/viewtopic.php?t=670&highlight=index+root+node
http://forums.alfresco.com/viewtopic.php?t=998&highlight=index+root+node

I tried modifying the dir.root  in repository.properties, but we had an overide of it in custom-data-location.properties that was pointed correctly all along, so my understanding is that the one in repository.properties shouldn't matter.  In any case, modifying repository.properties didn't help matters (any idea why?).  I also tried re-indexing, as suggested in one of the above posts.  This eventually blew out the Java heap space (we had about 4.6 million docs in the repository), and led to more problems.  Is there any way to re-do indexes on large doc sets w/o running out of memory (JVM was allocated the maximum 2GB for a 32-bit machine.  We ended up blowing everything away, and re-installing alfresco and categories worked this time.

We're in the process of purchasing a license, including developer support, so maybe you guys could take a look next time, because it's frightening to think we'd have to re-install to fix something like this.

Thanks a bunch
~Julie