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

Unclosed XMLStreamReader/Writer causes leaking

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.6.2
    • 2.5.6, 2.6.3
    • None
    • None
    • Unknown

    Description

      I created some wrapper classes for those XMLStreamReader created in StaxUtils, and found that the one created with the stack below will not invoke the close() method, which will cause some leaking

      ava.lang.Throwable
      at org.apache.cxf.staxutils.XXMLStreamReader.<init>(XXMLStreamReader.java:29)
      at org.apache.cxf.staxutils.XXMLInputFactory.createXMLStreamReader(XXMLInputFactory.java:136)
      at org.apache.cxf.staxutils.StaxUtils.createXMLStreamReader(StaxUtils.java:1280)
      at org.apache.cxf.interceptor.StaxInInterceptor.handleMessage(StaxInInterceptor.java:111)
      at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:262)
      at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
      ......

      java.lang.Throwable
      at org.apache.cxf.staxutils.XXMLStreamReader.<init>(XXMLStreamReader.java:29)
      at org.apache.cxf.staxutils.XXMLInputFactory.createXMLStreamReader(XXMLInputFactory.java:169)
      at org.apache.cxf.staxutils.StaxUtils.createXMLStreamReader(StaxUtils.java:1363)
      at org.apache.cxf.staxutils.StaxUtils.createXMLStreamReader(StaxUtils.java:1247)
      at org.apache.cxf.wsdl11.WSDLManagerImpl.loadDefinition(WSDLManagerImpl.java:231)
      at org.apache.cxf.wsdl11.WSDLManagerImpl.getDefinition(WSDLManagerImpl.java:191)
      ......

      http://cxf.547215.n5.nabble.com/XMLStreamReader-is-never-closed-td5714822.html

      Attachments

        1. CXF-4523.patch
          11 kB
          Haihong Xu

        Issue Links

          Activity

            People

              dkulp Daniel Kulp
              xuhaihong Haihong Xu
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: