tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From MiB <>
Subject Spring MVC 3 application gives "Could not open JPA EntityManager" only on server
Date Thu, 24 Nov 2011 04:43:38 GMT
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 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"] —  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?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message