cast exception when import a physical inventory with a locator_id

Description

reason:
1. ICsvMapReader read all column csv file as string or date.
2. it save this value direct to gridField.
3. CalloutInventory.product get value of locator_id as integer
=> cast exception

solution:
with id column, convert it to Integer before set to gridField value.

Environment

None

Attachments

2

Activity

Show:

Carlos Ruiz February 15, 2019 at 4:00 PM

Hi ,

I think the casting problem was solved with IDEMPIERE-3800.

I committed a fix for the CostAdjustmentCalloutFactory

Regards,

Carlos Ruiz

Hiep Lq April 9, 2015 at 1:47 AM
Edited

hi . patch at this ticked is fix for cast exception.
but NPE from and it hidden cast exception. we must fix before to see cast issue.

to fix IDEMPIERE-1744, i prefer solution "pass transaction name to lookup.getDirect"
maybe make overload function of lookup.getDirect for csv import?

Carlos Ruiz April 8, 2015 at 6:03 PM

, I reproduce the issue about the NPE - but your patch didn't solve it - still throwing the same exception.

Hiep Lq March 13, 2015 at 1:06 PM

below is test case and test data:
1. in physical inventory make a record.
2. also make a lInventory Count Line line
3. export this physical inventory record
4. modify ducument no to don't duplicate (2 place)
5. re-import file
6. no error message but console has error log:
Mar 13, 2015 8:00:37 PM org.compiere.model.GridField getDefault
WARNING: (Line) - Default SQL variable parse failed: @SQL=SELECT NVL(MAX(Line),0)+10 AS DefaultValue FROM M_InventoryLine WHERE M_Inventory_ID=@M_Inventory_ID@
Mar 13, 2015 8:00:38 PM org.compiere.model.GridTab processCallout
SEVERE: start
java.lang.NullPointerException
at org.adempiere.base.callout.CostAdjustmentCalloutFactory$CostAdjustmentLineProduct.start(CostAdjustmentCalloutFactory.java:69)
at org.compiere.model.GridTab.processCallout(GridTab.java:2966)

Hiep Lq December 31, 2014 at 4:13 PM

at first look, two issue (IDEMPIERE-1752, ) has same reason,
value at header tab isn't set to environment, when do insert to detail tab
because some callout will dead.

Fixed

Details

Assignee

Reporter

Labels

Components

Affects versions

Priority

Created February 12, 2014 at 12:58 PM
Updated April 1, 2019 at 2:53 PM
Resolved February 15, 2019 at 4:00 PM