users@jaxb.java.net

generated schema fails validation (jaxb 2.1)

From: jeff <jeffrey.blattman_at_yahoo.com>
Date: Fri, 9 Mar 2007 16:45:03 -0800 (PST)

from a set of annotated classes, i generated a schema using the generate-schema ant task.

i then try to unmarshall an XML document, validating on that same generated schema. i get the exception listed below. if i don't set the schema into the unmarshaller, it works fine.

looking at the schema, i do not understand the exception. the element local-portlet-entity is of type localPortletEntity, which is not abstract.

any ideas? i attached the XML file i am trying to validate, and the generated schema. note that if i comment out the local-portlet-entity block, it works fine.

Caused by: org.xml.sax.SAXParseException: cvc-type.2: The type definition cannot be abstract for element local-portlet-entity.
        at com.sun.org.apache.xerces.internal.jaxp.validation.Util.toSAXParseException(Util.java:109)
        at com.sun.org.apache.xerces.internal.jaxp.validation.ErrorHandlerAdaptor.error(ErrorHandlerAdaptor.java:104)
        at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:382)
        at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:316)
        at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(XMLSchemaValidator.java:429)
        at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.reportSchemaError(XMLSchemaValidator.java:3185)
        at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:2029)
        at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:705)
        at com.sun.org.apache.xerces.internal.jaxp.validation.ValidatorHandlerImpl.startElement(ValidatorHandlerImpl.java:335)

 
---------------------------------
Expecting? Get great news right away with email Auto-Check.
Try the Yahoo! Mail Beta.