Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » strange problem with error cvc-elt.1 and name space(moxy dosn't read and validation fails - in eclipse all is fine)
strange problem with error cvc-elt.1 and name space [message #1018847] Thu, 14 March 2013 15:07
moritz du is currently offline moritz duFriend
Messages: 102
Registered: February 2010
Senior Member
I have a given xsd file and given examples for this file. the xsd is very similar to but with one additional element below the root.

The problem is if i validate the given xml against the schema (using moxy as JAXBCOntextFactory) i got this error:

    enterCaused by: org.xml.sax.SAXParseException; lineNumber: 2; columnNumber: 221; cvc-elt.1: Cannot find the declaration of element 'invoice:request'.

invoice:request is the root element the xml begins:

    <invoice:request role="production" xmlns:invoice="" xmlns:xsi="" xsi:schemaLocation=" QO_MDInvoiceRequest_400.xsd">

xsd begins with:
<schema targetNamespace="" xmlns:invoice="" xmlns="" elementFormDefault="qualified" attributeFormDefault="unqualified">

If i validate the xml against the schema online or in eclipse (right click validate) all works fine. And if i change the name space from




the error disappears - but i get another one because of the additional element.
With this name space declaration i can't even read the contents without validation: the getter for root returns null. With the alternative declaration ("") and without validation all works fine!

So whats wrong with the name space declaration?

[Updated on: Thu, 14 March 2013 15:14]

Report message to a moderator

Previous Topic:How to obtain the entity ID after persit from a trigger generated value
Next Topic:Is it possible to build EclipseLink 1.1.4 from source
Goto Forum:

Current Time: Sat May 26 10:08:47 GMT 2018

Powered by FUDForum. Page generated in 0.01807 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top