Win a copy of Spring in Action (5th edition) this week in the Spring forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

Cannot find the declaration of element 'constraint-mappings'  RSS feed

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Reading documentation:
https://docs.jboss.org/hibernate/stable/validator/reference/en-US/html_single/#section-mapping-xml-constraints

I removed one long bean definition for brevity, then source looks like below. When executed, I get: `Caused by: org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element 'constraint-mappings'.` Great, so there should be something wrong with schema or xml file.

But what. I never actually understood all that weird definition of namespaces. So first 3 http URLs leads nowhere and they probably serve some higher purpose, while the last one ending in xsd does exist and does define `constraint-mappings` element. And whole document is, according to Intellij IDEA valid, which it is I believe. I if I try to corrupt it, then IntellijIDEA sees it. So I'd presume that it actually is valid. So *why on earth* spring produces given error on startup???

validation.xml file:

 
martin mucha
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
into validation.xml belongs xml complying to http://xmlns.jcp.org/xml/ns/validation/configuration/validation-configuration-2.0.xsd
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!