cancel
Showing results for 
Search instead for 
Did you mean: 

How to enable link validation?

pyppe
Champ in-the-making
Champ in-the-making
Hi.

How do I enable link validation? I use Alfresco 3.2 CE. I've defined the following properties in file $ALFRESCO_HOME/WEB-INF/classes/alfresco/repository.properties:

linkvalidation.pollInterval=5000
linkvalidation.retryInterval=120000
linkvalidation.disableOnFail=false

By setting linkvalidation.pollInterval > 0, I've manged to get the "Check Links" feature visible in Alfresco Web Client GUI. However, when I try to execute the Check Links -action following Exception gets thrown:

13:55:00,211  ERROR [alfresco.linkvalidation.LinkValidationAction] Link Validation Error:
org.alfresco.error.AlfrescoRuntimeException: 08170004 Link validation not performed - currently disabled
        at org.alfresco.linkvalidation.LinkValidationAction.executeImpl(LinkValidationAction.java:173)
        at org.alfresco.repo.action.executer.ActionExecuterAbstractBase.execute(ActionExecuterAbstractBase.java:127)
        at org.alfresco.repo.action.ActionServiceImpl.directActionExecution(ActionServiceImpl.java:711)
        at org.alfresco.repo.action.ActionServiceImpl.executeActionImpl(ActionServiceImpl.java:648)
        at org.alfresco.repo.action.AsynchronousActionExecutionQueueImpl$ActionExecutionWrapper$1$1.execute(AsynchronousActionExecutionQueueImpl.java:369)
        at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:326)
        at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:233)
        at org.alfresco.repo.action.AsynchronousActionExecutionQueueImpl$ActionExecutionWrapper$1.doWork(AsynchronousActionExecutionQueueImpl.java:378)
        at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:489)
        at org.alfresco.repo.action.AsynchronousActionExecutionQueueImpl$ActionExecutionWrapper.run(AsynchronousActionExecutionQueueImpl.java:381)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:619)

Have I missed something (documentation about enabling this feature is very slim), or is this a bug?
4 REPLIES 4

mrogers
Star Contributor
Star Contributor
Some basic alfresco admin reminders.
You configure 3.2 via alfresco-global.properties.
And you never touch the files below WEB-INF since your changes will be overwritten by an alfresco upgrade.

The implementation of Link Validation was problematic.   So it has been disabled,  pending either rework or removal from the product.

If you really do want to get it to work there is a property on the link validation service that you need to turn on.    Otherwise you get behaviour you are seeing.

pyppe
Champ in-the-making
Champ in-the-making
If you really do want to get it to work there is a property on the link validation service that you need to turn on.    Otherwise you get behaviour you are seeing.

Could you please specify what this property is? I've looked at linkvalidation-service-context.xml, but the pollInterval property was the only one related to enabling the service.

mrogers
Star Contributor
Star Contributor
linkValidationDisabled

pyppe
Champ in-the-making
Champ in-the-making
linkValidationDisabled

I added the following property to linkValidationService Bean in file linkvalidation-service-context.xml:

        <property name="linkValidationDisabled">
           <value>false</value>
        </property>

Still no cigar. Same Exception gets thrown.

Btw, I checked LinkValidationServiceImpl.java of SVN HEAD in http://svn.alfresco.com/repos/alfresco-open-mirror/alfresco/HEAD/root/projects/link-validation/sourc...:

    public boolean isLinkValidationDisabled()
    {
        // TODO merge here with 2.2 JMX flag
        //Boolean disabled = (Boolean)sysAdminCache.get(KEY_SYSADMIN_LINKVALIDATION_DISABLED);
        //return ((! isVirtServerAvailable()) || (disabled == null ? false : disabled.booleanValue());
        return (poll_interval_ <= 0 || (! isVirtServerAvailable()));
    }

That code would suggest that the service is considered as enabled when pollInterval > 0. I've set it to 5000, but as I said; still no luck.