I have an Alfresco 6.1 platform project to enable a caching content store. I am facing the following error while deploying the project:
Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.alfresco.util.CronTriggerBean] for bean with name 'cachingContentStoreCleanerTrigger' defined in class path resource [alfresco/module/blob-connector/context/service-context.xml]; nested exception is java.lang.ClassNotFoundException: org.alfresco.util.CronTriggerBean
This my bean configuration in service-context.xml:
<bean id="cachingContentStoreCleanerTrigger" class="org.alfresco.util.CronTriggerBean">
<property name="jobDetail">
<ref bean="cachingContentStoreCleanerJobDetail" />
</property>
<property name="scheduler">
<ref bean="schedulerFactory" />
</property>
<property name="cronExpression">
<value>${system.content.caching.contentCleanup.cronExpression}
</value>
</property>
</bean>
This was working fine in version 5.2.
Scheduled Jobs have changed from Alfresco 6.X
Follow the ACS 6 Migration Guide to adapt your Spring beans:
ACS 6 Migration Guide · Alfresco/alfresco-repository Wiki · GitHub
Thanks for replying.
I changed the bean as per the link you provided. Now I am facing the following error:
Error creating bean with name 'cachingContentStoreCleanerSchedulerAccessor' defined in class path resource [alfresco/module/blob-connector/context/service-context.xml]: Cannot resolve reference to bean 'schedulerFactory' while setting bean property 'scheduler'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'schedulerFactory' available
This is my modified bean:
<bean id="cachingContentStoreCleanerSchedulerAccessor" class="org.alfresco.schedule.AlfrescoSchedulerAccessorBean">
<property name="scheduler" ref="schedulerFactory"/>
<property name="triggers">
<list>
<bean id="cachingContentStoreCleanerTrigger" class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
<property name="cronExpression" value="${system.content.caching.contentCleanup.cronExpression}"/>
<property name="jobDetail" ref="cachingContentStoreCleanerJobDetail"/>
</bean>
</list>
</property>
</bean>
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.