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.
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
We just upload file through Alfresco Share, how do i know about the repeated nodes?
Thanks in advance.
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
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.