removing unused db file
[policy/engine.git] / ecomp-sdk-app / src / main / webapp / WEB-INF / fusion / raptor / error_page.jsp
1 <%--
2   ================================================================================
3   eCOMP Portal SDK
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
10   
11        http://www.apache.org/licenses/LICENSE-2.0
12   
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   ================================================================================
19   --%>
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" %>
29
30
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);
35                 if(rr!=null)
36                         try {
37                                 rr.checkUserWriteAccess(request);
38                                 showEditLink = true;
39                         } catch(Exception e) {}
40         }       // if
41 %>
42
43
44
45 <html>
46
47 <head>
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>
53         </head>
54
55 <body bgcolor="#FFFFFF">
56 <%-- jsp:include page="custom_header_include.jsp" flush="true" /--%>
57
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">
63
64 <br>
65 <table class="mTAB" width="94%"  class="tableBorder" border="0" cellspacing="1" cellpadding="3" align=center>
66         <tr class=rbg1>
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">
70 <% } %>
71                         <b class=rtableheader>Error/User-Alert Message:</b>
72                 </td>
73         </tr>
74 <% if(ex!=null) { %>
75     <% if(ex instanceof org.openecomp.portalsdk.analytics.error.RaptorSchedularException)  { %>
76      <% if(AppUtils.isAdminUser(request)) { %>
77         <tr class=rowalt1>
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>
80                 </td>
81         </tr>
82         <% } %>
83         <tr class=rowalt2>
84                 <td width="90%" class=rtext2 nowrap><font class=rtabletext><b>Message:</b>&nbsp;<%= (ex!=null && ex instanceof org.openecomp.portalsdk.analytics.error.RaptorSchedularException)?ex.getMessage():"" %></font>
85                 </td>
86         </tr>
87         <% }  %>
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(""))) { 
92                                                 String sql = "";
93                                                 if(ex instanceof org.openecomp.portalsdk.analytics.error.ReportSQLException)
94                                                         sql = ((org.openecomp.portalsdk.analytics.error.ReportSQLException) ex).getReportSQL(); 
95                                                 else
96                                                         sql = (String) request.getAttribute("c_error_sql"); %>
97                                                 <% if (sql!=null && sql.length() > 0) { %>      
98                                                 <tr class=rowalt1>
99                                                         <td width="90%">
100                                                                 <b class=rtabletext>SQL Execution Error:</b>
101                                                         </td>
102                                                 </tr>
103                                                 <tr class=rowalt2>
104                                                         <td width="90%">
105                                                                 <font class=rtabletext><%= sql %></font>
106                                                         </td>
107                                                 </tr>
108                         <%                      request.setAttribute("c_error_sql", sql);
109                                 %>
110                                         <% }  %>
111                                 <tr class=rowalt1>
112                                         <td width="90%">
113                                                 <b class=rtabletext>Error Message:</b><br>
114                                                 <font class=rtabletext><%= AppUtils.getRequestNvlValue(request, "error_extra_msg") %><%= ex.getMessage() %></font>
115                                         </td>
116                                 </tr>
117                         <%              if(request.getAttribute("c_error_url")!=null && !((String) request.getAttribute("c_error_url")).trim().equals("")) { %>
118                                 <tr class=rowalt1>
119                                         <td width="90%">
120                                                 <font class=rtabletext>Please <a href="<%= (String) request.getAttribute("c_error_url") %>">click here</a> to edit report definition.</font>
121                                         </td>
122                                 </tr>
123                         <%              } // if %>
124                         <% } else { // reportSQLException 
125                                 if (ex instanceof RaptorException) { %>
126                                         <tr class=rowalt1>
127                                         <td width="90%">
128                                                 <b class=rtabletext>Error Message:</b><br>
129                                                 <font class=rtabletext><%= AppUtils.getRequestNvlValue(request, "error_extra_msg") %><%= ex.getMessage() %></font>
130                                         </td>
131                                 </tr>                    
132                         <%} %>
133                         <% } %>
134                         <% } else { 
135                                 if (ex instanceof UserAccessException) { %>
136                                         <tr class=rowalt1>
137                                         <td width="90%">
138                                                 <b class=rtabletext>Error Message:</b><br>
139                                                 <font class=rtabletext><%= AppUtils.getRequestNvlValue(request, "error_extra_msg") %><%= ex.getMessage() %></font>
140                                         </td>
141                                 </tr>                                   
142                         <%      } else if (ex instanceof UserDefinedException) { %>
143                                 <tr class=rowalt1>
144                                         <td width="90%">
145                                                 <b class=rtabletext>Error Message:</b><br>
146                                                 <font class=rtabletext><%= AppUtils.getRequestNvlValue(request, "error_extra_msg") %><%= ex.getMessage() %></font>
147                                         </td>
148                                 </tr>   
149                         <%      }
150                          } %>
151                                 <tr class=rowalt2>
152                                         <td width="90%">
153                                                 <font class=rtabletext>** The system administrator has been notified for this error.</font>
154                                         </td>
155                                 </tr>           
156 <% } else { %>
157 <% if(exception instanceof org.openecomp.portalsdk.analytics.error.RaptorSchedularException)  { %>
158      <% if(AppUtils.isAdminUser(request)) { %>
159         <tr class=rowalt1>
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>
162         </td>
163 </tr>
164    <% } %>
165 <tr class=rowalt2>
166         <td width="90%" class=rtext2 nowrap><font class=rtabletext><b>Message:</b>&nbsp;<%= (exception!=null && exception instanceof org.openecomp.portalsdk.analytics.error.RaptorSchedularException)?exception.getMessage():"" %></font>
167                 </td>
168                 <% if(exception!=null) exception.printStackTrace(); %>
169         </tr>
170 <% } %>
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(""))) { 
174                         String sql = "";
175                         if(exception instanceof org.openecomp.portalsdk.analytics.error.ReportSQLException)
176                                 sql = ((org.openecomp.portalsdk.analytics.error.ReportSQLException) ex).getReportSQL(); 
177                         else
178                                 sql = (String) request.getAttribute("c_error_sql"); %>
179                                        <% if (sql!=null && sql.length() > 0) { %>                                       
180         <tr class=rowalt1>
181                 <td width="90%">
182                                                                                 <b class=rtabletext>SQL Execution Error:</b>
183                 </td>
184         </tr>
185         <tr class=rowalt2>
186                 <td width="90%">
187                         <font class=rtabletext><%= sql %></font>
188                 </td>
189         </tr>
190 <%                      request.setAttribute("c_error_sql", sql);
191         %>
192                                        <% } %> 
193         <tr class=rowalt1>
194                 <td width="90%">
195                         <b class=rtabletext>Error Message:</b><br>
196                         <font class=rtabletext><%= AppUtils.getRequestNvlValue(request, "error_extra_msg") %><%= ex.getMessage() %></font>
197                 </td>
198         </tr>
199 <%              if(request.getAttribute("c_error_url")!=null && !((String) request.getAttribute("c_error_url")).trim().equals("")) { %>
200         <tr class=rowalt1>
201                 <td width="90%">
202                         <font class=rtabletext>Please <a href="<%= (String) request.getAttribute("c_error_url") %>">click here</a> to edit report definition.</font>
203                 </td>
204         </tr>
205 <%              } %>
206 <% } %>
207 <% } %>
208         <tr class=rowalt2>
209                 <td width="90%">
210                         <font class=rtabletext>** The system administrator has been notified for this error.</font>
211                 </td>
212         </tr>
213 <% if(AppUtils.isAdminUser(request))  { %>      
214 <!-------------------------------------------------------
215 EXCEPTION [<%= ex!=null? ex.getMessage():"" %>]
216 <%      if(ex!=null) ex.printStackTrace(new PrintWriter(out)); %>
217 -------------------------------------------------------->
218 <% } %>
219 <% if(exception!=null) exception.printStackTrace(); %>
220
221 <%      }       // else 
222 %>
223 </table>
224
225 </form>
226
227 </body>
228 </html>
229