One Star

[resolved] ava.lang.IllegalArgumentException: Timestamp format must be yyyy-mm-dd

Hi,
Am using a custom query as my tOracleInput..When i run my job am getting below error ..
Should i use to_Date function in my below Sql query. to avid this error?
"SELECT
case when ACTIVITYID is null then activity_seq.nextval else ACTIVITYID end as ACTIVITYID,
src.ODII_CASE_ID as ACTIVITYORIGINALID,
src.STATUS as ACTIVITYCOMPLETEDINDICATOR
, '7' as ACTIVITYTYPEID
, 'DEATH INVESTIGATION' as ACTIVITYTYPETEXT
, src.OPEN_DATE as ACTIVITYDATE
, '4' as CLASSIFICATIONUSCODE
, 'ODII' as SOURCETEXT
, 'OSBI' as ISSUINGAUTHORITY
, src.OPEN_DATE as ACTIVITYCREATIONDATE
, src.OPEN_DATE as ACTIVITYRETAINDATE
FROM
SRC_ODII_CASE src, (select * from activity where SOURCETEXT = 'ODII') act
where
src.ODII_CASE_ID = act.ACTIVITYORIGINALID(+)"

Exception in component tOracleInput_1
java.lang.IllegalArgumentException: Timestamp format must be yyyy-mm-dd hh:mm:ss
at java.sql.Timestamp.valueOf(Unknown Source)
at oracle.jdbc.driver.CharCommonAccessor.getTimestamp(CharCommonAccessor.java:463)
at oracle.jdbc.driver.OracleResultSetImpl.getTimestamp(OracleResultSetImpl.java:802)
at talendproject.odii_oasis_job_0_1.ODII_OASIS_JOB.tOracleInput_1Process(ODII_OASIS_JOB.java:4383)
at talendproject.odii_oasis_job_0_1.ODII_OASIS_JOB.tOracleInput_3Process(ODII_OASIS_JOB.java:2225)
at talendproject.odii_oasis_job_0_1.ODII_OASIS_JOB.runJobInTOS(ODII_OASIS_JOB.java:6296)
at talendproject.odii_oasis_job_0_1.ODII_OASIS_JOB.main(ODII_OASIS_JOB.java:6161)
1 ACCEPTED SOLUTION

Accepted Solutions
One Star

Re: [resolved] ava.lang.IllegalArgumentException: Timestamp format must be yyyy-mm-dd

Thanks Guys.
The above query was running fine in query browser and returning results ..
But it was not working ,when i run the job..
Error is related to date column in my query..so i used to_date function and my problem resolved..
Thanks for your input..
3 REPLIES
Four Stars

Re: [resolved] ava.lang.IllegalArgumentException: Timestamp format must be yyyy-mm-dd

Hi,
I think there is a trouble in your input query. Can you execute your query in query browser ?
What is "act.ACTIVITYORIGINALID(+)"?
Use simple tJava component, use print the query using System.out.println(); Get the output and put in query browser. if it returns the query result properly, then there is no issue in query, else there is a trouble with your query.
Pl check again.
Vaibhav
Five Stars

Re: [resolved] ava.lang.IllegalArgumentException: Timestamp format must be yyyy-mm-dd

check column sequence from component schema and compare with query column sequence, if all are matching then check what are values for those date fields which are mention in query.
One Star

Re: [resolved] ava.lang.IllegalArgumentException: Timestamp format must be yyyy-mm-dd

Thanks Guys.
The above query was running fine in query browser and returning results ..
But it was not working ,when i run the job..
Error is related to date column in my query..so i used to_date function and my problem resolved..
Thanks for your input..