• 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

hibernate.properties not being found? Harnessing Hibernate Chapter 2

 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm reading Chapter 2 of Harnessing Hibernate, and when generating my db schema, I get an error that a hibernate dialect has not been set.


Project Structure


The Build Error


relevant sections of build.xml

I have my hibernate.properties file in my src (${source.root}) directory, and it is copied over to the classes (${class.root}) directory in the dependent prepare <target> before the schema <target> is run.

It appears to me that hibernate.properties is not being found by hbm2ddl.

Should I be placing this file elsewhere?

I've also downloaded the examples and ended up with the same error, however the example does not appear to come with a hibernate.properties file, so that would be expected.
 
Bartender
Posts: 4116
72
Mac TypeScript Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't have the book. But what is the strategy used to bootstrap the Hibernate? Is not defined a hibernate.cfg.xml file? If it reads from a properties file then how?
 
Andrew Leer
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello and thank you for responding.

I did a diff with the files that came with the book (after I found them) and discovered I had mis-typed a few lines...there's probably nothing to bootstrap it, as in Chapter 2 we are just generating the Java source classes from an .hbm.xml file and also generating the ddl schema for the database.
 
I have a knack for fixing things like this ... um ... sorry ... here is a consilitory tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic