Skip to Content
0
Former Member
Apr 08, 2009 at 04:50 AM

NumberFormatException while Updation using MDM4J

16 Views

Hi All,

We are trying to perform Update functionality using MDM4J APIs, but not able to move furthur as we are getting an exception in the code.

Following is the code we are using:

try {

A2iFields a2iFields = new A2iFields();

A2iField statusField = new A2iField("Current_Status");

Value statusVal = new Value(wdContext.currentVn_Status_changeElement.getVa_Changed_Curr_status());

statusField.SetValue(statusVal);

a2iFields.Add(statusField);

A2iField SubstatusField = new A2iField("Current_SubStatus");

Value SubstatusVal = new Value(wdContext.currentVn_Status_changeElement ().getVa_Changed_SubSts());

SubstatusField.SetValue(SubstatusVal);

a2iFields.Add(SubstatusField);

A2iField ProstatusField = new A2iField("Proposal_status");

Value ProstatusVal = new Value(wdContext.currentVn_Status_changeElement().getVa_Changed_Curr_status());

ProstatusField.SetValue(ProstatusVal);

a2iFields.Add(ProstatusField);

A2iField ProSubstatusField = new A2iField("Proposal_SubStatus");

Value ProSubstatusVal = new Value(wdContext.currentVn_Status_changeElement().getVa_Changed_SubSts());

ProSubstatusField.SetValue(ProSubstatusVal);

a2iFields.Add(ProSubstatusField);

A2iIntArray recIds = new A2iIntArray();

int recID = wdThis .wdGetCO_Resource_Availibility_CheckController() .getRecordID(

"Resource_Availibility_Check","Satyam_ID",associateID);

recIds.Add(recID);

ResultSetDefinition rsd = new ResultSetDefinition("Resource_Availibility_Check");

A2iResultSet rs = catalog.GetRecordsById(rsd, recIds);

int updateResult = catalog.UpdateRecord("Resource_Availibility_Check",

recID,rs.GetChangeStampAt(0),a2iFields);

On executing getting the following exception:

java.lang.NumberFormatException: For input string: "Others"

at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)

at java.lang.Integer.parseInt(Integer.java:468)

at java.lang.Integer.parseInt(Integer.java:518)

at a2i.core.Value.ConvertToType(Unknown Source)

at com.a2i.xcat.internal.conversion.StructsToStructsUtil.ConvertFieldsToModifiedFields(Unknown Source)

at a2i.common.CatalogData.UpdateRecord(Unknown Source)

at a2i.common.CatalogData.UpdateRecord(Unknown Source)

at com.satyam.rf.rac.view.VW_Associate_Selection.onActionShadow(VW_Associate_Selection.java:2032)

Line 2032 is teh line of the UpdateRecord method.

Please suggest what could be the problem in this code.

Thanks in Advance,

Becky.