users@jaxb.java.net

IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions JAXBElement does not have a no-arg default constructor

From: VanIngen, Erik (FIPS) <"VanIngen,>
Date: Mon, 13 Dec 2010 21:58:30 +0100

Hello Jaxb,


Using my xjc generated class GenericData results in this exception, shown below with class. How could I change the binding file in order to get rid of this exception?

com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions
javax.xml.bind.JAXBElement does not have a no-arg default constructor.
        this problem is related to the following location:
                at javax.xml.bind.JAXBElement
                at org.opensdmx.domain.v2_1.message.GenericData

This is the class:

public class GenericData extends JAXBElement<GenericDataType> {

    protected final static QName NAME = new QName("http://www.sdmx.org/resources/sdmxml/schemas/v2_1/message",
            "GenericData");

    public GenericData(GenericDataType value) {
        super(NAME, ((Class) GenericDataType.class), null, value);
    }

    public GenericData() {
        super(NAME, ((Class) GenericDataType.class), null, null);
    }

}

Kind Regards,
Erik