03-31-2020 01:38 PM
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:
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.
04-01-2020 02:36 AM
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
04-01-2020 11:27 AM
We just upload file through Alfresco Share, how do i know about the repeated nodes?
Thanks in advance.
04-01-2020 01:58 PM
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
Explore our Alfresco products with the links below. Use labels to filter content by product module.