Uploaded image for project: 'Workspaces'
  1. Workspaces
  2. WORKSPACES-1969

Storage limit reached observer is listening to too many events

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 2.18.4, 2.19.0
    • 2.18.3
    • None
    • None
    • 4.10 M5

      The observer (SendMailOnFileManagerStorageSpaceLimitreachedObserver) that sends mails when the storage limit is reached is listening to too many events, such as the adding of a file in resources explorer. This causes an error in the logs since no project is found.

      Steps to reproduce : 

      • Open resources explorer
      • Add a file anywhere
      • An error pops in the logs : 
      java.lang.NullPointerException: Cannot invoke "org.ametys.plugins.workspaces.project.objects.Project.getExplorerRootNode()" because "project" is null at org.ametys.plugins.workspaces.documents.DocumentWorkspaceModule.getModuleRoot(DocumentWorkspaceModule.java:303) at org.ametys.plugins.workspaces.documents.DocumentWorkspaceModule.getModuleSize(DocumentWorkspaceModule.java:266) at org.ametys.plugins.workspaces.documents.WorkspaceExplorerResourceDAO.getUsedStorageSpaceByProject(WorkspaceExplorerResourceDAO.java:1970) at org.ametys.plugins.workspaces.documents.SendMailOnFileManagerStorageSpaceLimitreachedObserver.observe(SendMailOnFileManagerStorageSpaceLimitreachedObserver.java:107) at org.ametys.core.observation.ObservationManager$ParallelAsyncObserve._observe(ObservationManager.java:512) at org.ametys.core.observation.ObservationManager$AbstractAsyncObserve.call(ObservationManager.java:449) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) at java.base/java.lang.Thread.run(Thread.java:1583)

            kbourgoin Kepa Bourgoin
            tcorre Thalya Corré
            Kepa Bourgoin Kepa Bourgoin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: