Haven't actually installed it yet, but we're considering migrating from Freshbooks to eHour for time tracking. It's Java-based and comes in either a standalone server or as a Tomcat app you can host on your existing web server.
We would be losing our tight integration with Freshbooks, but Freshbooks has an API that I'm sure we can use to integrate the two. And being FOSS, we should be able to integrate Asana (which is beta testing their own API right now) with it as well.
However, our biggest problem right now with Freshbooks' time tracking is the fact that its browser-based interface is not the most convenient, which has impeded its adoption within the company. So we'll likely combine it with something like Rachota so that workers track their time using a desktop app, but then log all their work hours at the end of the day in eHour.
Other options are listed on this Wikipedia page.