cancel
Showing results for 
Search instead for 
Did you mean: 

FOLDER NAME IS INVALID

joyola83
Champ in-the-making
Champ in-the-making
I am trying to copy a directory to ALFRESCO using CIFS.

cp -R /data/* /opt/ALFRESCO/Sitios/mi-sitio/documentLibrary

I've mounted /opt/ALFRESCO before in /etc/fstab.

But I got this exception:

Constraint: 05170022 Value 'LISTA. CHOFERES. VEHICULOS.EXP.CENTAURO.' 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:661)
        at org.alfresco.repo.transaction.AlfrescoTransactionSupport$TransactionSynchronizationImpl.beforeCommit(AlfrescoTransactionSupport.java:688)
        at org.springframework.transaction.support.TransactionSynchronizationUtils.triggerBeforeCommit(TransactionSynchronizationUtils.java:95)
        at org.springframework.transaction.support.AbstractPlatformTransactionManager.triggerBeforeCommit(AbstractPlatformTransactionManager.java:927)
        at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:737)
        at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:723)
        at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:393)
        at org.alfresco.util.transaction.SpringAwareUserTransaction.commit(SpringAwareUserTransaction.java:472)
        at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:474)
        at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:342)
        at org.alfresco.filesys.repo.FilesystemTransactionAdvice.invoke(FilesystemTransactionAdvice.java:95)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
        at com.sun.proxy.$Proxy246.createDirectory(Unknown Source)
        at org.alfresco.filesys.repo.NonTransactionalRuleContentDiskDriver.createDirectory(NonTransactionalRuleContentDiskDriver.java:187)
        at org.alfresco.filesys.repo.LegacyFileStateDriver.createDirectory(LegacyFileStateDriver.java:551)
        at org.alfresco.filesys.repo.BufferedContentDiskDriver.createDirectory(BufferedContentDiskDriver.java:461)
        at org.alfresco.jlan.smb.server.CoreProtocolHandler.procCreateDirectory(CoreProtocolHandler.java:525)
        at org.alfresco.jlan.smb.server.CoreProtocolHandler.runProtocol(CoreProtocolHandler.java:3790)
        at org.alfresco.jlan.smb.server.NTProtocolHandler.runProtocol(NTProtocolHandler.java:369)
        at org.alfresco.jlan.smb.server.SMBSrvSession.runHandler(SMBSrvSession.java:1395)
        at org.alfresco.jlan.smb.server.SMBSrvSession.processPacket(SMBSrvSession.java:1489)
        at org.alfresco.jlan.smb.server.nio.NIOCIFSThreadRequest.runRequest(NIOCIFSThreadRequest.java:150)
        at org.alfresco.jlan.server.thread.ThreadRequestPool$ThreadWorker.run(ThreadRequestPool.java:153)
        at java.lang.Thread.run(Thread.java:724

So I can't finish the copy.  How I must nomilize the name of the folder to copy to ALFRESCO?

or is it possible to disable the validation of names?

Thanks on advance

4 REPLIES 4

sanket
Champ on-the-rise
Champ on-the-rise
If this is your folder name 'LISTA. CHOFERES. VEHICULOS.EXP.CENTAURO.', then the problem is that its ending with a '.'.
Try removing the '.' at the end of its name; and you will be able to create it.
You can create your custom rule in the arriving alfresco folder which will normalize (strip) the invalid chars.

joyola83
Champ in-the-making
Champ in-the-making
Thanks for your response.  Also I've found that it's possible to disable the error.

<strong>IntegrityChecker.java</strong>
<java>
        if (failOnViolation && !warnOnly)
        {
            logger.error(sb.toString());
            throw new IntegrityException(sb.toString(), failures);
        }
        else
        {
            logger.warn(sb.toString());
            // no exception
        }
</java>

But I dont know hot to set failOnViolation in false.

Any idea?

joyola83
Champ in-the-making
Champ in-the-making
I've found that it's possible to update this properties.

<blockcode>
#
# Enable system model integrity checking.
# WARNING: Changing this is unsupported; bugs may corrupt data
system.integrity.enabled=true
# Do integrity violations fail transactions
# WARNING: Changing this is unsupported; bugs may corrupt data
system.integrity.failOnViolation=true
# The number of errors to report when violations are detected
system.integrity.maxErrorsPerTransaction=5
# Add call stacks to integrity events so that errors are logged with possible causes
# WARNING: This is expensive and should only be switched on for diagnostic purposes
system.integrity.trace=false
</blockcode>

But there are same warning that it's not a good idea to change this value.

I'm importing a existing file system using the bulk import tool, and I have a lot of file that dont respect the default pattern to be a valid name.  And it's not possible to change the file manually.

Any idea?

mrogers
Star Contributor
Star Contributor
You probably don't want to disable the integrity checker.   Since that checks many different constraints.   Perhaps remove the specific name constraint?  Or change the pattern ?  

However the name constraint is there for a reason and if you change it then you will be incompatible with things that expect windows like filesystems.   (The repo itself couldn't care less and will be fine with any name.   Although there will be a limit on the filename length.)