First, make sure your server can talk to the db server. I usually ssh onto the web server, then from there, do
telnet dbserver 3306 and make sure there's no connection error. (connection refused, likely due to firewall or other reason for db not being accessible) If that works, connect with the mysql client (again, from the web server) using the same user and password mysql -u XXX -pXXX -h dbserver dbname and make sure you have permission to connect. It's probably one of those two things. WILL On Wed, Nov 23, 2011 at 8:43 PM, MiB <digital.disc...@gmail.com> wrote: > I have a Debian 5 server where I run 2 sites on Apache Tomcat 6.0.33 and > have installed MySQL 5.1.58. I use 2 different IPs for virtual hosting. I > have developed a simple Spring MVC 3 application with Hibernate 3 for one > of these sites and on my OS X developer machine I have testdeployed a > packaged war file successfully on a default Tomcat 6.0.33 and MySQL 5.1.39. > Integration tests work fine as do using the site this way. > I edited hosts with my domain name pointing to my developer machine in > order to mimic my server. > > I used maven to build a new war file with database.properties adjusted for > the server environment, which I had to do with tests suppressed as I can't > connect directly over the net because of firewall settings (so integration > tests failed unsurprisingly with those). > However, while the deploy to my real server works fine and response is as > expected for non-DB requests, I get a "Could not open JPA EntityManager for > transaction" error at the point of persistence — full error stack at > http://pastebin.com/quHZisMM"] — indicating that my application can't > connect to my DB. > I can connect via SSH to my server with the same connection data (user, > password), so clearly my db is running and is connectable and I can create > and delete rows no problem. > > I'm at a loss currently on how to diagnose this further. Any ideas? > > > /MiB > > > > > > ------------------------------**------------------------------**--------- > To unsubscribe, e-mail: > users-unsubscribe@tomcat.**apache.org<users-unsubscr...@tomcat.apache.org> > For additional commands, e-mail: users-h...@tomcat.apache.org > >