0 Replies Latest reply on Jul 11, 2019 9:53 AM by mrhari007

    Jaxb Unmarshall Exception when migrated to jboss eap-7.2 from jboss 6.2

    mrhari007

      I am getting the following exception while try to un Marshall the in coming response from the service using Spring ORM rest template.

       

      Error description

      org.springframework.http.converter.HttpMessageNotReadableException: Could not read [class org.acord.standards.pc_surety.acord1.xml.PersPkgPolicyModRs]; nested exception is org.springframework.oxm.UnmarshallingFailureException: JAXB unmarshalling exception; nested exception is javax.xml.bind.UnmarshalException: unexpected element (uri:"", local:"ns0:PersPkgPolicyModRs"). Expected elements are <{http://www.ACORD.org/standards/PC_Surety/ACORD1/xml/}PersPkgPolicyModRq>,<{http://www.ACORD.org/standards/PC_Surety/ACORD1/xml/}PersPkgPolicyModRs>

       

       

      This was working in jboss 6.2 and jboss 7.0.2 but not working in Jboss 7.2. I could see Jboss 7.2 is using jboss-jaxb-api_2.3_spec-1.0.1.Final-redhat-1. Is it any change needed from this version

       

       

      I ma not sure why the URI is empty. In my jaxb jar i have package-info file for each module which has  proper name space

       

      Sample name space from package-info.java

      @javax.xml.bind.annotation.XmlSchema(namespace = "http://www.ACORD.org/standards/PC_Surety/ACORD1/xml/", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)