Erroneous 'node does not exist' exception.

cancel
Showing results for 
Search instead for 
Did you mean: 
wybrand
Member II

Erroneous 'node does not exist' exception.

Hello.

We have for our application a number of IT tests defined, who are putting the application under a lot of stress.

Now and then, one of the IT tests running on Alfresco, is failing with the exception 'Node does not exist.'

Each test creates a folder, runs the test and removes the folder.

Before the folder is created, our code checks if the folder is there and if so, removes it. The folder creation and removal occurs in the @before and @after sections of the IT test.

The existance of the folder is checked with the method 'getChildByName'.

If this is done, sometimes an exception is thrown. Somewhere in the stack (RMMethodSecurityInterceptor) occurs the following:

public Object invoke(MethodInvocation mi) throws Throwable
{
    Object result = null;
    InterceptorStatusToken token = beforeInvocation(mi);

    try
    {
        result = mi.proceed();   // The method getChildByName is called and returns the folder. 
    }
    finally
    {

        result = super.afterInvocation(token, result);

        /*

      In the call above the following method is eventually executed (RMAAfterInvokationProvider):

      private boolean isUnfiltered(NodeRef nodeRef)
      {
         return !nodeService.hasAspect(nodeRef, RecordsManagementModel.ASPECT_FILE_PLAN_COMPONENT);

       }
      For some reason, the folder (node) has vanished and the hasAspect method throws the following exception:

Node does not exist: workspace://SpacesStore/6be00e3f-faa5-4d91-9e84-2af6a8b3d926 (statusSmiley Frustratedtatus[id=8263changeTxnId=73956ed3-3b79-48da-bb2b-1fae8788ca07, dbTxnId=685, deleted=true])

   */
    }
    return result;
}

Our IT tests are not running parallel (we are using the AlfrescoTestRunner class).  As our functionality concerns this should not happen (e.g. each tests deletes its folder, before an other test is called).  Also I find it very strange that the method getChildByName throws an exception which tells the id of the node, but says also that the node is deleted. 

Is this a bug in Alfresco?

 

1 Reply
abhinavmishra14
Moderator
Moderator

Re: Erroneous 'node does not exist' exception.

May be bug with the way IT code is developed, if the folder doesn't exists the error is expected. 

Would you mind sharing the IT java source code here, provide any dependent code if you are using in the IT java class? 

Also provide the detailed steps that you are doing with IT.

~Abhinav
(ACSCE, AWS SAA-C02, GAIQ)