The following exception occurs in a scheduled function call:

Exception in thread "Timer-1" java.lang.NullPointerException
at utils.GlobalFunctions.updateStatistics_(GlobalFunctions.java:24668)
at utils.DispatchServlet$1.run(DispatchServlet.java:33)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)

This exception does not occur when the function is called from an action in the UI.

Submitted by Eelco Visser on 14 February 2010 at 21:18

On 20 February 2010 at 12:28 Eelco Visser commented:

I still get an exception:

exception occured: null
java.lang.NullPointerException
at utils.GlobalFunctions.updateStatistics_(GlobalFunctions.java:24748)
at utils.DispatchServlet$1.run(DispatchServlet.java:32)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)

This is in the last but one line of the following generated Java:

public static void updateStatistics_(org.hibernate.Session hibSession, Environment env, PrintWriter out)
{ 
  try
  { 
    System.out.println(new java.util.Date() + " - Updating publication statisics");
    org.researchr.www.domain.SiteStatistics objCr103 = new org.researchr.www.domain.SiteStatistics().setupForPropertyEvents(hibSession, out);
    objCr103.setupForPropertyEvents(hibSession, out).setPrevious(((org.researchr.www.domain.SiteStatistics)env.getVariable("siteStatistics")).setupForPropertyEvents(hibSession, out).getPrevious());

which is generated from:

function updateStatistics() {
  log(now() + " - Updating publication statisics");
  var latest := SiteStatistics{
    previous         := siteStatistics.previous

Note that siteStatistics is a global variable; that may not be covered in calling timed functions?


On 19 April 2011 at 09:11 Zef Hemel removed tag @zefhemel

On 11 June 2013 at 13:42 Elmer van Chastelet commented:

I cannot reproduce this in head revision


On 11 June 2013 at 13:42 Elmer van Chastelet closed this issue.

Log in to post comments