Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I want to convert string to date, but error is shown:
Exception in component tMap_4 (testbrna)
java.lang.NullPointerException
at java.text.SimpleDateFormat.parse(Unknown Source)
at java.text.DateFormat.parse(Unknown Source)
at routines.TalendDate.parseDate(TalendDate.java:928)
at routines.TalendDate.parseDate(TalendDate.java:886)
at test.testbrna_0_1.testbrna.tFileInputExcel_4Process(testbrna.java:1620)
Kindly help. Thank you in advance
Hello ! The NPE (Nullpointer exception) is telling you that your current output data is null. Which means : TalendDate.parseDate("M/d/y", row4.Date) is null. Try to catch the error output like this
You will see which lines is empty. Then you have to debug the input of your flow to fix the null date
Hi,
You should also consider using the TalendDate.isDate() method in the tMap or a tSchemaComplianceCheck component prior to the tMap to filter out rows that don't match the format you're expecting.