Null TimeZone through Service Context of a Scheduled Job??

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Null TimeZone through Service Context of a Scheduled Job??

princesewani
Cheers Everyone,

I recently came across a weird situation , I'm not worried about fixing it rather I'm worried about the cause.
The scenario is that there's a method in one of the core components that gets called through a scheduled job,
I got a NullPointerException at runtime, I thought what could be breaking, I started De-bugging it,
added  source for library jars and found this :

The java.util.TimeZone being retrieved from the context using :

"context.get("timeZone")"

comes out to be null, I thought oh how could that be possible, I wrote a test service

and called it via a request, that worked out fine for me.

Observation :


TimeZone from the context of a service via a request comes out fine rather for a service being

called by a scheduled job comes out to be null.

Anyone who has observed this earlier? Please update me with your findings.
As I said earlier, I'm not worried about fixing it, I'm much worried about the cause.

Kind Regards

Prince Sewani
Regards
Prince