Uploaded image for project: 'XBean'
  1. XBean
  2. XBEAN-190

XBeanNamespaceHandler does not close resource input streams

Details

    • Bug
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 3.7
    • 3.12
    • spring
    • None

    Description

      I've got ActiveMQ RAR deployed onto Glassfish. Upon stopping of the connector, following warning is raised:

      WARNING: Input stream has been finalized or forced closed without being explicitly closed; stream instantiation reported in following stack trace
      java.lang.Throwable
      	at com.sun.enterprise.loader.ASURLClassLoader$SentinelInputStream.<init>(ASURLClassLoader.java:1230)
      	at com.sun.enterprise.loader.ASURLClassLoader$InternalJarURLConnection.getInputStream(ASURLClassLoader.java:1338)
      	at java.net.URL.openStream(URL.java:1010)
      	at java.lang.ClassLoader.getResourceAsStream(ClassLoader.java:1195)
      	at com.sun.enterprise.loader.ASURLClassLoader.getResourceAsStream(ASURLClassLoader.java:872)
      	at org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.loadResource(XBeanNamespaceHandler.java:835)
      	at org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.findNamespaceProperties(XBeanNamespaceHandler.java:801)
      	... (shortened) ...
      

      The cause appears to be XBeanNamespaceHandler.findNamespaceProperties - the InputStream obtained on line 801 (in 3.7 sources), is used at line 812, but surrounding try lacks finally clause.

      Attachments

        1. xbean-190.patch
          0.8 kB
          Patrik Dudits

        Activity

          People

            gnodet Guillaume Nodet
            pdudits Patrik Dudits
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: