Uploaded image for project: 'Spring Framework'
  1. Spring Framework
  2. SPR-15433

UnknownHostException not accepted as "resource not found" anymore

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: 4.3.7
    • Fix Version/s: 4.3.8, 5.0 RC1
    • Component/s: Core
    • Labels:
    • Last commented by a User:
      true

      Description

      The changes behind SPR-15218 led to a narrowing of a catch scope in PropertiesLoaderSupport. This needs to be revisited since just treating FileNotFoundException here is unfortunately not sufficient. In particular, UnknownHostException bubbles through now:

      Caused by: java.net.UnknownHostException: ${SOME_PROPERTIES}
      at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:184)
      at java.net.Socket.connect(Socket.java:589)
      at java.net.Socket.connect(Socket.java:538)
      at sun.net.ftp.impl.FtpClient.doConnect(FtpClient.java:957)
      at sun.net.ftp.impl.FtpClient.tryConnect(FtpClient.java:917)
      at sun.net.ftp.impl.FtpClient.connect(FtpClient.java:1012)
      at sun.net.ftp.impl.FtpClient.connect(FtpClient.java:998)
      at sun.net.www.protocol.ftp.FtpURLConnection.connect(FtpURLConnection.java:294)
      at sun.net.www.protocol.ftp.FtpURLConnection.getInputStream(FtpURLConnection.java:393)
      at org.springframework.core.io.UrlResource.getInputStream(UrlResource.java:169)
      at org.springframework.core.io.support.EncodedResource.getInputStream(EncodedResource.java:154)
      at org.springframework.core.io.support.PropertiesLoaderUtils.fillProperties(PropertiesLoaderUtils.java:98)
      at org.springframework.core.io.support.PropertiesLoaderSupport.loadProperties(PropertiesLoaderSupport.java:176)
      at org.springframework.core.io.support.PropertiesLoaderSupport.mergeProperties(PropertiesLoaderSupport.java:157)
      at org.springframework.beans.factory.config.PropertyResourceConfigurer.postProcessBeanFactory(PropertyResourceConfigurer.java:80)
      ... 28 more
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              juergen.hoeller Juergen Hoeller
              Reporter:
              juergen.hoeller Juergen Hoeller
              Last updater:
              Spring Issues Spring Issues
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                3 years, 23 weeks, 6 days ago