Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 3.3, EE-3.3.0.GA_P01
-
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).
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).
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.