[#2677] - rest_v2 scheduled job won't run if it has a Date parameter

Category:
Bug report
Priority:
High
Status:
New
Project: Severity:
Major
Resolution:
Open
Component: Reproducibility:
Always
Assigned to:
4

If I have a report that takes a java.util.Date as a parameter and schedule a job for that report via the rest_v2/jobs service, the job will be created OK, but will fail at the scheduled runtime due to "java.lang.ClassCastException: org.apache.xerces.jaxp.datatype.XMLGregorianCalendarImpl cannot be cast to java.util.Date".

Simply running the report interactively from the web service (i.e., /rest_v2/reports/reports/date_bug_test.html?THE_DAY=2012-01-17, where THE_DAY is the Date parameter) works fine.

Scheduling the job manually via the Jasperserver control panel (after defining a Date input control to supply THE_DATE) also works fine.

I've attached a simple report (a single Date parameter,THE_DAY, that displays in the No_Data band) that can be used to reproduce the issue.

I've also attached the xml that is PUT to the rest_v2/jobs service (this will have to be modified slightly for your purposes, since it has some system-specific stuff in it -- the important part is the

<entry>
<key>THE_DAY</key>
<value xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:type="xs:date">2012-12-17</value>
</entry>

A stack trace that is obtained from jasperserver.log is also attached.

v5.0.0
andy.hill's picture
Joined: Jan 14 2013 - 6:55pm
Last seen: 7 years 10 months ago
Feedback