I am getting the web service error as “Unknown JAXB exception; nested exception is javax.xml.bind.JAXBException”

I am getting the error as shown below.

org.springframework.oxm.UncategorizedMappingException: Unknown JAXB exception; nested exception is javax.xml.bind.JAXBException

  • with linked exception:
    [com.ibm.jtc.jax.xml.bind.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions
    Two classes have the same XML type name “bag”. Use @XmlType.name and @XmlType.namespace to assign different names to them.
    this problem is related to the following location

Go to Source
Author: Khelge