You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@knox.apache.org by "Sandeep More (JIRA)" <ji...@apache.org> on 2018/07/01 15:01:00 UTC

[jira] [Created] (KNOX-1371) Knox upgarde from pre-1.0.0 fails because of error "unable to compile class for redirecting.jsp"

Sandeep More created KNOX-1371:
----------------------------------

             Summary: 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
             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)