Reputation: 305
I get this error "There is no text content for the XML type associated with this class. JAXB Problem" in the automatic generated class from XSD. Do you know what's happening?
Source code
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "linkType", propOrder = {
"content"
})
public class LinkType {
@XmlValue **THIS LINE HAS THE ERROR**
protected String content;
XSD
<xs:complexType name="linkType" mixed="true">
<xs:annotation>
<xs:documentation>
The Atom link construct is defined in section 3.4 of the format spec.
</xs:documentation>
</xs:annotation>
<xs:attribute name="href" use="required" type="xs:anyURI"/>
<xs:attribute name="rel" type="xs:string" use="optional"/>
<xs:attribute name="type" use="optional" type="xs:string"/>
<xs:attribute name="hreflang" use="optional" type="xs:NMTOKEN"/>
<xs:attribute name="title" use="optional" type="xs:string"/>
<xs:attribute name="length" use="optional" type="xs:positiveInteger"/>
<xs:attributeGroup ref="atom:commonAttributes"/>
</xs:complexType>
BR.
Upvotes: 2
Views: 796
Reputation: 148977
The error message you are seeing is an Eclipse validation exception:
There is no text content for the XML type associated with this class.
You can ignore this exception as it is an editor exception and not a compiler exception:
Upvotes: 1