Finally, after much cursing, shouting, drinking and general annoyance, I have managed to deploy a sample “Hibernate”:http://www.hibernate.org/ application. I must point out here that the problems I had have nothing to do with Hibernate – the documentation is excellent, although their sample application could be packaged a little better (you know, to actually produce a WAR file). The problem I had was with “Tomcat”:http://jakarta.apache.org/tomcat/.
Up to this point I have been using “Jetty”:http://jakarta.apache.org/tomcat/, because it just WORKS. It doesn’t have fancy web-based admin consoles or more config files than you cna shake a stick at, you just put your WAR file in its webapps directory, and restart. At which point it deploys your webapp. Tomcat however doesn’t do that – oh no. Sometimes it ignores your WAR file. Othertimes it unpacks it, but if it does it won’t update this unpacked directory structure if the WAR file changes even if you restart Tomcat. So now my build process has to delete directory structures under Tomcat (I’m sorry, but I am not going to start dealing with unpacked WAR structures – that way madness lies). Oh, and guess what? When Tomcat has an error with a web.xml, it doesn’t tell you which webapp it found the file in! Isn’t that cool! “Now if Jetty was so good, why are you using Tomcat?” you may ask Well, this may be lazyness on my part but the example application had the tomcat config settings and I didn’t feel like working out the equivelent Jetty settings (why can’t these things be standardised?).
Up to then things had gone well – I got “MySQL”:http://www.mysql.com/ installed and running as a service quite quickly. After finally getting the Hibernate example working I had a quick look at getting Hibernate and JBoss working together, but hit the problem that I couldn’t find any documentation explaining how to get “JBoss”:http://www.jboss.org/ working with MySQL – that excersie can wait for another day. Anyway, expect a brief writeup on Hibernate tomorrow – I must say that from what I’ve seen already it looks excellent.