Bug 1273259

Summary: oracle12c: DataSetLookupException after creating filter on timestamp column in Jobs Perspective
Product: [Retired] JBoss BPMS Platform 6 Reporter: Jan Hrcek <jhrcek>
Component: BAMAssignee: David Gutierrez <dgutierr>
Status: CLOSED EOL QA Contact: Gui Jospin <gjospin>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 6.2.0CC: kverlaen
Target Milestone: CR1   
Target Release: 6.2.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-03-27 20:13:47 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1273362    
Bug Blocks:    
Attachments:
Description Flags
server.log with exceptions (search for DataSetLookupException) none

Description Jan Hrcek 2015-10-20 05:09:02 UTC
Created attachment 1084585 [details]
server.log with exceptions (search for DataSetLookupException)

Description of problem:
When entering Jobs perspective in business-central deployed with Oracle12c, there's modal with DataSetLookup exception.

server.log (attached) contains the corresponding:
 ERROR [org.dashbuilder.dataprovider.backend.sql.JDBCUtils] (http-localhost/127.0.0.1:8080-36) SELECT COUNT(*) FROM (SELECT ID, TIMESTAMP, STATUS, COMMANDNAME, MESSAGE, BUSINESSKEY FROM REQUESTINFO WHERE TIMESTAMP = '2015-10-20 23:00:00' ORDER BY TIMESTAMP ASC) "dbSQL"
...
Caused by: java.sql.SQLDataException: ORA-01843: not a valid month
-------------
It seems as if the database is interpreting the '20' in the date string as month, but in fact it's a day (test running on 20th October 2015).


Version-Release number of selected component (if applicable):
BPM Suite 6.2.0 ER4 + Oracle 12c as a datasource

How reproducible:
Always on dates when day number is >=13 :-)

Steps to Reproduce:
1. Deploy business central with Oracle 12c as a datasource
2. Navigate to jobs perspective


Actual results:
Modal with DataSetLookupException is opened, exception in server.log

Expected results:
No errors on entering the perspective

Additional info:

Comment 1 Pavel Kralik 2015-10-20 08:35:29 UTC
BPMS 6.2.0.ER4 with the Oracle 12c datasource is experiencing this error too in server log:

15:49:10,540 ERROR [org.dashbuilder.dataprovider.backend.sql.JDBCUtils] (http-/127.0.0.1:8080-13) SELECT COUNT(*) FROM (SELECT * FROM (SELECT PIL.PROCESSINSTANCEID PID, PIL.PROCESSID PNAME, V.ID VARID, V.VARIABLEID VARNAME, V.VALUE VARVALUE FROM PROCESSINSTANCELOG PIL, (SELECT VIL.VARIABLEID, MAX(VIL.ID) AS MAXVILID FROM VARIABLEINSTANCELOG VIL  GROUP BY VIL.PROCESSINSTANCEID, VIL.VARIABLEID) AS X INNER JOIN VARIABLEINSTANCELOG AS V ON V.VARIABLEID = X.VARIABLEID AND V.PROCESSINSTANCEID = PIL.PROCESSINSTANCEID AND V.ID = X.MAXVILID) "dbSQL") "dbSQL"
...
Caused by: java.sql.SQLSyntaxErrorException: ORA-00907: missing right parenthesis

Comment 2 Jan Hrcek 2015-10-20 12:33:26 UTC
Sorry, missed some steps to reproduce. 
3) After entering jobs perspective, create new filter tab using TIMESTAMP column, operator 'equals' and let the datepicker pick current date. In the case of failing test this was: '2015-10-20 23:00:00'

Comment 3 Pavel Kralik 2015-10-20 14:12:03 UTC
BPMS 6.2.0.ER4/EAP 6.4 with the postgresql93 datasource is affected:

05:29:54,105 ERROR [org.dashbuilder.dataprovider.backend.sql.JDBCUtils] (http-localhost/127.0.0.1:8080-18) SELECT COUNT(*) FROM (SELECT ID, TIMESTAMP, STATUS, COMMANDNAME, MESSAGE, BUSINESSKEY FROM REQUESTINFO WHERE TIMESTAMP = '2015-10-21 23:00:00' ORDER BY TIMESTAMP ASC) "dbSQL"
05:29:54,109 ERROR [org.dashbuilder.dataset.backend.exception.ExceptionManager] (http-localhost/127.0.0.1:8080-18) Can't lookup on specified data set: jbpmRequestList: org.dashbuilder.dataset.exception.DataSetLookupException: Can't lookup on specified data set: jbpmRequestList
...
Caused by: java.sql.SQLDataException: ORA-01843: not a valid month

Comment 4 David Gutierrez 2015-10-23 10:15:36 UTC
The error commented in https://bugzilla.redhat.com/show_bug.cgi?id=1273259#c1 is a different one, and has been already fixed => https://bugzilla.redhat.com/show_bug.cgi?id=1273362


As for the TIMESTAMP related error it's been reported in community:

https://issues.jboss.org/browse/DASHBUILDE-58


A fix has been submitted for approval.

(master)
https://github.com/dashbuilder/dashbuilder/pull/55

(0.3.x)
https://github.com/dashbuilder/dashbuilder/pull/56


They will be merge today by EOD.

Comment 6 Jan Hrcek 2015-11-09 07:13:12 UTC
Verification blocked by bug # 1277466 
Will be verified with the next build after that bug is fixed.

Comment 7 Jan Hrcek 2015-11-23 12:43:51 UTC
Ok, verified with BPM Suite 6.2.0 CR1