I have an app created using Hibernate 4.1.4.Final and Spring 3.1.2.RELEASE. I created it using SpringSource Tool Suite 2.9.2.RELEASE.
The issue is that the app works fine when deployed to the vFabric tc Server v2.7 included in STS, but when I deploy it to a standalone Tomcat server (v7.0.29) the app runs fine, but writes to the database (MySQL) don't happen. Reads from the database work fine. The odd bit is that none of the logs show any exceptions or any issues creating the datasource, entity manager, etc.. I am not using a JNDI datasource. This is my spring datasource definition:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<context:component-scan base-package="com.bryant.weather.dao" />
<tx:annotation-driven mode="aspectj" transaction-manager="transactionManager" />
The entity manager is injected into my code by Spring:
public void setEntityManager(EntityManager entityManager)
this.entityManager = entityManager;
I suspect that it has something to do with the MySQL setup and the granting of privileges to a user based on the host, but I have tried every combination of "grant all on dbname.*..." that I can think of.
Generally, if there are exceptions thrown somewhere I can puzzle through these kind of issues, but in this case I am stumped. I don't see any exceptions, but writes to the DB just don't work.
The thought just occurred to me that maybe it is a transaction problem somehow? Do I need to change the Tomcat config somehow to support transactions?
Any thoughts would be appreciated. I can post any additional info that is needed to help debug the issue.