Uploaded image for project: 'XWiki Commons'
  1. XWiki Commons
  2. XCOMMONS-1397

org.xwiki.job.AbstractJob cannot be used to run nested jobs

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Invalid
    • Affects Version/s: 10.3
    • Fix Version/s: None
    • Component/s: Job
    • Labels:
      None
    • Difficulty:
      Unknown
    • Documentation:
      N/A
    • Documentation in Release Notes:
      N/A
    • Similar issues:

      Description

      When executing a job B in a currently running job A and calling B.join() in A, the following exception is thrown :

       

      Exception in thread "pool-2-thread-2" java.lang.NullPointerException
              at org.xwiki.job.AbstractJob.jobFinished(AbstractJob.java:262)
              at org.xwiki.job.AbstractJob.runInContext(AbstractJob.java:211)
              at org.xwiki.job.AbstractJob.run(AbstractJob.java:189)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
              at java.lang.Thread.run(Thread.java:748)
      

      After that, B.join() never returns, therefore not allowing the job A to end properly.

       

       

        Attachments

          Activity

            People

            Assignee:
            caubin Clément Aubin
            Reporter:
            caubin Clément Aubin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Date of First Response: