ox-it / ords

Automatically exported from code.google.com/p/ords
0 stars 0 forks source link

Filtering on date fields causes crashes and seems to be generally broken #659

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Go to a table with date fields
2. Create a filter: [date field] IS NOT []
3. Run the query and see:

HTTP Status 500 - An exception occurred processing JSP page /table.jsp at line 
129 126: navInfo, nextPage); 127: } 128: else { 129: fullTableData = 
FilterUtils.viewFilteredTableData(dbUtils, session, currentTable, cleanFilter, 
cleanParams, rowNum, tableColumnReferences,navInfo, nextPage);  130: } 131: 132: 
%> Stacktrace:

type Exception report

message An exception occurred processing JSP page /table.jsp at line 129 126: 
navInfo, nextPage); 127: } 128: else { 129: fullTableData = 
FilterUtils.viewFilteredTableData(dbUtils, session, currentTable, cleanFilter, 
cleanParams, rowNum, tableColumnReferences,navInfo, nextPage);  130: } 131: 132: 
%> Stacktrace:

description The server encountered an internal error (An exception occurred 
processing JSP page /table.jsp at line 129 126: navInfo, nextPage); 127: } 128: 
else { 129: fullTableData = FilterUtils.viewFilteredTableData(dbUtils, session, 
currentTable, cleanFilter, cleanParams, rowNum, tableColumnReferences,navInfo, 
nextPage);  130: } 131: 132: %> Stacktrace:) that prevented it from fulfilling 
this request.

exception

org.apache.jasper.JasperException: An exception occurred processing JSP page 
/table.jsp at line 129

126:                     navInfo, nextPage);
127:             }
128:             else {
129:                fullTableData = FilterUtils.viewFilteredTableData(dbUtils, 
session, currentTable, cleanFilter, cleanParams, rowNum, 
tableColumnReferences,navInfo, nextPage);   
130:             }
131:             
132:         %>

Stacktrace:
    org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:568)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:470)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
root cause

java.lang.NullPointerException
    uk.ac.ox.oucs.ords.utilities.FilterUtils.viewFilteredTableData(FilterUtils.java:81)
    org.apache.jsp.table_jsp._jspService(table_jsp.java:450)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
note The full stack trace of the root cause is available in the Apache 
Tomcat/7.0.28 logs.

Apache Tomcat/7.0.28

What is the expected output? What do you see instead?
This happens whether or not there are any null date fields in the table in 
question.
THe same crash occurs when using LIKE or CONTAINS on a date field.
Ah. After trying various combinations is seems that the system also now crashed 
when using IS followed by an empty box. The way the filter works with date 
fields in general seems to be a bit knackered.

Please use labels and text to provide additional information.
Chrom. Dev 1.0.12 - 4318

Original issue reported on code.google.com by jajwil...@gmail.com on 11 May 2015 at 9:55

GoogleCodeExporter commented 9 years ago

Original comment by jajwil...@gmail.com on 11 May 2015 at 9:56

GoogleCodeExporter commented 9 years ago
Yep, dates totally not handled properly right now. Am working on this now.

Original comment by scott.br...@gmail.com on 14 May 2015 at 5:26

GoogleCodeExporter commented 9 years ago
The interface could be improved but at least now DATE, TIME and TIMESTAMP 
fields get a Date editor, and produce the expected results. The only issue is 
that I don't seem to be able to provide different input styles for each of the 
different field types - they all get a calendar picker. However thats not a 
problem with the underlying filter, but a UI config issue.

Original comment by scott.br...@gmail.com on 15 May 2015 at 9:00