Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Angus McIntosh
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • 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!
 
Kadle Rajesh
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please validate your XML. You can validate it online at : http://tools.decisionsoft.com/schemaValidate/
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • 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
  • 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!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic