Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UnknownHostException not accepted as "resource not found" anymore [SPR-15433] #19994

Closed
spring-issuemaster opened this Issue Apr 11, 2017 · 0 comments

Comments

Projects
None yet
2 participants
@spring-issuemaster
Copy link
Collaborator

spring-issuemaster commented Apr 11, 2017

Juergen Hoeller opened SPR-15433 and commented

The changes behind #19783 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

Affects: 4.3.7

Issue Links:

  • #19974 UrlResource getFilename should not contain query parameters
  • #19783 Log failures to load PropertySources when ignoreResourceNotFound = true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.