java.lang.NumberFormatException error

java.lang.NumberFormatException error

Hi,
I am using Talend for the first time and upserting some data from Oracle to Salesforce. While using the tMap and working with date fields I am getting the error

java.lang.NumberFormatException: For input string: "25/0"
at java.lang.NumberFormatException.forInputString(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at routines.system.FastDateParser$DateParser.parse(FastDateParser.java:127)
at java.text.DateFormat.parse(Unknown Source)
at routines.TalendDate.parseDate(TalendDate.java:881)
at routines.TalendDate.parseDate(TalendDate.java:839)
at ph.phupload_0_1.PHUpload.tOracleInput_4Process(PHUpload.java:3483)
at ph.phupload_0_1.PHUpload.tSalesforceConnection_1Process(PHUpload.java:5228)
at ph.phupload_0_1.PHUpload.tSetProxy_1Process(PHUpload.java:5373)
at ph.phupload_0_1.PHUpload.runJobInTOS(PHUpload.java:5594)
at ph.phupload_0_1.PHUpload.main(PHUpload.java:5451)

Exception in component tMap_1
java.lang.RuntimeException: java.text.ParseException: Unparseable date: "25/06/2014"
at routines.TalendDate.parseDate(TalendDate.java:895)
at routines.TalendDate.parseDate(TalendDate.java:839)
at ph.phupload_0_1.PHUpload.tOracleInput_4Process(PHUpload.java:3483)
at ph.phupload_0_1.PHUpload.tSalesforceConnection_1Process(PHUpload.java:5228)
at ph.phupload_0_1.PHUpload.tSetProxy_1Process(PHUpload.java:5373)
at ph.phupload_0_1.PHUpload.runJobInTOS(PHUpload.java:5594)
at ph.phupload_0_1.PHUpload.main(PHUpload.java:5451)

Caused by: java.text.ParseException: Unparseable date: "25/06/2014"
at java.text.DateFormat.parse(Unknown Source)
at routines.TalendDate.parseDate(TalendDate.java:881)

Please suggest,
Thanks.
Moderator

Re: java.lang.NumberFormatException error

Hi,
There is data format issue in your job. Do you want to convert your date field? 
Could you please post your job setting screenshots into forum? In this way, we can see if there is any wrong setting in your tMap component. More information will be preferred.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.

Re: java.lang.NumberFormatException error

Hi Sabrina,
Thanks for replying. Yes, I am facing issues converting the date field. below is the screen shot of the tMap.

Re: java.lang.NumberFormatException error

I also get the below error if I test the expression TalendDate.parseDate("yyyy-MM-dd",row8.START_DATE)
java.lang.NumberFormatException: For input string: "null"
Thanks,
Moderator

Re: java.lang.NumberFormatException error

Hi,
Is there any "null" string in your row8.START_DATE? If so, you can try these code
row8.START_DATE

.equals("null") ? "" : TalendDate.parseDate("yyyy-MM-dd",row8.START_DATE)

Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Downloads and Trials

Test drive Talend's enterprise products.

Downloads