Tuesday, 17 March 2009

Put persistence.xml in the war

I've been trying for days to get jpa, jndi, glassfish, hibernate and oracle to play together.

The main problem turns out that you have to put the persistence.xml file in your war file (project/web-root/WEB-INF/src/META-INF) not in your jar file.
I'll probably investigate more to see if it is somehow possible to put it in the jar, but for now my problems are solved.

... after some further experimentation I was able to put it in the jar, but I'm using <mapping-file>xx_orm.xml</mapping-file> now.

No comments:

Post a comment