java.lang.RuntimeException: javax.imageio.IIOException: Can't get input stream from URL!

Atlassian JIRA | David Chan [Atlassian] | 4 years ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    When an incorrectly defined Base URL is set, the "Auto Look and Feel" option results in browser errror. Common scenario could be SSL without the proper certs, etc. Especially after a migration/upgrade. * Browser: {code} Error 330 (net::ERR_CONTENT_DECODING_FAILED): Unknown error. {code} * The following would appear in logs {code} 2013-05-30 09:42:10,432 http-bio-127.0.0.1-18000-exec-16 ERROR [500ErrorPage.jsp] Exception caught in 500 page javax.imageio.IIOException: Can't get input stream from URL! java.lang.RuntimeException: javax.imageio.IIOException: Can't get input stream from URL! at com.atlassian.jira.lookandfeel.AutoLookAndFeelManager.getLogoInfo(AutoLookAndFeelManager.java:245) at com.atlassian.jira.lookandfeel.AutoLookAndFeelManager.generateFromLogo(AutoLookAndFeelManager.java:53) at com.atlassian.jira.lookandfeel.EditLookAndFeel.doAutoUpdateColors(EditLookAndFeel.java:368) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at webwork.util.InjectionUtils$DefaultInjectionImpl.invoke(InjectionUtils.java:70) at webwork.util.InjectionUtils.invoke(InjectionUtils.java:56) ... Caused by: javax.imageio.IIOException: Can't get input stream from URL! at javax.imageio.ImageIO.read(Unknown Source) at com.atlassian.jira.lookandfeel.AutoLookAndFeelManager.getLogoInfo(AutoLookAndFeelManager.java:240) ... 193 more Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at sun.security.ssl.Alerts.getSSLException(Unknown Source) at sun.security.ssl.SSLSocketImpl.fatal(Unknown Source) at sun.security.ssl.Handshaker.fatalSE(Unknown Source) at sun.security.ssl.Handshaker.fatalSE(Unknown Source) at sun.security.ssl.ClientHandshaker.serverCertificate(Unknown Source) at sun.security.ssl.ClientHandshaker.processMessage(Unknown Source) at sun.security.ssl.Handshaker.processLoop(Unknown Source) at sun.security.ssl.Handshaker.process_record(Unknown Source) at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source) at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source) at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source) at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source) at sun.net.www.protocol.https.HttpsClient.afterConnect(Unknown Source) at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source) at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(Unknown Source) at java.net.URL.openStream(Unknown Source) ... 195 more Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at sun.security.validator.PKIXValidator.doBuild(Unknown Source) at sun.security.validator.PKIXValidator.engineValidate(Unknown Source) at sun.security.validator.Validator.validate(Unknown Source) at sun.security.ssl.X509TrustManagerImpl.validate(Unknown Source) at sun.security.ssl.X509TrustManagerImpl.checkTrusted(Unknown Source) at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source) ... 208 more Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(Unknown Source) at java.security.cert.CertPathBuilder.build(Unknown Source) ... 214 more {code} * In this case, JIRA needed a SSL cert installed into Java This may also occur if the URL is simply badly defined, like http://wrongurl:8001 h5. Quick reproduce: * Fresh JIRA install, http://localhost:8080 * Edit Base URL to: https://localhost:8080 * Navigate to Look and Feel * Upload a logo * Click the "To apply a color scheme that matches your logo, click here." option * Browser/logs error Expectation: re-color works or some message about the base URL being ill-defined.

    Atlassian JIRA | 4 years ago | David Chan [Atlassian]
    java.lang.RuntimeException: javax.imageio.IIOException: Can't get input stream from URL!
  2. 0

    When an incorrectly defined Base URL is set, the "Auto Look and Feel" option results in browser errror. Common scenario could be SSL without the proper certs, etc. Especially after a migration/upgrade. * Browser: {code} Error 330 (net::ERR_CONTENT_DECODING_FAILED): Unknown error. {code} * The following would appear in logs {code} 2013-05-30 09:42:10,432 http-bio-127.0.0.1-18000-exec-16 ERROR [500ErrorPage.jsp] Exception caught in 500 page javax.imageio.IIOException: Can't get input stream from URL! java.lang.RuntimeException: javax.imageio.IIOException: Can't get input stream from URL! at com.atlassian.jira.lookandfeel.AutoLookAndFeelManager.getLogoInfo(AutoLookAndFeelManager.java:245) at com.atlassian.jira.lookandfeel.AutoLookAndFeelManager.generateFromLogo(AutoLookAndFeelManager.java:53) at com.atlassian.jira.lookandfeel.EditLookAndFeel.doAutoUpdateColors(EditLookAndFeel.java:368) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at webwork.util.InjectionUtils$DefaultInjectionImpl.invoke(InjectionUtils.java:70) at webwork.util.InjectionUtils.invoke(InjectionUtils.java:56) ... Caused by: javax.imageio.IIOException: Can't get input stream from URL! at javax.imageio.ImageIO.read(Unknown Source) at com.atlassian.jira.lookandfeel.AutoLookAndFeelManager.getLogoInfo(AutoLookAndFeelManager.java:240) ... 193 more Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at sun.security.ssl.Alerts.getSSLException(Unknown Source) at sun.security.ssl.SSLSocketImpl.fatal(Unknown Source) at sun.security.ssl.Handshaker.fatalSE(Unknown Source) at sun.security.ssl.Handshaker.fatalSE(Unknown Source) at sun.security.ssl.ClientHandshaker.serverCertificate(Unknown Source) at sun.security.ssl.ClientHandshaker.processMessage(Unknown Source) at sun.security.ssl.Handshaker.processLoop(Unknown Source) at sun.security.ssl.Handshaker.process_record(Unknown Source) at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source) at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source) at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source) at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source) at sun.net.www.protocol.https.HttpsClient.afterConnect(Unknown Source) at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source) at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(Unknown Source) at java.net.URL.openStream(Unknown Source) ... 195 more Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at sun.security.validator.PKIXValidator.doBuild(Unknown Source) at sun.security.validator.PKIXValidator.engineValidate(Unknown Source) at sun.security.validator.Validator.validate(Unknown Source) at sun.security.ssl.X509TrustManagerImpl.validate(Unknown Source) at sun.security.ssl.X509TrustManagerImpl.checkTrusted(Unknown Source) at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source) ... 208 more Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(Unknown Source) at java.security.cert.CertPathBuilder.build(Unknown Source) ... 214 more {code} * In this case, JIRA needed a SSL cert installed into Java This may also occur if the URL is simply badly defined, like http://wrongurl:8001 h5. Quick reproduce: * Fresh JIRA install, http://localhost:8080 * Edit Base URL to: https://localhost:8080 * Navigate to Look and Feel * Upload a logo * Click the "To apply a color scheme that matches your logo, click here." option * Browser/logs error Expectation: re-color works or some message about the base URL being ill-defined.

    Atlassian JIRA | 4 years ago | David Chan [Atlassian]
    java.lang.RuntimeException: javax.imageio.IIOException: Can't get input stream from URL!

    Root Cause Analysis

    1. java.lang.RuntimeException

      javax.imageio.IIOException: Can't get input stream from URL!

      at com.atlassian.jira.lookandfeel.AutoLookAndFeelManager.getLogoInfo()
    2. com.atlassian.jira
      EditLookAndFeel.doAutoUpdateColors
      1. com.atlassian.jira.lookandfeel.AutoLookAndFeelManager.getLogoInfo(AutoLookAndFeelManager.java:245)
      2. com.atlassian.jira.lookandfeel.AutoLookAndFeelManager.generateFromLogo(AutoLookAndFeelManager.java:53)
      3. com.atlassian.jira.lookandfeel.EditLookAndFeel.doAutoUpdateColors(EditLookAndFeel.java:368)
      3 frames
    3. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      4. java.lang.reflect.Method.invoke(Unknown Source)
      4 frames
    4. webwork.util
      InjectionUtils.invoke
      1. webwork.util.InjectionUtils$DefaultInjectionImpl.invoke(InjectionUtils.java:70)
      2. webwork.util.InjectionUtils.invoke(InjectionUtils.java:56)
      2 frames