I have a web application in the following environment.
The problem in question vanished, when I insisted upon using a JNDI lookup. Accordingly, in the context.xml
file, I have defined a resource like,
The resource reference needs to be defined in the web.xml
file like,
jdbc/social_networking
javax.sql.DataSource
Container
This datasource is referenced in the the persistence.xml
file as follows.
org.hibernate.ejb.HibernatePersistence
java:comp/env/jdbc/social_networking
model.Test
false
And finally the application-context.xml
file has been modified as follows.
false