Thursday, February 5, 2009

Java / JSF – Calendar control not working

I have developed a system on J2EE behalf for my last work place. Currently is maintained by the developer replaced for me. She called me last week and informed a nice problem. That all calendar controlls have stopped working. When click on calendar, No error messages, no popup and no other changes. The only thing which happens is it puts a “#” mark at the end of the address bar.
Environment:
1. CentOS 5
2. Tomcat
3. JSF
4. Netbeans 5.5

Eg:
http://localhost:8084/index.jsp

When click the calendar it change as
http://localhost:8084/index.jsp/#

I did some inquiries from her, because it could not be the problem of java script. Further ther is no way it could effect to all calendar controls at the same time, so what can be the problem?
Restarted all the services… Read the /var/logs…, checked the JDK and JRE, couldn’t find any alerts on above , my main problem still remained.
I did some guesses. I think it was a nice guess. Thought this could be a problem unique to this month (feb). I asked to change the system date to January. WOW. It iworked... then changed the date to current date (5th February 2009). then it stopped working again. Then I asked to change the date to 5th February 2008. Nice.. IT IS WORKING….. it means the problem is with the system date, when the calander comes to February 2009 the control stops working. (Problem is not month of February – it is February 2009) is there a relationship with leaning year? 2008 is a leaning year controll works fine. 2009 is a normal year controll stops working.!!
This is only a guess. Still I don’t know whats the reason or logic behind this. And also I didn’t test whether it can repeat for other years or not. I Just wanted to address this issue.

Special Thanks to shaamil who edit this article ;)

1 comment:

Anonymous said...

i Think this is the issue with NB. nt Java