2 ================================================================================
4 ================================================================================
5 Copyright (C) 2017 AT&T Intellectual Property
6 ================================================================================
7 Licensed under the Apache License, Version 2.0 (the "License");
8 you may not use this file except in compliance with the License.
9 You may obtain a copy of the License at
11 http://www.apache.org/licenses/LICENSE-2.0
13 Unless required by applicable law or agreed to in writing, software
14 distributed under the License is distributed on an "AS IS" BASIS,
15 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 See the License for the specific language governing permissions and
17 limitations under the License.
18 ================================================================================
20 <%@ page import="java.io.*" %>
21 <%@ page import="java.util.*" %>
22 <%@ page import="org.openecomp.portalsdk.analytics.model.runtime.*" %>
23 <%@ page import="org.openecomp.portalsdk.analytics.system.*" %>
24 <%@ page import="org.openecomp.portalsdk.analytics.util.*" %>
25 <%@ page import="org.openecomp.portalsdk.analytics.error.UserAccessException"%>
26 <%@ page import="org.openecomp.portalsdk.analytics.error.RaptorException"%>
27 <%@ page import="org.openecomp.portalsdk.analytics.error.UserDefinedException"%>
28 <%@ page isErrorPage="true" %>
31 <% java.lang.Exception ex = (Exception) request.getAttribute(AppConstants.RI_EXCEPTION); %>
32 <% boolean showEditLink = false;
33 if(AppUtils.getRequestNvlValue(request, "r_action").equals("report.run")) {
34 ReportRuntime rr = (ReportRuntime) request.getSession().getAttribute(AppConstants.SI_REPORT_RUNTIME);
37 rr.checkUserWriteAccess(request);
39 } catch(Exception e) {}
48 <meta http-equiv="Content-Language" content="en-us">
49 <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
50 <link rel="stylesheet" type="text/css" href="<%= AppUtils.getBaseFolderURL() %>css/raptor.css">
51 <link rel="stylesheet" type="text/css" href="<%= AppUtils.getBaseFolderURL() %>css/ral.css">
52 <title>Application Error</title>
55 <body bgcolor="#FFFFFF">
56 <%-- jsp:include page="custom_header_include.jsp" flush="true" /--%>
58 <form name="forma" action="raptor.htm" method="post">
59 <input type="hidden" name="action" value="raptor">
60 <input type="hidden" name="r_action" value="report.edit">
61 <input type="hidden" name="c_master" value="<%= AppUtils.getRequestNvlValue(request, "c_master") %>">
62 <input type="hidden" name="source_page" value="report_run">
65 <table class="mTAB" width="94%" class="tableBorder" border="0" cellspacing="1" cellpadding="3" align=center>
67 <td width="90%" class=rtext2 nowrap>
68 <% if(showEditLink) { %>
69 <input type=image border="0" src="<%= AppUtils.getImgFolderURL() %>pen_paper.gif" alt="Edit report" width="12" height="12">
71 <b class=rtableheader>Error/User-Alert Message:</b>
75 <% if(ex instanceof org.openecomp.portalsdk.analytics.error.RaptorSchedularException) { %>
76 <% if(AppUtils.isAdminUser(request)) { %>
78 <td width="90%" class=rtext2 nowrap>
79 <font class=rtabletext><b>Exception Class: </b><%= (ex!=null && ex instanceof org.openecomp.portalsdk.analytics.error.RaptorSchedularException)?ex.getClass().toString():"" %></font>
84 <td width="90%" class=rtext2 nowrap><font class=rtabletext><b>Message:</b> <%= (ex!=null && ex instanceof org.openecomp.portalsdk.analytics.error.RaptorSchedularException)?ex.getMessage():"" %></font>
88 <% if(ex!=null) ex.printStackTrace(); %>
89 <% if(AppUtils.isAdminUser(request)) {
90 if ((ex instanceof org.openecomp.portalsdk.analytics.error.ReportSQLException)||
91 (request.getAttribute("c_error_sql")!=null && !((String) request.getAttribute("c_error_sql")).trim().equals(""))) {
93 if(ex instanceof org.openecomp.portalsdk.analytics.error.ReportSQLException)
94 sql = ((org.openecomp.portalsdk.analytics.error.ReportSQLException) ex).getReportSQL();
96 sql = (String) request.getAttribute("c_error_sql"); %>
97 <% if (sql!=null && sql.length() > 0) { %>
100 <b class=rtabletext>SQL Execution Error:</b>
105 <font class=rtabletext><%= sql %></font>
108 <% request.setAttribute("c_error_sql", sql);
113 <b class=rtabletext>Error Message:</b><br>
114 <font class=rtabletext><%= AppUtils.getRequestNvlValue(request, "error_extra_msg") %><%= ex.getMessage() %></font>
117 <% if(request.getAttribute("c_error_url")!=null && !((String) request.getAttribute("c_error_url")).trim().equals("")) { %>
120 <font class=rtabletext>Please <a href="<%= (String) request.getAttribute("c_error_url") %>">click here</a> to edit report definition.</font>
124 <% } else { // reportSQLException
125 if (ex instanceof RaptorException) { %>
128 <b class=rtabletext>Error Message:</b><br>
129 <font class=rtabletext><%= AppUtils.getRequestNvlValue(request, "error_extra_msg") %><%= ex.getMessage() %></font>
135 if (ex instanceof UserAccessException) { %>
138 <b class=rtabletext>Error Message:</b><br>
139 <font class=rtabletext><%= AppUtils.getRequestNvlValue(request, "error_extra_msg") %><%= ex.getMessage() %></font>
142 <% } else if (ex instanceof UserDefinedException) { %>
145 <b class=rtabletext>Error Message:</b><br>
146 <font class=rtabletext><%= AppUtils.getRequestNvlValue(request, "error_extra_msg") %><%= ex.getMessage() %></font>
153 <font class=rtabletext>** The system administrator has been notified for this error.</font>
157 <% if(exception instanceof org.openecomp.portalsdk.analytics.error.RaptorSchedularException) { %>
158 <% if(AppUtils.isAdminUser(request)) { %>
160 <td width="90%" class=rtext2 nowrap>
161 <font class=rtabletext><b>Exception Class: </b><%= (exception!=null && exception instanceof org.openecomp.portalsdk.analytics.error.RaptorSchedularException)?exception.getClass().toString():"" %></font>
166 <td width="90%" class=rtext2 nowrap><font class=rtabletext><b>Message:</b> <%= (exception!=null && exception instanceof org.openecomp.portalsdk.analytics.error.RaptorSchedularException)?exception.getMessage():"" %></font>
168 <% if(exception!=null) exception.printStackTrace(); %>
171 <% if(AppUtils.isAdminUser(request)) {
172 if ((exception instanceof org.openecomp.portalsdk.analytics.error.ReportSQLException)||
173 (request.getAttribute("c_error_sql")!=null && !((String) request.getAttribute("c_error_sql")).trim().equals(""))) {
175 if(exception instanceof org.openecomp.portalsdk.analytics.error.ReportSQLException)
176 sql = ((org.openecomp.portalsdk.analytics.error.ReportSQLException) ex).getReportSQL();
178 sql = (String) request.getAttribute("c_error_sql"); %>
179 <% if (sql!=null && sql.length() > 0) { %>
182 <b class=rtabletext>SQL Execution Error:</b>
187 <font class=rtabletext><%= sql %></font>
190 <% request.setAttribute("c_error_sql", sql);
195 <b class=rtabletext>Error Message:</b><br>
196 <font class=rtabletext><%= AppUtils.getRequestNvlValue(request, "error_extra_msg") %><%= ex.getMessage() %></font>
199 <% if(request.getAttribute("c_error_url")!=null && !((String) request.getAttribute("c_error_url")).trim().equals("")) { %>
202 <font class=rtabletext>Please <a href="<%= (String) request.getAttribute("c_error_url") %>">click here</a> to edit report definition.</font>
210 <font class=rtabletext>** The system administrator has been notified for this error.</font>
213 <% if(AppUtils.isAdminUser(request)) { %>
214 <!-------------------------------------------------------
215 EXCEPTION [<%= ex!=null? ex.getMessage():"" %>]
216 <% if(ex!=null) ex.printStackTrace(new PrintWriter(out)); %>
217 -------------------------------------------------------->
219 <% if(exception!=null) exception.printStackTrace(); %>