cancel
Showing results for 
Search instead for 
Did you mean: 

Sandbox deleting

mvlach
Champ in-the-making
Champ in-the-making
Hi, we have problem with deletion of the sandbox.

Using alfresco 2.1 Community.


12:21:26,573 INFO  [STDOUT] 12:21:26,571 ERROR [ui.common.Utils] Unable to delete Sandbox due to system error:
java.util.ConcurrentModificationException
        at java.util.HashMap$HashIterator.nextEntry(HashMap.java:841)
        at java.util.HashMap$EntryIterator.next(HashMap.java:883)
        at java.util.HashMap$EntryIterator.next(HashMap.java:881)
        at org.alfresco.repo.avm.locking.AVMLockingServiceImpl.removeStoreLocks(AVMLockingServiceImpl.java:566)
        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:281)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:187)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:154)
        at org.alfresco.repo.transaction.RetryingTransactionAdvice.invoke(RetryingTransactionAdvice.java:92)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:210)
        at $Proxy110.removeStoreLocks(Unknown Source)
        at org.alfresco.web.bean.wcm.DeleteSandboxDialog.finishImpl(DeleteSandboxDialog.java:148)
        at org.alfresco.web.bean.dialog.BaseDialogBean$1.execute(BaseDialogBean.java:118)
        at org.alfresco.web.bean.dialog.BaseDialogBean$1.execute(BaseDialogBean.java:115)
        at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:225)
        at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:155)
        at org.alfresco.web.bean.dialog.BaseDialogBean.finish(BaseDialogBean.java:124)
        at org.alfresco.web.bean.dialog.DialogManager.finish(DialogManager.java:347)
        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.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:132)
        at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:61)
        at javax.faces.component.UICommand.broadcast(UICommand.java:109)
        at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:97)
        at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:171)
        at org.apache.myfaces.lifecycle.InvokeApplicationExecutor.execute(InvokeApplicationExecutor.java:32)
        at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:95)
        at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:70)
        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:139)
        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.AuthenticationFilter.doFilter(AuthenticationFilter.java:81)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
        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:230)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
        at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
        at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
        at java.lang.Thread.run(Thread.java:595)
3 REPLIES 3

kvc
Champ in-the-making
Champ in-the-making
Have not seen this issue before.

One thing to try:  prior to deleting the sandbox, do an Undo All to remove all modifications in that sandbox and associated locks.  Then try the deletion again.  Do you still get the same result?

Kevin

mvlach
Champ in-the-making
Champ in-the-making
Hi Kevin,

the action Sandbox deleting is not succesfully. I have empty "modified items". But in clean instalation is this good. I don't know, that happen. We are using alfresco for large company with 1500 articles.

I try to debug this action.

Thanks Mila

mvlach
Champ in-the-making
Champ in-the-making
Solved.

I made one change in AVMLockingServiceImpl.java


    public void removeStoreLocks(String store)
    {
        String webProject = store;
        int index = store.indexOf("–");
        if (index >= 0)
        {
            webProject = store.substring(0, index);  
        }
        List<String> keys = new ArrayList<String>(3);
        keys.add(LOCK_TABLE);
        keys.add(WEB_PROJECTS);
        keys.add(webProject);
        Attribute project = fAttributeService.getAttribute(keys);
        if (project == null)
        {
            return;
        }
        for (Map.Entry<String, Attribute>  entry: new HashSet<Entry<String, Attribute>>(project.entrySet()))
        {
            AVMLock lock = new AVMLock(entry.getValue());
            if (lock.getStore().equals(store))
            {
                project.remove(entry.getKey());
            }
        }
        keys.remove(2);
        fAttributeService.setAttribute(keys, webProject, project);
    }