I have an instance of EC2 on which I've deployed a web application. The EC2 instance is Linux with Tomcat. The web app works just fine locally on my box, and it connects to an AWS RDS instance of MySQL.
When I deploy this web app to the EC2 instance, any page that requires a call to the DB doesn't load. I'm using Hibernate and at the point where I try to get a Hibernate session created, I get a NullPointerException. This is the same error I get on my local box if I delete the persistence.xml config file.
Inside my persistence.xml, I simply have a persistence-unit defined, as you would expect. Nothing fancy (and again, it works fine locally).
Why is persistence.xml config file not being found/discovered and loaded when the app runs on the EC2 instance?
Currently the config file is located here in the project:
/web/res/META-INF/persistence.xml
Any input is appreciated. Thanks!