cancel
Showing results for 
Search instead for 
Did you mean: 

Alfresco Explorer blocks properties when I change it?

spilby
Confirmed Champ
Confirmed Champ
I have a problem after using the Alfresco Explorer.

I have created a java webscript to create nodes and modify properties, into a transaction, oks? All works fine when I use the webscript. I create folders, subfolders, modify the properties, all ok.

But then, I do the following… I go to the Alfresco Explorer. Find one of the folders and edit the properties, modify something and save.

After I do this, when I use my webscript and try to change a property of one of the nodes that I changed before with the Alfresco Explorer, a exception is thrown: "ConcurrencyFailureException: Failed to update node". And I can't change or add properties on this node. Only if I restart the server I can update with my webscript the node again and all works fine another time.

First I thank that was a problem in my code, but if so, it would never works. Or it doesn't works after the restart. But no, the code works always if I don't use the Alfresco Explorer, and works again if I restart the tomcat server where alfresco runs.

Are there a problem with the Alfresco Explorer that blocks the properties of the nodes when someone change it? What might be the problem? I'm using Alfresco Enterprise v4.1.6.

Thanks!
23 REPLIES 23

spilby
Confirmed Champ
Confirmed Champ
I try to implement this solutions. But when create the node, give me this error:

org.springframework.dao.DataIntegrityViolationException: Detected stale node entry: NodeVersionKey [nodeId=260884, version=1558] (now [NodeVersionKey [nodeId=260884, version=1559]])

This is my code:


public NodeRef transaccionCreateNode(final NodeRef parent, final Map<QName, Serializable> properties, final String name, final QName tipus) throws Exception {
NodeRef nodeRef = null;
       try {
          RetryingTransactionCallback<Object> txnWork = new RetryingTransactionCallback<Object>()
           {
               public Object execute() throws Exception
               {
                  NodeRef nodeRef = createNode(parent, properties, name, QName.createQName(Constants.modelClassificacioNS, Constants.tipusNodeClassificacio));
                  
                   return nodeRef;
               }
           };
           TransactionService transactionService = serviceRegistry.getTransactionService();
           nodeRef = (NodeRef)transactionService.getRetryingTransactionHelper().doInTransaction(txnWork, true);
       } catch(Throwable e) {
         logger.error("transaccionCreateNode - ERROR: " + e);
         throw new Exception(e);
      }
      
        return nodeRef;
}


Where I had before:


public NodeRef transaccionCreateNode(final NodeRef parent, final Map<QName, Serializable> properties, final String name, final QName tipus) throws Exception {
NodeRef nodeRef = null;
       
       UserTransaction trx = serviceRegistry.getTransactionService().getUserTransaction();
      
       try {
         trx.begin();
         nodeRef = this.createNode(parent, properties, name QName.createQName(Constants.modelClassificacioNS, Constants.tipusNodeClassificacio));
         trx.commit();
      } catch(Throwable e) {
         trx.rollback();
         logger.error("transaccionCreateNode - ERROR: " + e);
         throw new Exception(e);
      }   
       
       return nodeRef;
}

spilby
Confirmed Champ
Confirmed Champ
In the code of DataIntegrityViolationException I found this about this message:


// We found properties associated with a different node ID and version
            invalidateNodeCaches(nodeId);
            throw new DataIntegrityViolationException(
                    "Detected stale node entry: " + nodeVersionKey +
                    " (now " + propsRawByNodeVersionKey.keySet() + ")");


I have properties with a different node Id and version when I create a node and use getRetryingTransactionHelper? Smiley Surprised\ You know where is the problem? I'm not, and I'm sorry to ask another time, but I need to find the solution. Thanks again for your time.

spilby
Confirmed Champ
Confirmed Champ
Any suggestions about this problem? Someone meets with this error? Or knows why happens. Thanks again.

amutha
Champ in-the-making
Champ in-the-making
I am trying to add a heading between the list of custom-properties that appear under Advanced Search panel in Alfresco Explorer. Let me know how can I add a heading or a separator between the list of custom properties.

<code> <property-sheet> or <separator> <code> tag is not reflecting in the Advanced Search UI
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.