Exception in thread "main" java.lang.InternalError Exception in thread "main" java.lang.IllegalArgumentException: Expected class ja vax.xml.bind.annotation.XmlAccessType but found class javax.xml.bind.annotation. AccessType
I am getting this error when i am trying to marshal a JAXB object to XML. Can anyone please provide any hints.
This error often occurs when the JAXB annotation class is from a different ClassLoader
than the ClassLoader
the JAXB implement is using. If you are inside an OSGi enviroment make sure that you import the javax.xml.bind.annotation
package in your MANIFEST.MF
file.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.