cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to move files from within smart folders - Type virtualization template search failed error

therealkemmett
Champ on-the-rise
Champ on-the-rise

I have created a two level folder structure. A folder on the second level has a rule that sets the file type, and an aspect that creates some smart folders and adds/sets some properties on files when they are moved into the folder (very similar to the claims example in the smart folders tutorial - see https://docs.alfresco.com/community/tasks/sf-tutorial.html). When a file is dragged into one of the smart folders, the file is typed, aspects added, and properties populated successfully.

However, I am subsequently unable to move those files into other folders, to either the root (Documents) or second level. Alfresco logs show

"2018-05-17 14:49:33,120 ERROR [org.alfresco.repo.virtual.store.TypeVirtualizationMethod] [http-apr-8080-exec-45] Type virtualization template search failed.
org.alfresco.traitextender.ExtensionTargetException: java.lang.StackOverflowError" and a long trace.

Using Alfresco Community (Build: 201605)

8 REPLIES 8

afaust
Legendary Innovator
Legendary Innovator

Though it is long, it would be good to have the stacktrace attached to your question, so people could check it to find which operation has a bug (and a stackoverflow is almost always a bug / programming error). Also, could you check / verify this issue still exists in the most recent Community GA version (201707)?

Thanks for the quick reply Axel. I've followed your advice and attached the trace for reference.

I'm not easily able to update to the latest Community edition here at work; I can try on my home system (unfortunately a different OS).

afaust
Legendary Innovator
Legendary Innovator

Looking at the stacktrace, the issue looks to be caused by an interesting constellation with your smart folder structure. Could it be that your smart folder structure accidentally contains a smart folder which - via its selection query - contains the top level folder and thus creates a circular graph? That's the only way that this stack overflow issue could be caused.

When using traditional folders, Alfresco will prevent the user from creating circular graphs, i.e. create a folder which in itself contains a parent/ancestor folder. But with smart folders, it is not protected against this since the folder query can select anything.

That's possible Axel. I appreciate your help with this -  I'm new to Alfresco, and have been relying on the smart folders tutorial for guidance.

I have a number of nodes, each structured as follows:

{

"name" : Test media example",
    "nodes" :
    [
        {
            "id" : "00",
            "name" : "00 General",
            "description":"Aircraft System 00",
            "search" : {
                "language" : "fts-alfresco",
                "query" : "(PATH:'/app:company_home/st:sites//*') AND =kwgt:ataChapter:'00 General'"
            },
            "filing" : {
                "path" : "%ACTUAL_PATH%",
                "classification" : {
                    "aspects" : [
                        "kwgt:ataData", "kwgt:commonData"
                    ]
                },
                "properties" : {
                    "kwgt:ataChapter" : "00 General",
                    "kwgt:docStatus" : "New",
                    "kwgt:docSensitivity" : "Basic"
                }
            }
        },

   ....

]

}

These build the structure in the "Incoming" folder in the below screen grab. The idea is that a user can drag a file into one of the smart folders to have two aspects attached, and some properties set. We would subsequently like to use folders to mark and change the status (availability) of the file, and other properties in it's lifecycle.

On further checking, I can move a file if I remove the kwgt:ataData aspect from it. This aspect has one property, which is a list of values.

Example of the folder hierarchy