Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have flags logic as below:
(row6.paymentstate_id.equals(1)||row6.paymentstate_id.equals(6))&& row7.SKU.startsWith("DE-TB")?"Y":"N"
(row6.paymentstate_id.equals(1)||row6.paymentstate_id.equals(6))&& row7.SKU.startsWith("DE-PS")?"Y":"N"
(row6.paymentstate_id.equals(1)||row6.paymentstate_id.equals(6))&& row7.SKU.startsWith("DE-LB")?"Y":"N"
(row6.paymentstate_id.equals(1)||row6.paymentstate_id.equals(6))&&(row5.ordernumber!=null)?"Y":"N"
but because of these conditions i keep getting error
Exception in component tMap_1 (job_DM_000_Order)
java.lang.NullPointerException.
can you suggest why this is happenign and how do i handle this?
Hello Sushant,
You have to handle null value when you are executing the job. Since equals, startwith are in built routine and whenever null value comes theses are not able to compare and throughs null pointer exception.
Try this it will work
(row6.paymentstate_id.equals("") || RELATIONAL.ISNULL(row6.paymentstate_id)) && (row7.SKU.equals("") || RELATIONAL.ISNULL(row7.SKU)) ? "" : (row6.paymentstate_id.equals(1)||row6.paymentstate_id.equals(6))&& row7.SKU.startsWith("DE-TB")?"Y":"N"
Thanks
yes, that worked now. Actually I didnt handle NULL values first.