java.lang.NullPointerException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • I created branch 'branch-mgr18' in reg and RepositoryPollerTask.performBranchCallback generated the following exception: 2013-01-28 16:47:41,262 [pool-27-thread-1:] ERROR org.kuali.kits.kms.repository.batch.BatchUtils.storeBatchException() :: org.kuali.kits.kms.repository.BatchException [BRANCH_ERROR] /source/branches/branch-mgr18 : Problems setting up new branch java.lang.NullPointerException at org.kuali.kits.kms.notification.KmsEmailService.sendMail(KmsEmailService.java:164) at org.kuali.kits.kms.notification.KmsEmailService.mailError(KmsEmailService.java:150) at org.kuali.kits.kms.repository.RepositoryPollerTask.performBranchCallback(RepositoryPollerTask.java:1867) at org.kuali.kits.kms.repository.RepositoryPollerTask.processLogEntry(RepositoryPollerTask.java:978) at org.kuali.kits.kms.repository.RepositoryPollerTask.performRun(RepositoryPollerTask.java:1422) at org.kuali.kits.kms.repository.RepositoryPollerTask.run(RepositoryPollerTask.java:1510) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439) at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204) 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:662)
    via by Mike Riley,
  • I created branch 'branch-mgr18' in reg and RepositoryPollerTask.performBranchCallback generated the following exception: 2013-01-28 16:47:41,262 [pool-27-thread-1:] ERROR org.kuali.kits.kms.repository.batch.BatchUtils.storeBatchException() :: org.kuali.kits.kms.repository.BatchException [BRANCH_ERROR] /source/branches/branch-mgr18 : Problems setting up new branch java.lang.NullPointerException at org.kuali.kits.kms.notification.KmsEmailService.sendMail(KmsEmailService.java:164) at org.kuali.kits.kms.notification.KmsEmailService.mailError(KmsEmailService.java:150) at org.kuali.kits.kms.repository.RepositoryPollerTask.performBranchCallback(RepositoryPollerTask.java:1867) at org.kuali.kits.kms.repository.RepositoryPollerTask.processLogEntry(RepositoryPollerTask.java:978) at org.kuali.kits.kms.repository.RepositoryPollerTask.performRun(RepositoryPollerTask.java:1422) at org.kuali.kits.kms.repository.RepositoryPollerTask.run(RepositoryPollerTask.java:1510) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439) at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204) 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:662)
    via by Mike Riley,
  • Sometimes this bug shows up and sometimes it doesn't. Seems like a timing issue. {noformat} Sometimes it shows up and sometimes it doesn't. Today I ingested the granddad, son and grandson documents (attached to this issue) and they all rendered fine. A few times before that they didn't. default.ditaval and kbstaff.ditaval are committed first in their own revision. Then I import the dita files. After everything is ingested, a save of any of those dita files is throwing this exception. 2012-07-30 15:29:49,159 [pool-5-thread-1:] INFO org.kuali.kits.kms.repository.RepositoryPollerTask.performRun() :: latest revision: 10; last processed revision: 9; (file:///home/kms/kms/svn/kits/kms/str/dev) 2012-07-30 15:29:49,175 [pool-5-thread-1:] INFO org.kuali.kits.kms.repository.RepositoryPollerTask.processLogEntry() :: new revision: 10; author: joe-no-password-required; date: Mon Jul 30 15:29:44 EDT 2012; message: (grandson.dita) Adding gr/ and so/ (grandson.dita) Adding gr/ and so/ :Ignore: true 2012-07-30 15:29:49,212 [pool-5-thread-1:] DEBUG org.kuali.kits.kms.repository.RepositoryPollerTask.processLogEntry() :: Checking for another revision: trunk/gr/grandson.dita 2012-07-30 15:29:49,249 [pool-5-thread-1:] INFO org.kuali.kits.kms.repository.RepositoryPollerTask.processLogEntry() :: Changed Path: M /kits/kms/str/dev/trunk/gr/grandson.dita 2012-07-30 15:29:49,251 [pool-5-thread-1:] DEBUG org.kuali.kits.kms.repository.RepositoryPollerTask.addOrModifyDocumentFromCrud() :: processing CRUD document: trunk/gr/grandson.dita 2012-07-30 15:29:49,266 [pool-5-thread-1:] DEBUG org.kuali.kits.kms.document.KmsDocumentService.findBranch() :: Checking branch: trunk 2012-07-30 15:29:49,277 [pool-5-thread-1:] DEBUG org.kuali.kits.kms.document.KmsDocumentService.findBranch() :: Found matching branch: kmsBranch(branchId,branchName,branchDescription,fromPath,toPath)=(1,trunk,trunk,null,null) 2012-07-30 15:29:49,277 [pool-5-thread-1:] DEBUG org.kuali.kits.kms.repository.RepositoryPollerTask.findFileTypeCode() :: Checking fileTypeCode: dita 2012-07-30 15:29:49,317 [pool-5-thread-1:] INFO org.kuali.kits.kms.repository.RepositoryUtilities.initializeRepositoryPrerequisites() :: SVNKit objects initialized 2012-07-30 15:29:49,332 [pool-5-thread-1:] INFO org.kuali.kits.kms.repository.RepositoryUtilities.getExistingContent() :: Retrieving /trunk/gr/grandson.dita from repository. 2012-07-30 15:29:49,347 [pool-5-thread-1:] DEBUG org.kuali.kits.kms.utilities.IoUtils.writeToFile() :: Writing source file (/mnt/kms/dev/svn/trunk/gr/grandson.dita) to disk. 2012-07-30 15:29:49,504 [pool-5-thread-1:] INFO org.kuali.kits.kms.audience.AudienceService.getUsedAudiencesRecursive() :: retrieving audiences used on doc_id=7 2012-07-30 15:29:49,512 [pool-5-thread-1:] INFO org.kuali.kits.kms.renderer.KmsRendererService.renderDocumentForAllAudiences() :: Document is using [default, kbstaff] 2012-07-30 15:29:49,513 [pool-5-thread-1:] ERROR org.kuali.kits.kms.audience.AudienceService.expandAudience() :: Failed to find order for: default: null: [fake null #null] @[] - [] [] [] [] 2012-07-30 15:29:49,513 [pool-5-thread-1:] INFO org.kuali.kits.kms.renderer.KmsRendererService.renderDocumentForAllAudiences() :: Rendering for: {default=[null], kbstaff=[kbstaff]} / [null, 1] 2012-07-30 15:29:49,513 [pool-5-thread-1:] INFO org.kuali.kits.kms.renderer.KmsRendererService.renderDocumentForAllAudiences() :: Rerendering /trunk/gr/grandson.dita for null 2012-07-30 15:29:49,519 [pool-5-thread-1:] ERROR org.kuali.kits.kms.repository.RepositoryUtilities.logAndDump() :: org.kuali.kits.kms.repository.BatchException [UNRENDERABLE] {branch:1; document:7} trunk/gr/grandson.dita : Other rendering exception 2012-07-30 15:29:49,521 [pool-5-thread-1:] ERROR org.kuali.kits.kms.repository.RepositoryUtilities.logAndDump() :: java.lang.NullPointerException at org.kuali.kits.kms.bo.KmsDocument.getDocument(KmsDocument.java:505) at org.kuali.kits.kms.renderer.KmsRendererService.renderDocumentForAllAudiences(KmsRendererService.java:248) at org.kuali.kits.kms.renderer.KmsRendererService.doRender(KmsRendererService.java:770) at org.kuali.kits.kms.repository.RepositoryPollerTask.finishUpModify(RepositoryPollerTask.java:472) at org.kuali.kits.kms.repository.RepositoryPollerTask.processLogEntry(RepositoryPollerTask.java:888) at org.kuali.kits.kms.repository.RepositoryPollerTask.performRun(RepositoryPollerTask.java:1124) at org.kuali.kits.kms.repository.RepositoryPollerTask.run(RepositoryPollerTask.java:1189) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:351) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:178) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:165) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:267) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:636) {noformat} Notes from Steven, The batch processor and the audience service run in two totally separate threads. The batch processor sends a message to the Audience Service to perform an update, then moves along. The Audience Service keeps serving old content until it has fully processed the new ditaval files. This means even when everything is running normally, if the batch processor hits a DITA file before the audience service has finished processing the ditaval files we will still see this exception. Hmm... I keep track of the Subversion revision for ditaval files. In the batch processor I can notice when I pass one off to the audience service and wait until it has been processed before I return. It'll slow down the batch processing of ditaval files a little, but it will result in better results.
    via by Weldon Sams,
  • Sometimes this bug shows up and sometimes it doesn't. Seems like a timing issue. {noformat} Sometimes it shows up and sometimes it doesn't. Today I ingested the granddad, son and grandson documents (attached to this issue) and they all rendered fine. A few times before that they didn't. default.ditaval and kbstaff.ditaval are committed first in their own revision. Then I import the dita files. After everything is ingested, a save of any of those dita files is throwing this exception. 2012-07-30 15:29:49,159 [pool-5-thread-1:] INFO org.kuali.kits.kms.repository.RepositoryPollerTask.performRun() :: latest revision: 10; last processed revision: 9; (file:///home/kms/kms/svn/kits/kms/str/dev) 2012-07-30 15:29:49,175 [pool-5-thread-1:] INFO org.kuali.kits.kms.repository.RepositoryPollerTask.processLogEntry() :: new revision: 10; author: joe-no-password-required; date: Mon Jul 30 15:29:44 EDT 2012; message: (grandson.dita) Adding gr/ and so/ (grandson.dita) Adding gr/ and so/ :Ignore: true 2012-07-30 15:29:49,212 [pool-5-thread-1:] DEBUG org.kuali.kits.kms.repository.RepositoryPollerTask.processLogEntry() :: Checking for another revision: trunk/gr/grandson.dita 2012-07-30 15:29:49,249 [pool-5-thread-1:] INFO org.kuali.kits.kms.repository.RepositoryPollerTask.processLogEntry() :: Changed Path: M /kits/kms/str/dev/trunk/gr/grandson.dita 2012-07-30 15:29:49,251 [pool-5-thread-1:] DEBUG org.kuali.kits.kms.repository.RepositoryPollerTask.addOrModifyDocumentFromCrud() :: processing CRUD document: trunk/gr/grandson.dita 2012-07-30 15:29:49,266 [pool-5-thread-1:] DEBUG org.kuali.kits.kms.document.KmsDocumentService.findBranch() :: Checking branch: trunk 2012-07-30 15:29:49,277 [pool-5-thread-1:] DEBUG org.kuali.kits.kms.document.KmsDocumentService.findBranch() :: Found matching branch: kmsBranch(branchId,branchName,branchDescription,fromPath,toPath)=(1,trunk,trunk,null,null) 2012-07-30 15:29:49,277 [pool-5-thread-1:] DEBUG org.kuali.kits.kms.repository.RepositoryPollerTask.findFileTypeCode() :: Checking fileTypeCode: dita 2012-07-30 15:29:49,317 [pool-5-thread-1:] INFO org.kuali.kits.kms.repository.RepositoryUtilities.initializeRepositoryPrerequisites() :: SVNKit objects initialized 2012-07-30 15:29:49,332 [pool-5-thread-1:] INFO org.kuali.kits.kms.repository.RepositoryUtilities.getExistingContent() :: Retrieving /trunk/gr/grandson.dita from repository. 2012-07-30 15:29:49,347 [pool-5-thread-1:] DEBUG org.kuali.kits.kms.utilities.IoUtils.writeToFile() :: Writing source file (/mnt/kms/dev/svn/trunk/gr/grandson.dita) to disk. 2012-07-30 15:29:49,504 [pool-5-thread-1:] INFO org.kuali.kits.kms.audience.AudienceService.getUsedAudiencesRecursive() :: retrieving audiences used on doc_id=7 2012-07-30 15:29:49,512 [pool-5-thread-1:] INFO org.kuali.kits.kms.renderer.KmsRendererService.renderDocumentForAllAudiences() :: Document is using [default, kbstaff] 2012-07-30 15:29:49,513 [pool-5-thread-1:] ERROR org.kuali.kits.kms.audience.AudienceService.expandAudience() :: Failed to find order for: default: null: [fake null #null] @[] - [] [] [] [] 2012-07-30 15:29:49,513 [pool-5-thread-1:] INFO org.kuali.kits.kms.renderer.KmsRendererService.renderDocumentForAllAudiences() :: Rendering for: {default=[null], kbstaff=[kbstaff]} / [null, 1] 2012-07-30 15:29:49,513 [pool-5-thread-1:] INFO org.kuali.kits.kms.renderer.KmsRendererService.renderDocumentForAllAudiences() :: Rerendering /trunk/gr/grandson.dita for null 2012-07-30 15:29:49,519 [pool-5-thread-1:] ERROR org.kuali.kits.kms.repository.RepositoryUtilities.logAndDump() :: org.kuali.kits.kms.repository.BatchException [UNRENDERABLE] {branch:1; document:7} trunk/gr/grandson.dita : Other rendering exception 2012-07-30 15:29:49,521 [pool-5-thread-1:] ERROR org.kuali.kits.kms.repository.RepositoryUtilities.logAndDump() :: java.lang.NullPointerException at org.kuali.kits.kms.bo.KmsDocument.getDocument(KmsDocument.java:505) at org.kuali.kits.kms.renderer.KmsRendererService.renderDocumentForAllAudiences(KmsRendererService.java:248) at org.kuali.kits.kms.renderer.KmsRendererService.doRender(KmsRendererService.java:770) at org.kuali.kits.kms.repository.RepositoryPollerTask.finishUpModify(RepositoryPollerTask.java:472) at org.kuali.kits.kms.repository.RepositoryPollerTask.processLogEntry(RepositoryPollerTask.java:888) at org.kuali.kits.kms.repository.RepositoryPollerTask.performRun(RepositoryPollerTask.java:1124) at org.kuali.kits.kms.repository.RepositoryPollerTask.run(RepositoryPollerTask.java:1189) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:351) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:178) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:165) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:267) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:636) {noformat} Notes from Steven, The batch processor and the audience service run in two totally separate threads. The batch processor sends a message to the Audience Service to perform an update, then moves along. The Audience Service keeps serving old content until it has fully processed the new ditaval files. This means even when everything is running normally, if the batch processor hits a DITA file before the audience service has finished processing the ditaval files we will still see this exception. Hmm... I keep track of the Subversion revision for ditaval files. In the batch processor I can notice when I pass one off to the audience service and wait until it has been processed before I return. It'll slow down the batch processing of ditaval files a little, but it will result in better results.
    via by Weldon Sams,
    • java.lang.NullPointerException at org.kuali.kits.kms.notification.KmsEmailService.sendMail(KmsEmailService.java:164) at org.kuali.kits.kms.notification.KmsEmailService.mailError(KmsEmailService.java:150) at org.kuali.kits.kms.repository.RepositoryPollerTask.performBranchCallback(RepositoryPollerTask.java:1867) at org.kuali.kits.kms.repository.RepositoryPollerTask.processLogEntry(RepositoryPollerTask.java:978) at org.kuali.kits.kms.repository.RepositoryPollerTask.performRun(RepositoryPollerTask.java:1422) at org.kuali.kits.kms.repository.RepositoryPollerTask.run(RepositoryPollerTask.java:1510) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439) at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204) 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:662)
    No Bugmate found.