cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic Asset Collections are not updated

lemmy
Champ in-the-making
Champ in-the-making
Hi,

I'm using dynamic asset collection and they are not updated.

There is a folder 'pictures' which contains pictures I want to display. Let's assume it contains 5 files. I've an asset collection with the following attributes:

Name: PictureCollection
Title: Pics
Query Language: cmis-alfresco
Query: SELECT d.* from cmis:document as d WHERE in_folder('${sectionSmiley Tongueictures}')
Maximum Size: 50
Minutes To Query Refresh: 1

After creating the collection the 5 files contained in the pictures-folder are correctly displayed. After adding a 6th file to this folder the collection is not updated.

Workaround:
When changeing folders name and updating the collection accordingly the 6th file is included.

But I guess this is not the intended behaviour.

Am I missing anything???

Thanks,
Lemmy
3 REPLIES 3

bremmington
Champ on-the-rise
Champ on-the-rise
Every now and again this kind of problem is reported - I think I've heard of something similar two or three times now - but I've never been able to reproduce it. If you're able to use the Node Browser to find all the properties defined on the asset collection that's having the problem then that may help track it down - just post all the property values here along with the exact time that you read them. Also, add this line to the log4j.properties file in the repo to see if anything useful is being logged:

    log4j.logger.org.alfresco.module.org_alfresco_module_wcmquickstart=debug

aussen2
Champ in-the-making
Champ in-the-making
I have a similar issue on Alfresco Community 4.0.d. Asset Collections do often not refresh. Even when refreshing them manually I first have to empty the Query property, save, re-enter the query string and save again to get it to update the Collection. After this process the property ws:refreshAt shows the correct value according my ws:minsToQueryRefresh setting for the Collection. But it never gets refreshed. The log files show that the DynamicCollectionProcessor runs every minute as expected but always reports "Running dynamic collection refresh processor across 0 dynamic collection nodes". Any idea how to fix that issue?

aussen2
Champ in-the-making
Champ in-the-making
I now got the DynamicCollectionProcessor to find and process the Collections. The reason for it not working in the first place were some locally set permission. The locally set permissions still allowed read access for everybody but somehow the pure existence of that locally set permissions caused the DynamicCollectionProcessor not to find any Collections. Once I removed the locally set permissions it could find and process all the Collections.

But the found and processed collections still don't refresh their list of assets. For each of my collections I found the following or similar output in the log file.


2012-04-26 09:30:03,475  DEBUG [org_alfresco_module_wcmquickstart.jobs.DynamicCollectionProcessor] [DefaultScheduler_Worker-4] Refreshing dynamic collection category.articles
2012-04-26 09:30:03,486  DEBUG [org_alfresco_module_wcmquickstart.util.WebassetCollectionHelper] [DefaultScheduler_Worker-4] About to run query for dynamic asset collection (workspace://SpacesStore/890b4c04-98f2-4691-8141-b5ef59e59b46): SELECT d.* FROM cmis:document AS d JOIN ws:webasset AS wa ON d.cmis:objectId = wa.cmis:objectId JOIN wsws:webasset AS ws ON d.cmis:objectId = ws.cmis:objectId WHERE d.cmis:objectTypeId='D:wsws:article' AND ANY ws.wsws:appliedCategories IN ('sepslanka') ORDER BY ws.wsws:publishDate DESC, ws.wsws:orderIndex ASC
2012-04-26 09:30:03,495  DEBUG [impl.solr.SolrQueryHTTPClient] [DefaultScheduler_Worker-4] Sent :/solr/alfresco/cmis?q=SELECT+d.*+FROM+cmis%3Adocument+AS+d+JOIN+ws%3Awebasset+AS+wa+ON+d.cmis%3AobjectId+%3D+wa.cmis%3AobjectId+JOIN+wsws%3Awebasset+AS+ws+ON+d.cmis%3AobjectId+%3D+ws.cmis%3AobjectId+WHERE+d.cmis%3AobjectTypeId%3D%27D%3Awsws%3Aarticle%27+AND+ANY+ws.wsws%3AappliedCategories+IN+%28%27sepslanka%27%29+ORDER+BY+ws.wsws%3ApublishDate+DESC%2C+ws.wsws%3AorderIndex+ASC&wt=json&fl=*%2Cscore&rows=9999&df=TEXT&start=0&locale=en_US&fq=%7B%21afts%7DAUTHORITY_FILTER_FROM_JSON&fq=%7B%21afts%7DTENANT_FILTER_FROM_JSON
2012-04-26 09:30:03,495  DEBUG [impl.solr.SolrQueryHTTPClient] [DefaultScheduler_Worker-4]    with: {"textAttributes":[],"allAttributes":[],"templates":[],"authorities":["GROUP_EVERYONE","ROLE_SYSTEM","System"],"tenants":[""],"query":"SELECT d.* FROM cmis:document AS d JOIN ws:webasset AS wa ON d.cmis:objectId = wa.cmis:objectId JOIN wsws:webasset AS ws ON d.cmis:objectId = ws.cmis:objectId WHERE d.cmis:objectTypeId='D:wsws:article' AND ANY ws.wsws:appliedCategories IN ('sepslanka') ORDER BY ws.wsws:publishDate DESC, ws.wsws:orderIndex ASC","locales":["en_US"],"defaultNamespace":"http://www.alfresco.org/model/content/1.0','defaultFTSFieldOperator':'OR','defaultFTSOperator':'OR"}
2012-04-26 09:30:03,495  DEBUG [impl.solr.SolrQueryHTTPClient] [DefaultScheduler_Worker-4] Got: 452 in 7 ms

But after the DynamicCollectionProcessor is finished the collections are still not updated. It seems like the DynamicCollectionProcessor does not finish it's work because of another error. That would explain why the collections are never updated. I found that the following error occurs in the log file directly after a whole lot of the output for the collection updating shown above.


2012-04-26 10:10:18,746  DEBUG [org_alfresco_module_wcmquickstart.jobs.DynamicCollectionProcessor] [DefaultScheduler_Worker-8] Refreshing dynamic collection latest.content
2012-04-26 10:10:18,753  ERROR [quartz.core.JobRunShell] [DefaultScheduler_Worker-8] Job DEFAULT.org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean#6e30fc1f threw an unhandled Exception:
org.springframework.scheduling.quartz.JobMethodInvocationFailedException: Invocation of method 'run' on target class [class org.alfresco.module.org_alfresco_module_wcmquickstart.jobs.DynamicCollectionProcessor] failed; nested exception is org.alfresco.service.cmr.repository.InvalidNodeRefException: Node does not exist: workspace://SpacesStore/123d08f9-98c2-4c94-9603-c3975ce4e201(Status[changeTxnId=d66f65fd-7ff8-4e20-be75-c88e73709435, dbTxnId=40287, deleted=true])
   at org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean$MethodInvokingJob.executeInternal(MethodInvokingJobDetailFactoryBean.java:273)
   at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:86)
   at org.quartz.core.JobRunShell.run(JobRunShell.java:216)
   at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:563)
Caused by: org.alfresco.service.cmr.repository.InvalidNodeRefException: Node does not exist: workspace://SpacesStore/123d08f9-98c2-4c94-9603-c3975ce4e201(Status[changeTxnId=d66f65fd-7ff8-4e20-be75-c88e73709435, dbTxnId=40287, deleted=true])
   at org.alfresco.repo.node.db.DbNodeServiceImpl.getNodePairNotNull(DbNodeServiceImpl.java:176)
   at org.alfresco.repo.node.db.DbNodeServiceImpl.removeAssociation(DbNodeServiceImpl.java:2079)
   at sun.reflect.GeneratedMethodAccessor561.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
   at org.alfresco.repo.tenant.MultiTNodeServiceInterceptor.invoke(MultiTNodeServiceInterceptor.java:104)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
   at $Proxy8.removeAssociation(Unknown Source)
   at sun.reflect.GeneratedMethodAccessor561.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.alfresco.repo.service.StoreRedirectorProxyFactory$RedirectorInvocationHandler.invoke(StoreRedirectorProxyFactory.java:215)
   at $Proxy9.removeAssociation(Unknown Source)
   at sun.reflect.GeneratedMethodAccessor561.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
   at org.alfresco.repo.tagging.TagScopePropertyMethodInterceptor.invoke(TagScopePropertyMethodInterceptor.java:152)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.alfresco.repo.node.MLPropertyInterceptor.invoke(MLPropertyInterceptor.java:305)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.alfresco.repo.tagging.TagScopePropertyMethodInterceptor.invoke(TagScopePropertyMethodInterceptor.java:152)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.alfresco.repo.tagging.TagScopePropertyMethodInterceptor.invoke(TagScopePropertyMethodInterceptor.java:152)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.alfresco.repo.node.MLPropertyInterceptor.invoke(MLPropertyInterceptor.java:305)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.alfresco.repo.node.NodeRefPropertyMethodInterceptor.invoke(NodeRefPropertyMethodInterceptor.java:269)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.alfresco.repo.node.MLPropertyInterceptor.invoke(MLPropertyInterceptor.java:305)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.alfresco.repo.node.NodeRefPropertyMethodInterceptor.invoke(NodeRefPropertyMethodInterceptor.java:269)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.alfresco.repo.node.NodeRefPropertyMethodInterceptor.invoke(NodeRefPropertyMethodInterceptor.java:269)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
   at $Proxy8.removeAssociation(Unknown Source)
   at org.alfresco.module.org_alfresco_module_wcmquickstart.util.WebassetCollectionHelper.clearCollection(WebassetCollectionHelper.java:112)
   at org.alfresco.module.org_alfresco_module_wcmquickstart.util.WebassetCollectionHelper.refreshCollection(WebassetCollectionHelper.java:136)
   at org.alfresco.module.org_alfresco_module_wcmquickstart.jobs.DynamicCollectionProcessor$1$1.execute(DynamicCollectionProcessor.java:150)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:388)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:259)
   at org.alfresco.module.org_alfresco_module_wcmquickstart.jobs.DynamicCollectionProcessor$1.doWork(DynamicCollectionProcessor.java:107)
   at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:519)
   at org.alfresco.module.org_alfresco_module_wcmquickstart.jobs.DynamicCollectionProcessor.run(DynamicCollectionProcessor.java:102)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.springframework.util.MethodInvoker.invoke(MethodInvoker.java:273)
   at org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean$MethodInvokingJob.executeInternal(MethodInvokingJobDetailFactoryBean.java:264)
   … 3 more
2012-04-26 10:10:18,753  ERROR [quartz.core.ErrorLogger] [DefaultScheduler_Worker-8] Job (DEFAULT.org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean#6e30fc1f threw an exception.
org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: org.springframework.scheduling.quartz.JobMethodInvocationFailedException: Invocation of method 'run' on target class [class org.alfresco.module.org_alfresco_module_wcmquickstart.jobs.DynamicCollectionProcessor] failed; nested exception is org.alfresco.service.cmr.repository.InvalidNodeRefException: Node does not exist: workspace://SpacesStore/123d08f9-98c2-4c94-9603-c3975ce4e201(Status[changeTxnId=d66f65fd-7ff8-4e20-be75-c88e73709435, dbTxnId=40287, deleted=true])]
   at org.quartz.core.JobRunShell.run(JobRunShell.java:227)
   at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:563)
Caused by: org.springframework.scheduling.quartz.JobMethodInvocationFailedException: Invocation of method 'run' on target class [class org.alfresco.module.org_alfresco_module_wcmquickstart.jobs.DynamicCollectionProcessor] failed; nested exception is org.alfresco.service.cmr.repository.InvalidNodeRefException: Node does not exist: workspace://SpacesStore/123d08f9-98c2-4c94-9603-c3975ce4e201(Status[changeTxnId=d66f65fd-7ff8-4e20-be75-c88e73709435, dbTxnId=40287, deleted=true])
   at org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean$MethodInvokingJob.executeInternal(MethodInvokingJobDetailFactoryBean.java:273)
   at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:86)
   at org.quartz.core.JobRunShell.run(JobRunShell.java:216)
   … 1 more
Caused by: org.alfresco.service.cmr.repository.InvalidNodeRefException: Node does not exist: workspace://SpacesStore/123d08f9-98c2-4c94-9603-c3975ce4e201(Status[changeTxnId=d66f65fd-7ff8-4e20-be75-c88e73709435, dbTxnId=40287, deleted=true])
   at org.alfresco.repo.node.db.DbNodeServiceImpl.getNodePairNotNull(DbNodeServiceImpl.java:176)
   at org.alfresco.repo.node.db.DbNodeServiceImpl.removeAssociation(DbNodeServiceImpl.java:2079)
   at sun.reflect.GeneratedMethodAccessor561.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
   at org.alfresco.repo.tenant.MultiTNodeServiceInterceptor.invoke(MultiTNodeServiceInterceptor.java:104)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
   at $Proxy8.removeAssociation(Unknown Source)
   at sun.reflect.GeneratedMethodAccessor561.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.alfresco.repo.service.StoreRedirectorProxyFactory$RedirectorInvocationHandler.invoke(StoreRedirectorProxyFactory.java:215)
   at $Proxy9.removeAssociation(Unknown Source)
   at sun.reflect.GeneratedMethodAccessor561.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
   at org.alfresco.repo.tagging.TagScopePropertyMethodInterceptor.invoke(TagScopePropertyMethodInterceptor.java:152)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.alfresco.repo.node.MLPropertyInterceptor.invoke(MLPropertyInterceptor.java:305)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.alfresco.repo.tagging.TagScopePropertyMethodInterceptor.invoke(TagScopePropertyMethodInterceptor.java:152)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.alfresco.repo.tagging.TagScopePropertyMethodInterceptor.invoke(TagScopePropertyMethodInterceptor.java:152)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.alfresco.repo.node.MLPropertyInterceptor.invoke(MLPropertyInterceptor.java:305)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.alfresco.repo.node.NodeRefPropertyMethodInterceptor.invoke(NodeRefPropertyMethodInterceptor.java:269)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.alfresco.repo.node.MLPropertyInterceptor.invoke(MLPropertyInterceptor.java:305)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.alfresco.repo.node.NodeRefPropertyMethodInterceptor.invoke(NodeRefPropertyMethodInterceptor.java:269)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.alfresco.repo.node.NodeRefPropertyMethodInterceptor.invoke(NodeRefPropertyMethodInterceptor.java:269)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
   at $Proxy8.removeAssociation(Unknown Source)
   at org.alfresco.module.org_alfresco_module_wcmquickstart.util.WebassetCollectionHelper.clearCollection(WebassetCollectionHelper.java:112)
   at org.alfresco.module.org_alfresco_module_wcmquickstart.util.WebassetCollectionHelper.refreshCollection(WebassetCollectionHelper.java:136)
   at org.alfresco.module.org_alfresco_module_wcmquickstart.jobs.DynamicCollectionProcessor$1$1.execute(DynamicCollectionProcessor.java:150)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:388)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:259)
   at org.alfresco.module.org_alfresco_module_wcmquickstart.jobs.DynamicCollectionProcessor$1.doWork(DynamicCollectionProcessor.java:107)
   at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:519)
   at org.alfresco.module.org_alfresco_module_wcmquickstart.jobs.DynamicCollectionProcessor.run(DynamicCollectionProcessor.java:102)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.springframework.util.MethodInvoker.invoke(MethodInvoker.java:273)
   at org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean$MethodInvokingJob.executeInternal(MethodInvokingJobDetailFactoryBean.java:264)
   … 3 more


The InvalidNodeRefException complains about a NodeRef that does not exist. I also cannot find it using the node browser. So why does the DynamicCollectionProcessor try to access it at all? And how could I tell it to stop doing so?