-
Nov 23rd, 2011, 10:15 PM
#1
deployment issues: "Could not open JPA EntityManager" only on server
I have a Debian 5 server where I run 2 sites on Apache Tomcat 6.0.33 and MySQL 5.1.58. I use 2 different IPs for virtual hosting. I have developed a simple Spring Roo application with Hibernate for one of these sites and on my developer machine I have testdeployed a war file successfully on 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 built a new war file with database.properties adjusted for the server, 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 do get at the point of persistence a "Could not open JPA EntityManager for transaction" error indicating my application can't connect to my DB.
I can connect via SSH 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?
Last edited by MiB; Nov 23rd, 2011 at 10:26 PM.
-
Nov 25th, 2011, 09:08 PM
#2
It seems to have been some kind of internal firewall problem that prevented connection. However, just using 127.0.0.1 instead works even though MySQL and the spring app wasn't running on the same IP.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules