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

Atlassian JIRA | David Chan [Atlassian] | 4 years ago
  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!
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    When using Continuation in a Jax web service a stacktrace is printed after every call, the web service does work as expected. If a new web service call is executed while waiting for the stacktrace (in Apache Tomcat the stacktrace appears after about 10 seconds) the web service is very slow. Some calls take up to 8 seconds to complete. This only occurs with CXF versions above 2.7.0. Tested versions: 2.7.1, 2.7.2, 2.7.3 and 2.7.7. Example project attached. {code:title=Continuation web service code|borderStyle=solid} public String test() { final Continuation continuation = getContinuation(); if (continuation == null) { throw new RuntimeException("Failed to get continuation"); } synchronized (continuation) { if(continuation.isNew()) { FutureTask futureResponse = new FutureTask<>(new Callable<String>() { @Override public String call() throws Exception { Thread.sleep(1000); String response = "Test response"; // the blocking call has finished, we resume the transport thread continuation.resume(); return response; } }); taskExecutor.execute(futureResponse); continuation.setObject(futureResponse); // suspend the transport thread so it can handle other requests continuation.suspend(CONTINUATION_TIMEOUT); return null; } else { FutureTask futureTask = (FutureTask) continuation.getObject(); if(futureTask.isDone()) { try { return (String) futureTask.get(); } catch (InterruptedException | ExecutionException e) { e.printStackTrace(); } } else { continuation.suspend(CONTINUATION_TIMEOUT); } } } // unreachable return null; } private Continuation getContinuation() { ContinuationProvider provider = (ContinuationProvider) context.getMessageContext().get(ContinuationProvider.class.getName()); return provider.getContinuation(); } {code} {code:title=Stacktraces|borderStyle=solid} Nov 21, 2013 10:15:53 PM org.apache.cxf.phase.PhaseInterceptorChain doDefaultLogging WARNING: Interceptor for {http://continuation.example.com/}ContinuationWebServiceService#{http://continuation.example.com/}test has thrown exception, unwinding now java.lang.RuntimeException: Can't find input stream in message at org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:145) at org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:62) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272) at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121) at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:239) at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:248) at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:222) at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:153) at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:167) at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:286) at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:206) at javax.servlet.http.HttpServlet.service(HttpServlet.java:647) at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:262) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:749) at org.apache.catalina.core.ApplicationDispatcher.doDispatch(ApplicationDispatcher.java:660) at org.apache.catalina.core.ApplicationDispatcher.dispatch(ApplicationDispatcher.java:626) at org.apache.catalina.core.AsyncContextImpl$1.run(AsyncContextImpl.java:225) at org.apache.catalina.core.AsyncContextImpl.doInternalDispatch(AsyncContextImpl.java:367) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:217) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.asyncDispatch(CoyoteAdapter.java:299) at org.apache.coyote.http11.AbstractHttp11Processor.asyncDispatch(AbstractHttp11Processor.java:1587) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:722) Nov 21, 2013 10:15:53 PM org.apache.cxf.phase.PhaseInterceptorChain doDefaultLogging WARNING: Interceptor for {http://continuation.example.com/}ContinuationWebServiceService#{http://continuation.example.com/}test has thrown exception, unwinding now org.apache.cxf.binding.soap.SoapFault: Error writing to XMLStreamWriter. at org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor$SoapOutEndingInterceptor.handleMessage(SoapOutInterceptor.java:300) at org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor$SoapOutEndingInterceptor.handleMessage(SoapOutInterceptor.java:282) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272) at org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:113) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:333) at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121) at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:239) at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:248) at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:222) at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:153) at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:167) at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:286) at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:206) at javax.servlet.http.HttpServlet.service(HttpServlet.java:647) at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:262) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:749) at org.apache.catalina.core.ApplicationDispatcher.doDispatch(ApplicationDispatcher.java:660) at org.apache.catalina.core.ApplicationDispatcher.dispatch(ApplicationDispatcher.java:626) at org.apache.catalina.core.AsyncContextImpl$1.run(AsyncContextImpl.java:225) at org.apache.catalina.core.AsyncContextImpl.doInternalDispatch(AsyncContextImpl.java:367) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:217) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.asyncDispatch(CoyoteAdapter.java:299) at org.apache.coyote.http11.AbstractHttp11Processor.asyncDispatch(AbstractHttp11Processor.java:1587) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:722) Caused by: javax.xml.stream.XMLStreamException: No open start element, when trying to write end element at com.ctc.wstx.sw.BaseStreamWriter.throwOutputError(BaseStreamWriter.java:1522) at com.ctc.wstx.sw.BaseStreamWriter.reportNwfStructure(BaseStreamWriter.java:1551) at com.ctc.wstx.sw.BaseNsStreamWriter.doWriteEndTag(BaseNsStreamWriter.java:648) at com.ctc.wstx.sw.BaseNsStreamWriter.writeEndElement(BaseNsStreamWriter.java:280) at org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor$SoapOutEndingInterceptor.handleMessage(SoapOutInterceptor.java:291) ... 35 more {code}

    Apache's JIRA Issue Tracker | 3 years ago | Mark van den Bergh
    java.lang.RuntimeException: Can't find input stream in message

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    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