11-03-2016 06:50 AM
I have installed alfresco-trashcan-cleaner AMP, and of course I have a problem with that
I got in my log:
2016-11-03 04:00:00,388 ERROR [org.quartz.core.JobRunShell] [DefaultScheduler_Worker-6] Job DEFAULT.tempFileCleanerJobDetail#1 threw an unhandled Exception:
java.lang.NullPointerException
at org.alfresco.trashcan.TrashcanCleaner.olderThanDaysToKeep(TrashcanCleaner.java:102)
at org.alfresco.trashcan.TrashcanCleaner.fillBatchToDelete(TrashcanCleaner.java:84)
at org.alfresco.trashcan.TrashcanCleaner.getBatchToDelete(TrashcanCleaner.java:75)
at org.alfresco.trashcan.TrashcanCleaner.clean(TrashcanCleaner.java:48)
at org.alfresco.trashcan.TrashcanCleanerJob$1.execute(TrashcanCleanerJob.java:36)
at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:457)
at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:326)
at org.alfresco.trashcan.TrashcanCleanerJob.cleanInTransaction(TrashcanCleanerJob.java:40)
at org.alfresco.trashcan.TrashcanCleanerJob.executeJob(TrashcanCleanerJob.java:29)
at org.alfresco.schedule.ScheduledJobLockExecuter.execute(ScheduledJobLockExecuter.java:93)
at org.alfresco.schedule.AbstractScheduledLockedJob.executeInternal(AbstractScheduledLockedJob.java:71)
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)
2016-11-03 04:00:00,391 ERROR [org.quartz.core.ErrorLogger] [DefaultScheduler_Worker-6] Job (DEFAULT.tempFileCleanerJobDetail#1 threw an exception.
org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: java.lang.NullPointerException]
at org.quartz.core.JobRunShell.run(JobRunShell.java:227)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:563)
Caused by: java.lang.NullPointerException
at org.alfresco.trashcan.TrashcanCleaner.olderThanDaysToKeep(TrashcanCleaner.java:102)
at org.alfresco.trashcan.TrashcanCleaner.fillBatchToDelete(TrashcanCleaner.java:84)
at org.alfresco.trashcan.TrashcanCleaner.getBatchToDelete(TrashcanCleaner.java:75)
at org.alfresco.trashcan.TrashcanCleaner.clean(TrashcanCleaner.java:48)
at org.alfresco.trashcan.TrashcanCleanerJob$1.execute(TrashcanCleanerJob.java:36)
at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:457)
at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:326)
at org.alfresco.trashcan.TrashcanCleanerJob.cleanInTransaction(TrashcanCleanerJob.java:40)
at org.alfresco.trashcan.TrashcanCleanerJob.executeJob(TrashcanCleanerJob.java:29)
at org.alfresco.schedule.ScheduledJobLockExecuter.execute(ScheduledJobLockExecuter.java:93)
at org.alfresco.schedule.AbstractScheduledLockedJob.executeInternal(AbstractScheduledLockedJob.java:71)
at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:114)
at org.quartz.core.JobRunShell.run(JobRunShell.java:216)
... 1 more
My settings from alfresco-global.properties are:
system.content.eagerOrphanCleanup=true
trashcan.cron=0 0 4 * * ?
trashcan.daysToKeep=1
trashcan.deleteBatchCount=1000
log4j.logger.org.alfresco.trashcan=debug
trashcan.cleaner.cron=0 0 4 * * ?
trashcan.cleaner.protected.day=1
I think it could be related with bad settings in alfresco-global.properties, but I don't know which are proper. I tried to change the storeUrl parameter in services-context.xml file, but I couldn't find store Url parameter.
My Alfresco version is Community-5.1.0, and i use trashcan AMP version 1.2
11-03-2016 09:23 PM
No ,you configuration is ok .
I think it is a bug here and the quickest way is to download source code from https://github.com/rjmfernandes/alfresco-trashcan-cleaner.
Modify the code and add a conditional judgment in method olderThanDaysToKeep of org.alfresco.trashcan.TrashcanCleaner class ,replace the org.alfresco.trashcan.TrashcanCleaner class in your amp with your modified version and reinstall the amp.
11-03-2016 07:56 AM
Hi:
I'm not completely sure, I used the first link below some time ago in Alfresco 4.x. In github documentation says both are designed for Alfresco 4.x
GitHub - atolcd/alfresco-trashcan-cleaner
Regards.
--C.
11-03-2016 08:04 AM
Well, the AMP module is shown in Module Manager, alfresco after installing AMPs have started normally, and everything looks fine. I had some other modules earlier, that was designed to other version of Alfresco, or just didn't worked, and they weren't showed in Module Manager, and sometimes Alfresco didn't started with them installed in WAR files. I don't have that problem with this extension, so I assume, it should be proper for my version.
But I have doubts is my configuration is OK... the part
at org.alfresco.trashcan.TrashcanCleaner.olderThanDaysToKeep(TrashcanCleaner.java:102)
at org.alfresco.trashcan.TrashcanCleaner.fillBatchToDelete(TrashcanCleaner.java:84)
at org.alfresco.trashcan.TrashcanCleaner.getBatchToDelete(TrashcanCleaner.java:75)
at org.alfresco.trashcan.TrashcanCleaner.clean(TrashcanCleaner.java:48)
looks like something is messed up with my settings in alfresco-global file, because these errors looks similar, like config variables names. I think so, but of course I'm not sure
11-03-2016 08:24 AM
Cloud you please attach your amp here ?
11-03-2016 09:14 AM
Here it is. I have copied it to amps and amps_shared directory, and installed it by bin/apply_amps.sh script.
11-03-2016 10:08 AM
I'm sorry I can't download it ,can you email it to me kaynezhang@gmail.com
11-03-2016 10:41 AM
It seems some nodes in archive://SpacesStore don't have sys:archivedDate property of archived aspect.
11-03-2016 10:48 AM
Ok, so how can I repair this problem? Do I need to manually change all file properties? Or do I have to make some rule? Maybe I have configured something wrong?
11-03-2016 09:23 PM
No ,you configuration is ok .
I think it is a bug here and the quickest way is to download source code from https://github.com/rjmfernandes/alfresco-trashcan-cleaner.
Modify the code and add a conditional judgment in method olderThanDaysToKeep of org.alfresco.trashcan.TrashcanCleaner class ,replace the org.alfresco.trashcan.TrashcanCleaner class in your amp with your modified version and reinstall the amp.
12-01-2016 02:31 PM
Hi:
It seems that trashcan is part of 5.2 Community
Regards.
--C.
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.