[ https://issues.apache.org/jira/browse/KNOX-1371?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16529137#comment-16529137 ]
ASF subversion and git services commented on KNOX-1371: ------------------------------------------------------- Commit 96728794b9303e12568c83c62b1c0e599549e493 in knox's branch refs/heads/master from [~moresandeep] [ https://git-wip-us.apache.org/repos/asf?p=knox.git;h=9672879 ] KNOX-1371 - Add adapters for classes used by redirect.jsp > Knox upgarde from pre-1.0.0 fails because of error "unable to compile class > for redirecting.jsp" > ------------------------------------------------------------------------------------------------ > > Key: KNOX-1371 > URL: https://issues.apache.org/jira/browse/KNOX-1371 > Project: Apache Knox > Issue Type: Bug > Reporter: Sandeep More > Assignee: Sandeep More > Priority: Major > Fix For: 1.1.0 > > > When upgrading Knox, the JSP files are not upgraded and the packages they > reference are not part of the adapter package, as a result we get the > following error in gateway.log after upgrading > {code:java} > 2018-06-30 06:29:39,984 ERROR knox.gateway > (GatewayServlet.java:doFilter(177)) - Gateway processing failed: > org.apache.jasper.JasperException: Unable to compile class for JSP: > An error occurred at line: 16 in the generated java file: > [/var/lib/knox/data-3.0.0.0-1565/deployments/knoxsso.topo.1644772c408/%2Fknoxauth/META-INF/temp/jsp/org/apache/jsp/redirecting_jsp.java] > Only a type can be imported. org.apache.hadoop.gateway.topology.Topology > resolves to a package > An error occurred at line: 17 in the generated java file: > [/var/lib/knox/data-3.0.0.0-1565/deployments/knoxsso.topo.1644772c408/%2Fknoxauth/META-INF/temp/jsp/org/apache/jsp/redirecting_jsp.java] > Only a type can be imported. org.apache.hadoop.gateway.topology.Service > resolves to a package > An error occurred at line: 18 in the generated java file: > [/var/lib/knox/data-3.0.0.0-1565/deployments/knoxsso.topo.1644772c408/%2Fknoxauth/META-INF/temp/jsp/org/apache/jsp/redirecting_jsp.java] > Only a type can be imported. org.apache.hadoop.gateway.util.RegExUtils > resolves to a package > An error occurred at line: 43 in the jsp file: /redirecting.jsp > Topology cannot be resolved to a type > 40: > 41: <script type="text/javascript" src="js/knoxauth.js"></script> > 42: <% > 43: Topology topology = > (Topology)request.getSession().getServletContext().getAttribute("org.apache.hadoop.gateway.topology"); > 44: String whitelist = null; > 45: Collection services = topology.getServices(); > 46: for (Object service : services) { > An error occurred at line: 43 in the jsp file: /redirecting.jsp > Topology cannot be resolved to a type > 40: > 41: <script type="text/javascript" src="js/knoxauth.js"></script> > 42: <% > 43: Topology topology = > (Topology)request.getSession().getServletContext().getAttribute("org.apache.hadoop.gateway.topology"); > 44: String whitelist = null; > 45: Collection services = topology.getServices(); > 46: for (Object service : services) { > An error occurred at line: 47 in the jsp file: /redirecting.jsp > Service cannot be resolved to a type > 44: String whitelist = null; > 45: Collection services = topology.getServices(); > 46: for (Object service : services) { > 47: Service svc = (Service)service; > 48: if (svc.getRole().equals("KNOXSSO")) { > 49: Map<String, String> params = svc.getParams(); > 50: whitelist = params.get("knoxsso.redirect.whitelist.regex"); > An error occurred at line: 47 in the jsp file: /redirecting.jsp > Service cannot be resolved to a type > 44: String whitelist = null; > 45: Collection services = topology.getServices(); > 46: for (Object service : services) { > 47: Service svc = (Service)service; > 48: if (svc.getRole().equals("KNOXSSO")) { > 49: Map<String, String> params = svc.getParams(); > 50: whitelist = params.get("knoxsso.redirect.whitelist.regex"); > An error occurred at line: 56 in the jsp file: /redirecting.jsp > RegExUtils cannot be resolved > 53: if (whitelist == null) > { 54: whitelist = ""; 55: } > 56: boolean validRedirect = RegExUtils.checkWhitelist(whitelist, > request.getParameter("originalUrl")); > 57: if (validRedirect) { > 58: %> > 59: <script>{code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)