Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 324834

Summary: Reports with parameter as Oracle timestamp/Date not displayed
Product: z_Archived Reporter: Sriraman Srinivasan <sriraman.iyengar>
Component: BIRTAssignee: Mingxia Wu <mwu>
Status: VERIFIED WORKSFORME QA Contact: Xiaoying Gu <bluesoldier>
Severity: normal    
Priority: P3 CC: bluesoldier, sriraman.iyengar, wyan
Version: unspecified   
Target Milestone: 2.6.2   
Hardware: PC   
OS: Windows XP   
Whiteboard: Obsolete
Attachments:
Description Flags
Oracle Timestamp
none
Oracle Date issue rpt design file none

Description Sriraman Srinivasan CLA 2010-09-09 06:36:01 EDT
Build Identifier: Birt  2.2.1

If we try to create a report with Timestamp/Date parameter in the where clause, we are not able to generate a report. We get a oracle error stating invalid month.

Reproducible: Always

Steps to Reproduce:
1. create a report with parameter of oracle Timestamp type. In birt report we configure this as a DateTime parameter. Below is the select statement for the same.
select *
from DASH1.SRIRAMAN_TEST
where DASH1.SRIRAMAN_TEST.DATETIME = ?

The parameter DASH1.SRIRAMAN_TEST.DATETIME is of Oracle TimeStamp type.

2. Try generating the report i.e. preview.
3.You will get a error message stating as below:
The following items have errors: 


ReportDesign (id = 1): 
+ Cannot get the result set metadata.
SQL statement does not return a ResultSet object.
SQL error #1: ORA-01843: not a valid month

4. A similar error when the parameter is of Oracle Date type and we use it as 
DateTime parameter in birt. Below is the error message for the same

The following items have errors: 


ReportDesign (id = 1): 
+ Cannot get the result set metadata.
SQL statement does not return a ResultSet object.
SQL error #1: ORA-01861: literal does not match format string
Comment 1 Sriraman Srinivasan CLA 2010-09-09 06:38:29 EDT
Created attachment 178500 [details]
Oracle Timestamp
Comment 2 Sriraman Srinivasan CLA 2010-09-09 06:39:51 EDT
Created attachment 178501 [details]
Oracle Date issue rpt design file
Comment 3 Sriraman Srinivasan CLA 2010-09-09 06:43:32 EDT
Going through the code for birt we found that birt is formatting the timestamp parameter in 'yyyy-MM-dd HH:MM:SS.S' format before sending it to oracle database and this format seems to be a miss match for timestamp format in oracle. The conversion takes place in ParameterUtil.java in org.eclipse.birt.data.engine.impl package.
Comment 4 Mingxia Wu CLA 2010-12-01 04:05:45 EST
Cannot reproduce in latest build. Please try the latest version to verify it.
Comment 5 Xiaoying Gu CLA 2010-12-01 04:42:37 EST
Verified in 2.6.2.v20101201 that this issue does not exist any more.
Comment 6 Xiaoying Gu CLA 2010-12-01 04:42:53 EST
-V