• 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:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Attribute "value" must be declared for element type "property"???

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't understand where this exception comes from!

This is my hibernate.cfg.xml



and then I get this from my webapp when I try to persist:



But I don't see a "value" attribute anywhere to complain about!

Help me please!
 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please validate your XML. You can validate it online at : http://tools.decisionsoft.com/schemaValidate/
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The XML looks valid. The DTD doesn't specify a value attribute for the property element (hence the error), however no property element in Angus's xml file has a value attribute. Which leads me to think that perhaps there is another invalid hibernate.cfg.xml file kicking around in your deployment maybe?

(In addition to the online tool you suggest you can just use IE to validate XML against schemas).
 
Angus McIntosh
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I feel silly

I was editing the hibernate.cfg.xml in my sources directory and not the one in my classes directory.

Sorry for wasting your time!
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic