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

NullPointerException in XMLStreamDataWriter.writeNode

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 4.0.3, 4.0.4
    • 4.1.0, 4.0.5
    • None
    • None
    • Unknown

    Description

      We're encountering sporadic weird NullPointerException in various of our tests using different client configurations with wsdls. It seems to only occur right after initialising the client, e.g. only on the first call. I suspect it's some kind of race-condition, but I've not been able to create a reproducer. I was hoping maybe someone from the project would have insight into why this could be happening by looking at the stacktraces.

      The error we're hitting appears to be here:

      java.lang.NullPointerException: Cannot invoke "org.w3c.dom.Node.getOwnerDocument()" because "nd" is null
      	at org.apache.cxf.databinding.source.XMLStreamDataWriter.writeNode(XMLStreamDataWriter.java:160) ~[cxf-core-4.0.4.jar:4.0.4]
      	at org.apache.cxf.databinding.source.XMLStreamDataWriter.write(XMLStreamDataWriter.java:101) ~[cxf-core-4.0.4.jar:4.0.4]
      	at org.apache.cxf.databinding.source.XMLStreamDataWriter.write(XMLStreamDataWriter.java:67) ~[cxf-core-4.0.4.jar:4.0.4]
      	at org.apache.cxf.databinding.source.XMLStreamDataWriter.write(XMLStreamDataWriter.java:55) ~[cxf-core-4.0.4.jar:4.0.4]
      

      Update: we're using cxf-rt-transports-http-hc5.
      We've had this issue on 4.0.3 and 4.0.4. We might've had it on previous versions as well, but I don't have build history going back that far.

      JDK versions: Corretto 17 (17.0.8-amzn), Zulu 17 (17.0.10-zulu) ++

      Attachments

        1. interceptor-npe.txt
          2 kB
          Magnus Holm
        2. invoke-sync-npe.txt
          3 kB
          Magnus Holm
        3. invoke-async-npe.txt
          2 kB
          Magnus Holm
        4. dispatch-impl-npe.txt
          3 kB
          Magnus Holm

        Issue Links

          Activity

            People

              reta Andriy Redko
              maghol Magnus Holm
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: