Problem:
After migrating data from Alfresco 4.2.e to Alfresco 5.0.d we got the following error in the log:
2015-09-21 17:03:32,620 ERROR [node.integrity.IntegrityChecker] [http-apr-8080-exec-1] Found 1 integrity violations: Mandatory property not set: Node: workspace://SpacesStore/ca785afc-6f6a-479d-a5f2-8a737c7702b6 Name: ca785afc-6f6a-479d-a5f2-8a737c7702b6 Type: {http://www.alfresco.org/model/content/1.0}person Property: {http://www.alfresco.org/model/content/1.0}sizeCurrent 2015-09-21 17:03:32,636 ERROR [extensions.webscripts.AbstractRuntime] [http-apr-8080-exec-1] Exception from executeScript - redirecting to status template error: 08210714 Found 1 integrity violations: Mandatory property not set: Node: workspace://SpacesStore/ca785afc-6f6a-479d-a5f2-8a737c7702b6 Name: ca785afc-6f6a-479d-a5f2-8a737c7702b6 Type: {http://www.alfresco.org/model/content/1.0}person Property: {http://www.alfresco.org/model/content/1.0}sizeCurrent org.alfresco.repo.node.integrity.IntegrityException: 08210714 Found 1 integrity violations: Mandatory property not set: Node: workspace://SpacesStore/ca785afc-6f6a-479d-a5f2-8a737c7702b6 Name: ca785afc-6f6a-479d-a5f2-8a737c7702b6 Type: {http://www.alfresco.org/model/content/1.0}person Property: {http://www.alfresco.org/model/content/1.0}sizeCurrent at org.alfresco.repo.node.integrity.IntegrityChecker.checkIntegrity(IntegrityChecker.java:664) at org.alfresco.repo.node.integrity.IntegrityChecker.beforeCommit(IntegrityChecker.java:766) at org.alfresco.util.transaction.TransactionSupportUtil$TransactionSynchronizationImpl.beforeCommit(TransactionSupportUtil.java:498) at org.springframework.transaction.support.TransactionSynchronizationUtils.triggerBeforeCommit(TransactionSynchronizationUtils.java:95) at org.springframework.transaction.support.AbstractPlatformTransactionManager.triggerBeforeCommit(AbstractPlatformTransactionManager.java:925) at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:738) at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:724) at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:475) at org.alfresco.util.transaction.SpringAwareUserTransaction.commit(SpringAwareUserTransaction.java:482) at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:479) at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecute(RepositoryContainer.java:551) at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecuteAs(RepositoryContainer.java:619) at org.alfresco.repo.web.scripts.RepositoryContainer.executeScriptInternal(RepositoryContainer.java:399) at org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:280) at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:378) at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:209) at org.springframework.extensions.webscripts.servlet.WebScriptServlet.service(WebScriptServlet.java:132) at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:61) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1074) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611) at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2466) at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2455) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:745)
Solution:
We have fixed it by executing the script that initializes mandatory property (sizeCurrent) for user nodes:
var all = people.getPeople(""); for (var i=0 ; i < all.length; i++){ var user = search.findNode(all[i]); if(user.properties.sizeCurrent === null){ user.properties.sizeCurrent = 0; user.save(); } }
But after that I have found better solution, I haven't used it yet, but I guess it will work. Just add the following properties to alfresco-global.properties and restart Alfresco:
### Quotas ### system.usages.enabled=true ### Db PostScript ### db.schema.update=true
Original forum post of this solution.
Комментариев нет :
Отправить комментарий