Error when delete files

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

Error when delete files

Greetings,

We have installed ACS and we when we try to delete some files inside a Document Library, after waiting for a while just can't. At the log file shows the following:error_alfresco.png

the error is this: org.apache.ibatis.exceptions.TooManyResultsException: Expected one result (or null) to be returned by selectOne(), but found: 2

I need to know why this happens (is not just with one file, there are a lot) and how to delete those files. Any thoughs? Thanks in advance.

3 Replies
Highlighted
Established Member II

Re: Error when delete files

Well it seems you have more than one node with the same nodeRef, could it be possible? Did you import nodes in some way? You should detect the repeated nodes and delete them separately.

Hope it helps

Highlighted
Member II

Re: Error when delete files

We just upload file through Alfresco Share, how do i know about the repeated nodes?

Thanks in advance.

Highlighted
Established Member II

Re: Error when delete files

You can check the nodeId of your files acessing the document-details. Then you will find the nodeId at the end of the url:

<url>/document-details?nodeRef=workspace://SpacesStore/9c8d15bf-75d8-4c0a-ab1c-bed62151df8e

To automate this process, you could use the javascript-console addon. Use below code to get all the nodeIds and names from all the documents in the folder:

var parent = search.findNode("your-folder-nodeRef");
parent.children.forEach(function(c) {
	logger.log("nodeId: " + c.getId() + " Filename: " + c.getName());
}, this);

Where "your-folder-nodeRef" must be substituted by the parent folder nodeRef.

Use this code as a base to check repeated nodeRefs in case there are lots of files.

Hope it helps