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

Aegis ObjectType throws NullPointerException when reading value for an xs:any without xsi:type information

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.2.3
    • 2.2.4
    • Aegis Databinding
    • None

    Description

      Aegis databinding throws a NullPointerException instead of reporting that it can not read the XML it receives.
      I believe the correct, intended, behavior is that it would throw a DatabindingException stating the typeQName it could not unmarshall, or maybe it should even store the content of the element it could not parse to a Java bean in an XML document.

      Caused by: java.lang.NullPointerException
      at org.apache.cxf.aegis.type.basic.ObjectType.readObject(ObjectType.java:104)
      at org.apache.cxf.aegis.type.basic.BeanType.readObject(BeanType.java:161)
      at org.apache.cxf.aegis.type.basic.ArrayType.readCollection(ArrayType.java:86)
      at org.apache.cxf.aegis.type.basic.ArrayType.readObject(ArrayType.java:62)
      at org.apache.cxf.aegis.type.basic.BeanType.readObject(BeanType.java:161)
      at org.apache.cxf.aegis.type.basic.BeanType.readObject(BeanType.java:161)
      at org.apache.cxf.aegis.type.basic.ArrayType.readCollection(ArrayType.java:86)
      at org.apache.cxf.aegis.type.basic.ArrayType.readObject(ArrayType.java:62)
      at org.apache.cxf.aegis.type.basic.BeanType.readObject(BeanType.java:161)
      at org.apache.cxf.aegis.AegisXMLStreamDataReader.read(AegisXMLStreamDataReader.java:82)
      at org.apache.cxf.aegis.databinding.XMLStreamDataReader.read(XMLStreamDataReader.java:61)
      ... 57 more

      Attachments

        1. cxf-aegis-ObjectType.patch
          0.6 kB
          Fried Hoeben

        Activity

          People

            bmargulies Benson Margulies
            fhoeben Fried Hoeben
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: