ola
Alguém sabe me dizer pq que qdo eu declaro o @XmlElement na propriedade do meu bean assim:
@XmlRootElement(name = "Pessoa")
public class Pessoa implements Serializable
{
private static final long serialVersionUID = 1L;
@XmlElement
private int idade;
...
get e set
da o seguinte erro:
com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions
Class has two properties of the same name "idade"
this problem is related to the following location:
at public int model.Pessoa.getIdade()
at model.Pessoa
this problem is related to the following location:
at private int model.Pessoa.idade
at model.Pessoa
mas se eu declaro @XmlElement no getIdade() funciona…
tem diferença? pois todos os exemplos que vi, o @XmlElement não é declarado no get…
obg
abraco