Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

cannot find symbol method required() javax.xml.bind.annotation.XmlElementRef

Tags:

java

spring

jaxb

I am getting the below error when using the jdk 1.6 but it is working in 1.7

cannot find symbol method required() javax.xml.bind.annotation.XmlElementRef

any idea?

    @XmlElementRef(name = "test", type = JAXBElement.class, required = false)
    protected JAXBElement<String> test;
like image 492
Selvam Rajendran Avatar asked Feb 08 '23 01:02

Selvam Rajendran


1 Answers

Check documentation of XmlElementRef annotation in Java 1.6 here. There is no required element in it. That is why you are getting this exception.

like image 109
Mateusz Sroka Avatar answered Feb 12 '23 10:02

Mateusz Sroka