03-14-2019 12:57 AM
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.
03-14-2019 10:31 AM
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
03-17-2019 08:10 PM
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>
Explore our Alfresco products with the links below. Use labels to filter content by product module.