The association source type is incorrect

cancel
Showing results for 
Search instead for 
Did you mean: 
tyuton
Member II

The association source type is incorrect

Hello,

I'm running v5.2 CE, got the following error message each time job is runnig a transaction :

2021-02-01 11:51:03,852 ERROR [org.alfresco.repo.node.integrity.IntegrityChecker] [***.classement.SchedulerFactoryBean_Worker-8] Found 1 integrity violations:
The association source type is incorrect:
Source Node: workspace://SpacesStore/77787edc-e93a-4a10-b5ea-b5cac8671bc0
Association: Association[ class=ClassDef[name={http://www.alfresco.org/model/content/1.0}folder], name={http://www.alfresco.org/model/content/1.0}contains, target class={http://www.alfresco.org/model/system/1.0}base, source role=null, target role=null]
Required Source Type: {http://www.alfresco.org/model/content/1.0}folder
Actual Source Type: {http://www.alfresco.org/model/content/1.0}content

The source node is a cm:content from outlook .MSG, this is not a folder, should not contain default associations ?

I ran ***/alfresco/api/-default-/public/alfresco/versions/1/nodes/77787edc-e93a-4a10-b5ea-b5cac8671bc0/children?skipCount=0&maxItems=100, got 0 results

Also i checked sources and tagets associations, got 0 results.

 

At the moment i'm unable to find the documents that fire the incorrect association source type, please help ?

 

 

2 Replies
afaust
Master

Re: The association source type is incorrect

When you check the node you do not get any child associations because the transaction / change failed and nothing was saved at all. That is the entire reason of the exception - to inform you there was an inconsistency that prevented the completion of the operation and persisting of any changes.

The main question is, what kind of job do you have running that tries to perform such an invalid change. Judging from the obfuscated thread name "***.classement.SchedulerFactoryBean_Worker-8" I can only assume this is some worker of a custom or 3rd-party job, as out-of-the-box Alfresco job workers typically look different. So I would investigate the code for that job or check with the developer of the 3rd-party component from which it originates.

tyuton
Member II

Re: The association source type is incorrect

Thank you for your help. Yes the job is there and was working fine last 3 years. This error is related to MSG files.

Maybe the problem started when .MSG files are opened from Share, a pdf child is created. I even deleted the pdf child from Share, what is used i guess for preview only.

The job call a method called classer(), this method is as follow :

	public void classer() throws FileExistsException, FileNotFoundException {

		logger.info("batch classement documents ***");

		RetryingTransactionCallback<Object> createTenantCallback = new RetryingTransactionCallback<Object>() {
			public Object execute() throws Throwable {

				List<ChildAssociationRef> childrenFolders = getFoldersToClass();
				if (childrenFolders.size() > 0)
					classerDossier***(childrenFolders);
				else
					logger.info("il n'y pas de dossier *** à classer");

				return null;
			}
		};
		transactionService.getRetryingTransactionHelper().doInTransaction(createTenantCallback, false, true);
		logger.info("Classement ***est terminé");

	}

The main business is on classerDossier***(childrenFolders); it moves files from one fixed portal folder to other sub-folders.

The problem is that file 77787edc-e93a-4a10-b5ea-b5cac8671bc0 is not on the portal folder, it should not enter in this transaction... Even if a file with same is moved to sub-folder, the new file name is appended with numbers 1,2,3...

 

I will check childrenFolders files with same names, and try to move it out of the job scop...

 

2021-01-29 00:37:28,787 ERROR [org.quartz.core.JobRunShell] [***.classement.SchedulerFactoryBean_Worker-8] Job DEFAULT.***.classement.jobDetail threw an unhandled Exception:
org.alfresco.repo.node.integrity.IntegrityException: 00292050725 Found 1 integrity violations:
The association source type is incorrect:
Source Node: workspace://SpacesStore/77787edc-e93a-4a10-b5ea-b5cac8671bc0
Association: Association[ class=ClassDef[name={http://www.alfresco.org/model/content/1.0}folder], name={http://www.alfresco.org/model/content/1.0}contains, target class={http://www.alfresco.org/model/system/1.0}base, source role=null, target role=null]
Required Source Type: {http://www.alfresco.org/model/content/1.0}folder
Actual Source Type: {http://www.alfresco.org/model/content/1.0}content
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: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:486)
at ***.classement.SinistreClassementExecuter.classer(SinistreClassementExecuter.java:76)
at ***.classement.SinistreClassementJob$1.doWork(SinistreClassementJob.java:66)
at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:555)
at ***.classement.SinistreClassementJob.executeJob(SinistreClassementJob.java:62)
at org.alfresco.schedule.ScheduledJobLockExecuter.execute(ScheduledJobLockExecuter.java:94)
at org.alfresco.schedule.AbstractScheduledLockedJob.executeInternal(AbstractScheduledLockedJob.java:72)
at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:114)
at org.quartz.core.JobRunShell.run(JobRunShell.java:216)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:563)