JAXB : IllegalAnnotationExceptions - Class has two properties of the same name
Language/JAVA 2013. 7. 18. 17:30just developing a test jaxb application and wanted to let getters and setters be created automatically with Lombok.
As I was attempting to assign annotations of private field members, got this exception:
Exception in thread "main" com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions
Class has two properties of the same name "name"
this problem is related to the following location:
at public java.lang.String de.domain.jaxbtest.model.Book.getName()
at de.domain.jaxbtest.model.Book
at private java.util.List de.domain.jaxbtest.model.Bookstore.bookList
at de.domain.jaxbtest.model.Bookstore
@Data@XmlRootElement(name = "book")@XmlAccessorType(XmlAccessType.FIELD)public class Book {@XmlElement(name = "title")private String name;private String author;private String publisher;private String isbn;}
출처 - http://hoomb.blogspot.kr/2012/12/jaxb-illegalannotationexceptions-class.html
'Language > JAVA' 카테고리의 다른 글
자바(java)에서 사용하는 정규표현식(Regular expression)(02) (0) | 2013.08.01 |
---|---|
자바(java)에서 사용하는 정규표현식(Regular expression)(01) (0) | 2013.08.01 |
Using JAX-RS With JAXB (0) | 2013.07.10 |
Code Examples of POIFSFileSystem (0) | 2012.12.26 |
toJSONString() (0) | 2010.10.19 |