I am developing J2SE Application with Hibernate and HSQL database and I want db schema to be created programatically.
I following EJB3 - JPA approach and using persistence.xml as show below.
To Use SchemaExport API, I need hibernate configuration, so I am trying to get hibernate cfg out of EJB 3 configuration. This is what I tried..
SEVERE: Error parsing XML: /META-INF/persistence.xml(1) Document is invalid: no grammar found.
Please help me in knowing right way of exporting schema using EJB3/hibernate. My basic requirement is tables to be created automatically only if they does not exist, Please let me know if there are better way of doing it...