Integrity violations : invalid property value found on "cm:name" during upload of folder

cancel
Showing results for 
Search instead for 
Did you mean: 
4535992
Senior Member

Integrity violations : invalid property value found on "cm:name" during upload of folder

Used Version: Alfresco Community 7.2.1 (Docker Installer)

Hi I have a problem a user is uploading folders with incorrect filenames which seem to give solar a lot of trouble specifically during the integrity checker analysis.

I have the following questions:

1) Does the integrity checker imply that Alfresco calls Solar for model verification on solar is it correct or is everything limited on Alfresco ?

2) If solar is off for some reason, the file is STILL uploaded to alfresco because it has no way to ask solar to check the integrity checker ?

3) I find myself with the need to change the value of the file name (node creation to be clear) BEFORE the integrity checker check is a behavior that triggers before this check the correct solution? or are there other tools I can use?


Here is the full stack trace of the error in question:

2023-01-20 11:59:21,001 ERROR [node.integrity.IntegrityChecker] [http-nio-8080-exec-3] Found 5 integrity violations:Invalid property value: Node: workspace://SpacesStore/8cd37226-ddab-4302-9b07-3a9bc4f9f5e9 Name: 2020 ACCERT. RES. MINORI X ACQUISIZ. CITT. ITA Type: {http://www.alfresco.org/model/content/1.0}folder Property: {http://www.alfresco.org/model/content/1.0}name Constraint: 002013695 Value '2020 ACCERT. RES. MINORI X ACQUISIZ. CITT. ITA ' is not valid as a file name. This property must be a valid file name.Invalid property value: Node: workspace://SpacesStore/b67caa7d-1e87-49ee-b8e6-26d723b484f3 Name: 2020 RAPPORTI DI SERVIZIO Type: {http://www.alfresco.org/model/content/1.0}folder Property: {http://www.alfresco.org/model/content/1.0}name Constraint: 002013696 Value '2020 RAPPORTI DI SERVIZIO ' is not valid as a file name. This property must be a valid file name.Invalid property value: Node: workspace://SpacesStore/6cca04cc-7ae1-4236-a617-3ad17d1cdacb Name: GJERKAJ Agostin Type: {http://www.alfresco.org/model/content/1.0}folder Property: {http://www.alfresco.org/model/content/1.0}name Constraint: 002013697 Value 'GJERKAJ Agostin ' is not valid as a file name. This property must be a valid file name.Invalid property value: Node: workspace://SpacesStore/92554676-5fa1-4e9f-9664-2f5545af5035 Name: 2020 SANZIONI PASSI CARRAI Type: {http://www.alfresco.org/model/content/1.0}folder Property: {http://www.alfresco.org/model/content/1.0}name Constraint: 002013698 Value '2020 SANZIONI PASSI CARRAI ' is not valid as a file name. This property must be a valid file name.Invalid property value: Node: workspace://SpacesStore/afc47a66-2b56-4ccf-9cfe-470dd53ab653 Name: VOLTURA Type: {http://www.alfresco.org/model/content/1.0}folder Property: {http://www.alfresco.org/model/content/1.0}name Constraint: 002013699 Value 'VOLTURA ' is not valid as a file name. This property must be a valid file name.
2023-01-20 11:59:21,002 ERROR [extensions.webscripts.AbstractRuntime] [http-nio-8080-exec-3] Exception from executeScript: 002013700 Found 5 integrity violations:Invalid property value: Node: workspace://SpacesStore/8cd37226-ddab-4302-9b07-3a9bc4f9f5e9 Name: 2020 ACCERT. RES. MINORI X ACQUISIZ. CITT. ITA Type: {http://www.alfresco.org/model/content/1.0}folder Property: {http://www.alfresco.org/model/content/1.0}name Constraint: 002013695 Value '2020 ACCERT. RES. MINORI X ACQUISIZ. CITT. ITA ' is not valid as a file name. This property must be a valid file name.Invalid property value: Node: workspace://SpacesStore/b67caa7d-1e87-49ee-b8e6-26d723b484f3 Name: 2020 RAPPORTI DI SERVIZIO Type: {http://www.alfresco.org/model/content/1.0}folder Property: {http://www.alfresco.org/model/content/1.0}name Constraint: 002013696 Value '2020 RAPPORTI DI SERVIZIO ' is not valid as a file name. This property must be a valid file name.Invalid property value: Node: workspace://SpacesStore/6cca04cc-7ae1-4236-a617-3ad17d1cdacb Name: GJERKAJ Agostin Type: {http://www.alfresco.org/model/content/1.0}folder Property: {http://www.alfresco.org/model/content/1.0}name Constraint: 002013697 Value 'GJERKAJ Agostin ' is not valid as a file name. This property must be a valid file name.Invalid property value: Node: workspace://SpacesStore/92554676-5fa1-4e9f-9664-2f5545af5035 Name: 2020 SANZIONI PASSI CARRAI Type: {http://www.alfresco.org/model/content/1.0}folder Property: {http://www.alfresco.org/model/content/1.0}name Constraint: 002013698 Value '2020 SANZIONI PASSI CARRAI ' is not valid as a file name. This property must be a valid file name.Invalid property value: Node: workspace://SpacesStore/afc47a66-2b56-4ccf-9cfe-470dd53ab653 Name: VOLTURA Type: {http://www.alfresco.org/model/content/1.0}folder Property: {http://www.alfresco.org/model/content/1.0}name Constraint: 002013699 Value 'VOLTURA ' is not valid as a file name. This property must be a valid file name.
org.alfresco.repo.node.integrity.IntegrityException: 002013700 Found 5 integrity violations:
Invalid property value:
Node: workspace://SpacesStore/8cd37226-ddab-4302-9b07-3a9bc4f9f5e9
Name: 2020 ACCERT. RES. MINORI X ACQUISIZ. CITT. ITA
Type: {http://www.alfresco.org/model/content/1.0}folder
Property: {http://www.alfresco.org/model/content/1.0}name
Constraint: 002013695 Value '2020 ACCERT. RES. MINORI X ACQUISIZ. CITT. ITA ' is not valid as a file name. This property must be a valid file name.
Invalid property value:
Node: workspace://SpacesStore/b67caa7d-1e87-49ee-b8e6-26d723b484f3
Name: 2020 RAPPORTI DI SERVIZIO
Type: {http://www.alfresco.org/model/content/1.0}folder
Property: {http://www.alfresco.org/model/content/1.0}name
Constraint: 002013696 Value '2020 RAPPORTI DI SERVIZIO ' is not valid as a file name. This property must be a valid file name.
Invalid property value:
Node: workspace://SpacesStore/6cca04cc-7ae1-4236-a617-3ad17d1cdacb
Name: GJERKAJ Agostin
Type: {http://www.alfresco.org/model/content/1.0}folder
Property: {http://www.alfresco.org/model/content/1.0}name
Constraint: 002013697 Value 'GJERKAJ Agostin ' is not valid as a file name. This property must be a valid file name.
Invalid property value:
Node: workspace://SpacesStore/92554676-5fa1-4e9f-9664-2f5545af5035
Name: 2020 SANZIONI PASSI CARRAI
Type: {http://www.alfresco.org/model/content/1.0}folder
Property: {http://www.alfresco.org/model/content/1.0}name
Constraint: 002013698 Value '2020 SANZIONI PASSI CARRAI ' is not valid as a file name. This property must be a valid file name.
Invalid property value:
Node: workspace://SpacesStore/afc47a66-2b56-4ccf-9cfe-470dd53ab653
Name: VOLTURA
Type: {http://www.alfresco.org/model/content/1.0}folder
Property: {http://www.alfresco.org/model/content/1.0}name
Constraint: 002013699 Value 'VOLTURA ' is not valid as a file name. This property must be a valid file name.
at org.alfresco.repo.node.integrity.IntegrityChecker.checkIntegrity(IntegrityChecker.java:669)
at org.alfresco.repo.node.integrity.IntegrityChecker.beforeCommit(IntegrityChecker.java:771)
at org.alfresco.util.transaction.TransactionSupportUtil$TransactionSynchronizationImpl.beforeCommit(TransactionSupportUtil.java:500)
at org.springframework.transaction.support.TransactionSynchronizationUtils.triggerBeforeCommit(TransactionSynchronizationUtils.java:97)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.triggerBeforeCommit(AbstractPlatformTransactionManager.java:916)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:727)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:711)
at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:654)
at org.alfresco.util.transaction.SpringAwareUserTransaction.commit(SpringAwareUserTransaction.java:507)
at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:472)
at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecute(RepositoryContainer.java:544)
at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecuteAs(RepositoryContainer.java:685)
at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecuteAs(RepositoryContainer.java:721)
at org.alfresco.repo.web.scripts.RepositoryContainer.executeScriptInternal(RepositoryContainer.java:413)
at org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:309)
at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:423)
at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:210)
at org.springframework.extensions.webscripts.servlet.WebScriptServlet.service(WebScriptServlet.java:131)
at org.alfresco.repo.web.scripts.AlfrescoWebScriptServlet.service(AlfrescoWebScriptServlet.java:43)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
at org.alfresco.module.aosmodule.service.ContextRootFilter.doFilter(ContextRootFilter.java:93)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
at org.springframework.extensions.webscripts.servlet.SecurityHeadersFilter.doFilter(SecurityHeadersFilter.java:177)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
at org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:68)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
at org.alfresco.web.app.servlet.ClearSecurityContextFilter.doFilter(ClearSecurityContextFilter.java:53)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:769)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:687)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:359)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:889)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1743)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.base/java.lang.Thread.run(Thread.java:829)
2023-01-21 04:00:03,103 ERROR [quartz.core.JobRunShell] [SearchScheduler_Worker-9] Job DEFAULT.search.archiveCoreBackupJobDetail threw an unhandled Exception:
org.alfresco.error.AlfrescoRuntimeException: 002113913 Read timed out
at org.alfresco.repo.search.impl.solr.AbstractSolrAdminHTTPClient.getOperation(AbstractSolrAdminHTTPClient.java:96)
at org.alfresco.repo.solr.SOLRAdminClient.executeCommand(SOLRAdminClient.java:280)
at org.alfresco.repo.search.impl.solr.SolrBackupClient.executeImpl(SolrBackupClient.java:188)
at org.alfresco.repo.search.impl.solr.SolrBackupClient.execute(SolrBackupClient.java:139)
at org.alfresco.repo.search.impl.solr.SolrBackupJob.execute(SolrBackupJob.java:65)
at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)
Caused by: java.net.SocketTimeoutException: Read timed out
at java.base/java.net.SocketInputStream.socketRead0(Native Method)
at java.base/java.net.SocketInputStream.socketRead(SocketInputStream.java:115)
at java.base/java.net.SocketInputStream.read(SocketInputStream.java:168)
at java.base/java.net.SocketInputStream.read(SocketInputStream.java:140)
at java.base/java.io.BufferedInputStream.fill(BufferedInputStream.java:252)
at java.base/java.io.BufferedInputStream.read(BufferedInputStream.java:271)
at org.apache.commons.httpclient.HttpParser.readRawLine(HttpParser.java:78)
at org.apache.commons.httpclient.HttpParser.readLine(HttpParser.java:106)
at org.apache.commons.httpclient.HttpConnection.readLine(HttpConnection.java:1116)
at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.readLine(MultiThreadedHttpConnectionManager.java:1413)
at org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMethodBase.java:1973)
at org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase.java:1735)
at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1098)
at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
at org.alfresco.httpclient.RequestHeadersHttpClient.executeMethod(RequestHeadersHttpClient.java:84)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
at org.alfresco.httpclient.RequestHeadersHttpClient.executeMethod(RequestHeadersHttpClient.java:69)
at org.alfresco.repo.search.impl.solr.AbstractSolrAdminHTTPClient.getOperation(AbstractSolrAdminHTTPClient.java:73)
... 6 more
2023-01-21 04:00:03,122 ERROR [quartz.core.ErrorLogger] [SearchScheduler_Worker-9] Job (DEFAULT.search.archiveCoreBackupJobDetail threw an exception.
org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: org.alfresco.error.AlfrescoRuntimeException: 002113913 Read timed out]
at org.quartz.core.JobRunShell.run(JobRunShell.java:213)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)
Caused by: org.alfresco.error.AlfrescoRuntimeException: 002113913 Read timed out
at org.alfresco.repo.search.impl.solr.AbstractSolrAdminHTTPClient.getOperation(AbstractSolrAdminHTTPClient.java:96)
at org.alfresco.repo.solr.SOLRAdminClient.executeCommand(SOLRAdminClient.java:280)
at org.alfresco.repo.search.impl.solr.SolrBackupClient.executeImpl(SolrBackupClient.java:188)
at org.alfresco.repo.search.impl.solr.SolrBackupClient.execute(SolrBackupClient.java:139)
at org.alfresco.repo.search.impl.solr.SolrBackupJob.execute(SolrBackupJob.java:65)
at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
... 1 more
Caused by: java.net.SocketTimeoutException: Read timed out
at java.base/java.net.SocketInputStream.socketRead0(Native Method)
at java.base/java.net.SocketInputStream.socketRead(SocketInputStream.java:115)
at java.base/java.net.SocketInputStream.read(SocketInputStream.java:168)
at java.base/java.net.SocketInputStream.read(SocketInputStream.java:140)
at java.base/java.io.BufferedInputStream.fill(BufferedInputStream.java:252)
at java.base/java.io.BufferedInputStream.read(BufferedInputStream.java:271)
at org.apache.commons.httpclient.HttpParser.readRawLine(HttpParser.java:78)
at org.apache.commons.httpclient.HttpParser.readLine(HttpParser.java:106)
at org.apache.commons.httpclient.HttpConnection.readLine(HttpConnection.java:1116)
at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.readLine(MultiThreadedHttpConnectionManager.java:1413)
at org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMethodBase.java:1973)
at org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase.java:1735)
at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1098)
at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
at org.alfresco.httpclient.RequestHeadersHttpClient.executeMethod(RequestHeadersHttpClient.java:84)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
at org.alfresco.httpclient.RequestHeadersHttpClient.executeMethod(RequestHeadersHttpClient.java:69)
at org.alfresco.repo.search.impl.solr.AbstractSolrAdminHTTPClient.getOperation(AbstractSolrAdminHTTPClient.java:73)
... 6 more

 

2 Replies
menczingerm
Active Member

Re: Integrity violations : invalid property value found on "cm:name" during upload of fold

This is the constrait for cm:name property from the contentModel.xml

 

<constraints>
   <constraint name="cm:filename" type="REGEX">
      <parameter name="expression"><value><![CDATA[(.*[\"\*\\\>\<\?\/\:\|]+.*)|(.*[\.]?.*[\.]+$)|(.*[ ]+$)]]></value></parameter>
      <parameter name="requiresMatch"><value>false</value></parameter>
   </constraint>
   <constraint name="cm:userNameConstraint" type="org.alfresco.repo.dictionary.constraint.UserNameConstraint" />
   <constraint name="cm:authorityNameConstraint" type="org.alfresco.repo.dictionary.constraint.AuthorityNameConstraint" />
   <constraint name="cm:storeSelectorConstraint" type="REGISTERED">
      <parameter name="registeredName"><value>defaultStoreSelector</value></parameter>
   </constraint>
</constraints>

 

 

I have the following questions:

1) Does the integrity checker imply that Alfresco calls Solar for model verification on solar is it correct or is everything limited on Alfresco ?

Alfresco app is validating the model constraits

2) If solar is off for some reason, the file is STILL uploaded to alfresco because it has no way to ask solar to check the integrity checker ?

As mentioned before Alfresco app is validating the model integrity not SOLR.

3) I find myself with the need to change the value of the file name (node creation to be clear) BEFORE the integrity checker check is a behavior that triggers before this check the correct solution? or are there other tools I can use?

Tested via RestApi and CMIS browserbind calls and as expected Alfresco will trim the space from the end of thefilename, when you try to upload a folder in Share UI then it do not trim the spaces at the end of the folder name so you will receive this error.

 

Constraint: 002013695 Value '2020 ACCERT. RES. MINORI X ACQUISIZ. CITT. ITA ' is not valid as a file name. This property must be a valid file name.

The space is the problem at the end of the filename,  you should preprocess the filne/folder name values before the upload.

4535992
Senior Member

Re: Integrity violations : invalid property value found on "cm:name" during upload of fold

OMG, ty very much for the clarification.

For the point 3 a behaviour  (on the preCreateNode hook) for trim the folder name is the right solution  ? or is better if i override directly the webscript  ?