ICEfaces
  1. ICEfaces
  2. ICE-9553

ssl - showcase testing - server-side error

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.3, EE-3.3.0.GA_P01
    • Fix Version/s: 4.0.BETA, 4.0
    • Component/s: Sample Apps
    • Labels:
      None
    • Environment:
      EE-3.3.0.GA_P01 jenkins build10/11
      Server: Tomcat7 configured for SSL
      Browsers: all
    • Assignee Priority:
      P1

      Description

      If loading showcase in any browser using SSL (https://localhost:8443/showcase), there is a server-side error each time the user clicks on any link to access ACE components; however the pages are loaded and no functional issues could be found so far.

      26-Aug-2013 3:34:00 PM org.icefaces.samples.showcase.util.SourceCodeLoaderConnection get
      SEVERE: Broken URL for the source code loader (http://localhost:8443/showcase/sourcecodeStream.html?path=), check your web.xml.

      This error is not thrown if after starting tomcat and showcase deployment, the non-SSL showcase URL is loaded first (http://localhost:8080/showcase), and then the SSL showcase is accessed (https://localhost:8443/showcase).

        Activity

        Hide
        Arturo Zambrano added a comment -

        Committed fix at revision 37771. Added fallback approach to access the source code contents directly from the servlet object, without having to create a new http connection, when the request was made using SSL.

        The way that the source code functionality works is this: the SourceCodeLoaderConnection application-scoped bean makes a request to the SourceCodeLoaderServlet servlet to retrieve a specific resource. SourceCodeLoaderConnection obtains the host name, port number, etc. from the very first request to the app to build a URL to make a request to the SourceCodeLoaderServlet servlet. Originally, it wasn't setting the 'https' protocol, so that was the reason why the connection to the servlet couldn't be made, and an exception was thrown. After this was fixed, a different exception kept occurring (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), which could only be fixed by configuring the machine on which the server runs. So, the only possible solution was to access the SourceCodeLoaderServlet functionality directly, by invoking its methods, without making a new connection.

        Show
        Arturo Zambrano added a comment - Committed fix at revision 37771. Added fallback approach to access the source code contents directly from the servlet object, without having to create a new http connection, when the request was made using SSL. The way that the source code functionality works is this: the SourceCodeLoaderConnection application-scoped bean makes a request to the SourceCodeLoaderServlet servlet to retrieve a specific resource. SourceCodeLoaderConnection obtains the host name, port number, etc. from the very first request to the app to build a URL to make a request to the SourceCodeLoaderServlet servlet. Originally, it wasn't setting the 'https' protocol, so that was the reason why the connection to the servlet couldn't be made, and an exception was thrown. After this was fixed, a different exception kept occurring (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), which could only be fixed by configuring the machine on which the server runs. So, the only possible solution was to access the SourceCodeLoaderServlet functionality directly, by invoking its methods, without making a new connection.
        Hide
        Liana Munroe added a comment -

        Tested with ICEfaces EE-3.3.0 maintenance branch trunk r44519 using Tomcat 7 SSL accessing https://localhost:8443/showcase.
        Still able to reproduce issue as described in description.
        In order to reproduce the issue you must use the SSL https://localhost:8443/showcase URL as your first launch of the showcase application. If you access the demo using non-SSL means first, the error will not appear.
        Apr 20, 2015 2:28:54 PM org.icefaces.samples.showcase.util.SourceCodeLoaderConne
        ction get
        SEVERE: Broken URL for the source code loader (http://localhost:8443/showcase/so
        urcecodeStream.html?path=), check your web.xml.
        java.net.SocketException: Unexpected end of file from server
        at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:782)
        at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:641)
        at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:779)
        at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:641)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLCon
        nection.java:1218)
        at java.net.URLConnection.getContent(URLConnection.java:688)
        at java.net.URL.getContent(URL.java:1024)
        at org.icefaces.samples.showcase.util.SourceCodeLoaderConnection.get(Sou
        rceCodeLoaderConnection.java:179)
        at org.icefaces.samples.showcase.util.SourceCodeLoaderConnection.get(Sou
        rceCodeLoaderConnection.java:41)
        at javax.el.MapELResolver.getValue(MapELResolver.java:52)
        at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELR
        esolver.java:176)
        at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELRe
        solver.java:203)
        at org.apache.el.parser.AstValue.getValue(AstValue.java:169)
        at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:1
        89)
        at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpress
        ion.java:109)
        at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.
        java:194)
        at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.
        java:182)
        at javax.faces.component.UIOutput.getValue(UIOutput.java:170)
        at com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getValue(Ht
        mlBasicInputRenderer.java:205)
        at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.getCurrentValue(
        HtmlBasicRenderer.java:355)
        at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeEnd(HtmlBa
        sicRenderer.java:164)
        at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:
        877)
        at org.icefaces.ace.util.Utils.renderChild(Utils.java:61)
        at org.icefaces.ace.util.Utils.renderChildren(Utils.java:43)
        at org.icefaces.ace.util.Utils.renderChild(Utils.java:59)
        at org.icefaces.ace.component.tabset.TabSetRenderer.renderTabBody(TabSet
        Renderer.java:445)
        at org.icefaces.ace.component.tabset.TabSetRenderer.doTab(TabSetRenderer
        .java:526)
        at org.icefaces.ace.component.tabset.TabSetRenderer.doTabs(TabSetRendere
        r.java:466)
        at org.icefaces.ace.component.tabset.TabSetRenderer.recursivelyRenderSaf
        e(TabSetRenderer.java:343)
        at org.icefaces.ace.component.tabset.TabSetRenderer.recursivelyRenderSaf
        e(TabSetRenderer.java:351)
        at org.icefaces.ace.component.tabset.TabSetRenderer.encodeEnd(TabSetRend
        erer.java:280)
        at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:
        877)
        at org.icefaces.ace.renderkit.CoreRenderer.renderChild(CoreRenderer.java
        :86)
        at org.icefaces.ace.renderkit.CoreRenderer.renderChildren(CoreRenderer.j
        ava:70)
        at org.icefaces.ace.component.panel.PanelRenderer.encodeContent(PanelRen
        derer.java:257)
        at org.icefaces.ace.component.panel.PanelRenderer.encodeMarkup(PanelRend
        erer.java:137)
        at org.icefaces.ace.component.panel.PanelRenderer.encodeEnd(PanelRendere
        r.java:75)
        at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:
        877)
        at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1826)
        at javax.faces.render.Renderer.encodeChildren(Renderer.java:168)
        at org.icefaces.impl.renderkit.RendererWrapper.encodeChildren(RendererWr
        apper.java:49)
        at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.
        java:847)
        at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(
        HtmlBasicRenderer.java:304)
        at com.sun.faces.renderkit.html_basic.GroupRenderer.encodeChildren(Group
        Renderer.java:105)
        at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.
        java:847)
        at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(
        HtmlBasicRenderer.java:304)
        at com.sun.faces.renderkit.html_basic.GroupRenderer.encodeChildren(Group
        Renderer.java:105)
        at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.
        java:847)
        at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(
        HtmlBasicRenderer.java:304)
        at com.sun.faces.renderkit.html_basic.GroupRenderer.encodeChildren(Group
        Renderer.java:105)
        at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.
        java:847)
        at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1819)
        at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1822)
        at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1822)
        at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView
        (FaceletViewHandlingStrategy.java:447)
        at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewH
        andler.java:125)
        at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrap
        per.java:286)
        at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePha
        se.java:120)
        at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
        at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
        icationFilterChain.java:305)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
        ilterChain.java:210)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
        alve.java:225)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
        alve.java:169)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authentica
        torBase.java:472)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
        ava:168)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
        ava:98)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:
        927)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
        ve.java:118)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
        a:407)
        at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp
        11Processor.java:999)
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(
        AbstractProtocol.java:565)
        at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoin
        t.java:309)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
        utor.java:895)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
        .java:918)
        at java.lang.Thread.run(Thread.java:662)
        Apr 20, 2015 2:28:54 PM org.icefaces.samples.showcase.util.SourceCodeLoaderConne
        ction get
        SEVERE: Broken URL for the source code loader (http://localhost:8443/showcase/so
        urcecodeStream.html?path=), check your web.xml.

        Show
        Liana Munroe added a comment - Tested with ICEfaces EE-3.3.0 maintenance branch trunk r44519 using Tomcat 7 SSL accessing https://localhost:8443/showcase . Still able to reproduce issue as described in description. In order to reproduce the issue you must use the SSL https://localhost:8443/showcase URL as your first launch of the showcase application. If you access the demo using non-SSL means first, the error will not appear. Apr 20, 2015 2:28:54 PM org.icefaces.samples.showcase.util.SourceCodeLoaderConne ction get SEVERE: Broken URL for the source code loader ( http://localhost:8443/showcase/so urcecodeStream.html?path=), check your web.xml. java.net.SocketException: Unexpected end of file from server at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:782) at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:641) at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:779) at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:641) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLCon nection.java:1218) at java.net.URLConnection.getContent(URLConnection.java:688) at java.net.URL.getContent(URL.java:1024) at org.icefaces.samples.showcase.util.SourceCodeLoaderConnection.get(Sou rceCodeLoaderConnection.java:179) at org.icefaces.samples.showcase.util.SourceCodeLoaderConnection.get(Sou rceCodeLoaderConnection.java:41) at javax.el.MapELResolver.getValue(MapELResolver.java:52) at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELR esolver.java:176) at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELRe solver.java:203) at org.apache.el.parser.AstValue.getValue(AstValue.java:169) at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:1 89) at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpress ion.java:109) at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper. java:194) at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper. java:182) at javax.faces.component.UIOutput.getValue(UIOutput.java:170) at com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getValue(Ht mlBasicInputRenderer.java:205) at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.getCurrentValue( HtmlBasicRenderer.java:355) at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeEnd(HtmlBa sicRenderer.java:164) at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java: 877) at org.icefaces.ace.util.Utils.renderChild(Utils.java:61) at org.icefaces.ace.util.Utils.renderChildren(Utils.java:43) at org.icefaces.ace.util.Utils.renderChild(Utils.java:59) at org.icefaces.ace.component.tabset.TabSetRenderer.renderTabBody(TabSet Renderer.java:445) at org.icefaces.ace.component.tabset.TabSetRenderer.doTab(TabSetRenderer .java:526) at org.icefaces.ace.component.tabset.TabSetRenderer.doTabs(TabSetRendere r.java:466) at org.icefaces.ace.component.tabset.TabSetRenderer.recursivelyRenderSaf e(TabSetRenderer.java:343) at org.icefaces.ace.component.tabset.TabSetRenderer.recursivelyRenderSaf e(TabSetRenderer.java:351) at org.icefaces.ace.component.tabset.TabSetRenderer.encodeEnd(TabSetRend erer.java:280) at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java: 877) at org.icefaces.ace.renderkit.CoreRenderer.renderChild(CoreRenderer.java :86) at org.icefaces.ace.renderkit.CoreRenderer.renderChildren(CoreRenderer.j ava:70) at org.icefaces.ace.component.panel.PanelRenderer.encodeContent(PanelRen derer.java:257) at org.icefaces.ace.component.panel.PanelRenderer.encodeMarkup(PanelRend erer.java:137) at org.icefaces.ace.component.panel.PanelRenderer.encodeEnd(PanelRendere r.java:75) at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java: 877) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1826) at javax.faces.render.Renderer.encodeChildren(Renderer.java:168) at org.icefaces.impl.renderkit.RendererWrapper.encodeChildren(RendererWr apper.java:49) at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase. java:847) at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive( HtmlBasicRenderer.java:304) at com.sun.faces.renderkit.html_basic.GroupRenderer.encodeChildren(Group Renderer.java:105) at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase. java:847) at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive( HtmlBasicRenderer.java:304) at com.sun.faces.renderkit.html_basic.GroupRenderer.encodeChildren(Group Renderer.java:105) at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase. java:847) at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive( HtmlBasicRenderer.java:304) at com.sun.faces.renderkit.html_basic.GroupRenderer.encodeChildren(Group Renderer.java:105) at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase. java:847) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1819) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1822) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1822) at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView (FaceletViewHandlingStrategy.java:447) at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewH andler.java:125) at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrap per.java:286) at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePha se.java:120) at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl icationFilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF ilterChain.java:210) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV alve.java:225) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV alve.java:169) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authentica torBase.java:472) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j ava:168) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j ava:98) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java: 927) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal ve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav a:407) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp 11Processor.java:999) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process( AbstractProtocol.java:565) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoin t.java:309) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec utor.java:895) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor .java:918) at java.lang.Thread.run(Thread.java:662) Apr 20, 2015 2:28:54 PM org.icefaces.samples.showcase.util.SourceCodeLoaderConne ction get SEVERE: Broken URL for the source code loader ( http://localhost:8443/showcase/so urcecodeStream.html?path=), check your web.xml.
        Hide
        Liana Munroe added a comment -

        Issue in the last comment has been moved to http://jira.icesoft.org/browse/ICE-10645

        Show
        Liana Munroe added a comment - Issue in the last comment has been moved to http://jira.icesoft.org/browse/ICE-10645

          People

          • Assignee:
            Arturo Zambrano
            Reporter:
            Carmen Cristurean
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: