I am using JPA + Hibernate in J2SE my code works.
I can get the EntityManager and execute queries.
My persistence unit is defined as follows:
When i try to use the same in a web app deployed inside Tomcat 7, I get the exception "Exception The user must supply a JDBC Connection".Code:<persistence-unit name="BRMSPersistenceUnit"> <provider>org.hibernate.ejb.HibernatePersistence</provider> <class>gov.frb.brms.EntityType</class> <properties> <property name="javax.persistence.jdbc.driver" value="org.apache.derby.jdbc.ClientDriver"/> <property name="javax.persistence.jdbc.url" value="jdbc:derby://localhost:1527/FRB_DB"/> <property name="javax.persistence.jdbc.password" value=""/> <property name="javax.persistence.jdbc.user" value=""/> </properties> </persistence-unit>
It appears that the persistence.xml file is found by the hibernate code in the web app because i can get the EntityManager.
Note that the webapp uses Spring and some of the parameters are into the persistence.xml and also in a file jdbc.properties.
Would anyone know a fix for that issue?


Reply With Quote