Uploaded image for project: '{RETIRED} XWiki Watch List Application'
  1. {RETIRED} XWiki Watch List Application
  2. XPWATCHLIST-70

NPE at XWikContext#getMessageTool() while preparing email context

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • 1.20
    • 1.19
    • Plugin
    • None
    • tomcat

    Description

      I don't know yet what causes it - it happen in XWiki#prepareResources, line 3745, while trying to set the locale to the context's response :

      context.getResponse().setLocale(locale);
      

      It fails with a NPE

       [DefaultQuartzScheduler_Worker-1] ERROR watchlist.WatchListPlugin       - Exception while runn
      ing job 
      java.lang.NullPointerException
              at org.apache.catalina.connector.Response.setLocale(Response.java:823)
              at org.apache.catalina.connector.ResponseFacade.setLocale(ResponseFacade.java:321)
              at com.xpn.xwiki.web.XWikiServletResponse.setLocale(XWikiServletResponse.java:149)
              at com.xpn.xwiki.XWiki.prepareResources(XWiki.java:3745)
              at com.xpn.xwiki.XWikiContext.getMessageTool(XWikiContext.java:490)
              at com.xpn.xwiki.plugin.watchlist.WatchListNotifier.sendEmailNotification(WatchListNotifier.java:105)
              at com.xpn.xwiki.plugin.watchlist.WatchListJob.executeJob(WatchListJob.java:262)
              at com.xpn.xwiki.plugin.scheduler.AbstractJob.execute(AbstractJob.java:75)
              at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
              at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:525)
      java.lang.NullPointerException
              at org.apache.catalina.connector.Response.setLocale(Response.java:823)
              at org.apache.catalina.connector.ResponseFacade.setLocale(ResponseFacade.java:321)
              at com.xpn.xwiki.web.XWikiServletResponse.setLocale(XWikiServletResponse.java:149)
              at com.xpn.xwiki.XWiki.prepareResources(XWiki.java:3745)
              at com.xpn.xwiki.XWikiContext.getMessageTool(XWikiContext.java:490)
              at com.xpn.xwiki.plugin.watchlist.WatchListNotifier.sendEmailNotification(WatchListNotifier.java:105)
              at com.xpn.xwiki.plugin.watchlist.WatchListJob.executeJob(WatchListJob.java:262)
              at com.xpn.xwiki.plugin.scheduler.AbstractJob.execute(AbstractJob.java:75)
              at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
              at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:525)
      

      The wiki is a XE-2.0-rc-2 running in tomcat.

      Attachments

        Issue Links

          Activity

            People

              jerome Jerome Velociter
              jerome Jerome Velociter
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: