Archive

Tomcat 5.5 getSession(true) returns null

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’

iTunes everywhere

It was great to get the iTunes share to work from my Linux server, but I got thirsty for more! I wanted to be able to listen to my music collection wherever I was. Especially at work and while writing my thesis in the library. This meant that I had to share my music library as an iTunes share over the Internet – fascinating thought. I found some instructions on how to achieve this, but again they weren’t really crystal clear. So this is how I did it.

Continue reading ‘iTunes everywhere’

Idiotic sleep timer in Mac OS X

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’

Sharing music from Linux to iTunes

Yesterday while writing my thesis in the library, I was listening to some other person’s music she had shared through iTunes. It’s a nice feature they’ve got there, so it got me tinking “could I make my Linux server at home share my whole music collection like an iTunes share?”.

After some quick Googling I found out that it’s actually possible and the software is already out there. Just to compile and install. However, the instructions I found was either not verbose enough or not applicable on my setup.

On-the-fly-comment: Now I suddenly found out that there’s a project called firefly that replaces the daapd that I’ve been using here. This information makes this post almost completely useless, but I’ll go on anyway, skipping the part about compiling and hacking daapd.

So this was the scenario: I’ve got all my mp3s on my Linux server, which I usually mount to my desktop machine (also Linux). I can’t bother mounting the share on my MacBook (since I’d have to import the whole library into iTunes’ database and I don’t want that), but instead it would be nice to have the library accessible as an iTunes share. This is how I got it working.

Continue reading ‘Sharing music from Linux to iTunes’

Growl crashes Mail in 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.