Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-2051

Exception in REST Service creates not-well-formed xml responses

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.2
    • 2.2, 2.1.5
    • JAXB Databinding
    • None

    Description

      I've got this with SOAP and REST services using JAXB Databinding. In case of errors during the databinding phase, I get not well-formed xml like this:

      <?xml version="1.0" encoding="UTF-8" standalone="yes"?><Company><addresses><address1Ntl>street</address1Ntl><cityNtl>city</cityNtl><countryISO>276</countryISO><type>Extern</type><zipCity>69250</zipCity></addresses><ns1:XMLFault xmlns:ns1="http://cxf.apache.org/bindings/xformat"><ns1:faultstring xmlns:ns1="http://cxf.apache.org/bindings/xformat">org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: de.volkswagen.ums.persistence.data.PersistentOrganization.displaynames, no session or session was closed</ns1:faultstring></ns1:XMLFault>

      So the already created beginning of the response is not replaced but appended by the fault, creating a not usable response.

      Attachments

        Activity

          People

            Unassigned Unassigned
            thecoolace Bla Bla
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: