This week I’ve been fiddling around with my thesis application, trying to get it up and running again after a hibernation period of almost a year. A lot of things had changed since I last used it, both on the department server and in our database, so I was in for some serious glueing, duct taping and debugging. Most of the problems were quite straight forward to fix, such as the database being out of date, some protocols having changed and so on. But there was one thing I just couldn’t understand.
When my web application tried to create an HttpSession object by calling getSession(true) on the HttpServletRequest instance, it returned null! According to the servlet 2.4 specification, the method must return a new session if it doesn’t exist, so this was just insane behaviour. By reflex, I started Googling for some answers, and it actually took me a while to find the solution.
Continue reading ‘Tomcat 5.5 getSession(true) returns null’
Goddamn Apple! You have to do better than this! A week’s worth of work down the drain just because you can’t handle sleep mode properly.
I was just playing some music with iTunes on my MacBook, leaving it on the table using battery power. Suddenly it goes quiet and I thought “ok, battery’s drained, it’s hibernating”. Imagine my surprise when I plugged in the power chord and pressed the power button. It didn’t recover from the hibernation – it booted! Everything I was working on was gone.
Continue reading ‘Idiotic sleep timer in Mac OS X’
As if I didn’t have a crappy morning already, my Mac OS X Mail had to start bugging during my morning routines by the computer. After countless crash-reports and relaunches I even rebooted, but without success.
I found some hints on Google, including one on disabling Growl Mail. This seemed to be the most realistic solution, but didn’t work. I also tried many other suggested workarounds like deleting ToDos in iCal, clearing some caches, hitting some keys when Mail starts and so on. Nothing helped. After even more relaunching and sending bug reports to Apple, and another five minutes of Googling, I discovered a thread that had solved the problem by deleting the GrowlMail.mailbundle directory from HD/Library/Mail/Bundles.
Luckily, that worked for me as well. So now I can finally start my day and look forward to whatever else Murphy has got in store for me.
I can’t understand why Apple has not included week numbers in iCal. Not even as an option. Well, luckily I found a php script that generates a calendar that you can import into iCal and that way get week numbers as “whole day” events. Ugly? A bit, but it might be worth it.
Continue reading ‘Week numbers in iCal’
When working inside screen over ssh in the Mac OS X Terminal application, it for some reason always hangs after the computer has slept. There’s seems to be no way to resurrect it, other than closing the Terminal and opening a new one, letting the old ssh connection die in loneliness.
However, this problem is avoided by either not using screen (magically, a “normal” ssh connection doesn’t hang the Terminal), or by using autossh to automatically restart a lost connection. I decided to try out the latter option.
Continue reading ‘autossh + screen = fully automatic relogin’