Javax.xml.bind.JAXBElement does not have a no-arg default constructor

Pessoal,

Estou passando pelo seguinte problema:

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 protected java.util.List xml.TLoteDistDFe103.nsuAndCTeDistOrCancDist
		at xml.TLoteDistDFe103
		at protected xml.TLoteDistDFe103 xml.TRetDistDFe103.loteDistCTe
		at xml.TRetDistDFe103

Configuração: Glassfish V3 + EJB 3.1

Obrigado

Qual a classe JavaBean que você está tentando recuperar? Ou em outras palavras: o XML representa qual classe Java?

Estou trabalhando direto com os objetos gerados pelo jaxb.

tenho algumas classes assim:

Tenho o seguinte:

 @XmlElements({
        @XmlElement(name = "Canc_Dist",type = JAXBElement.class),
        @XmlElement(name = "NSU", namespace="namespace", type = JAXBElement.class),
        @XmlElement(name = "Inut_Dist", namespace="namespace", type = JAXBElement.class),
        @XmlElement(name = "CTe_Dist", namespace="namespace", type = JAXBElement.class)
    })
    protected List<JAXBElement<?>> nsuAndCTeDistOrCancDist;

Na minha ObjectFacory.java tenho:

private final static QName _DistCTe_QNAME = new QName("namespace", "distCTe");

@XmlElementDecl(name = "distCTe")
    public JAXBElement<TDistDFe103> createDistCTe(TDistDFe103 value) {
        return new JAXBElement<TDistDFe103>(_DistCTe_QNAME, TDistDFe103 .class, null, value);
    }

um metodo desse pra cada @XmlElement

estou trabalhando diretamente comos objetos gerados, fazendo testes iniciais para ver se esta tudo funcionado corretamente.

alguma luz?

Obrigado!

Talvez isso ajude: http://blog.caelum.com.br/jaxb-xml-e-java-de-maos-dadas/

Você vai usar XML para trabalhar com NFe?

vou dar uma olhada…

sim é pra trabalhar com NFe

Obrigado!