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 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 : {noformat} context.getResponse().setLocale(locale); {noformat} It fails with a NPE {noformat} [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) {noformat} The wiki is a XE-2.0-rc-2 running in tomcat.
    via by Jerome Velociter,
    • 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)
    No Bugmate found.