I've got a J2EE application (Tomcat) which uses Postgresql as the database. This app works fine in development but is failing when I try it on my staging environment.
I suspect I've got some kind of database communication problem but I'm not getting any errors that indicate exactly what it might be. Does anybody have an easy way to show that my app is successfully connecting to the database and running queries?
My evidence for a database problem is from examining the code. I'm getting a null pointer exception and the most likely path to get a null back is if the code somehow didn't manage to insert the object into the database.
For interest's sake, my staging environment is Ubuntu running on EC2 and this app is using Spring JDBC for most database access. Oh, and yes I do have the postgresql JDBC jar in the tomcat lib directory (although there seems some disagreement in documentation as to whether it should be in lib or common/lib). I've also been a bad boy and have been making changes to the expanded WAR file to try different things out.
I've turned the Tomcat Security Manager off and I'm connecting as the postgres superuser (yes, I know both of these things are bad long term but it'd be nice if it started running before I added restrictions).
Many thanks for any help.