• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Programatic Schema Export with Hibernate and EJB3

 
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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...


Any help would be very much appreciated..

Thanks,
Raja.
 
Every plan is a little cooler if you have a blimp. And a tiny ad.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic