Hi,
I am working on MDM Java API on SP05 server (5.5.42.57) , performing a search to retrieve a main table record having fields of type "Lookup[Qualified Flat](multi-valued)" and Lookup[Flat] fields apart from general text fields.
<b>RetrieveLimitedRecordsCommand on execute is throwing a NullPointerException</b>;
//Instantiate search command
RetrieveLimitedRecordsCommand retrieveLimitedRecordsCommand =
new RetrieveLimitedRecordsCommand(con);
retrieveLimitedRecordsCommand.setSession(
authenticateUserSessionCommand.getSession());
//Supply the result definitions and the search as argument to the command.
retrieveLimitedRecordsCommand.setResultDefinition(rd);
retrieveLimitedRecordsCommand.setSearch(search);
retrieveLimitedRecordsCommand.setSupportingResultDefinitions(supportingRd);
//Execute the command
try
{
System.out.println("Inside the try block");
<b>retrieveLimitedRecordsCommand.execute();</b>
<b>I get the error as</b>
<i>"Inside the try block
java.lang.NullPointerException
at com.sap.mdm.internal.commands.ResultDefinitionHelper.convertFrom(ResultDefinitionHelper.java:32)
at com.sap.mdm.internal.commands.ResultDefinitionHelper.convertFrom(ResultDefinitionHelper.java:45)
at com.sap.mdm.data.commands.RetrieveLimitedRecordsCommand.getProtoTableRequest(RetrieveLimitedRecordsCommand.java:189)
at com.sap.mdm.data.commands.AbstractRetrieveLimitedRecordsCommand.execute(AbstractRetrieveLimitedRecordsCommand.java:126)
at com.sap.mdm.data.commands.RetrieveLimitedRecordsCommand.execute(RetrieveLimitedRecordsCommand.java:157)
at com.sap.mdm.examples.CreateConnection.<b>searchKeyword</b>(CreateConnection.java:347)
at com.sap.mdm.examples.CreateConnection.main(CreateConnection.java:107)
java.lang.NullPointerException"</i>
"<b>supportingRd</b>" resultDefinition is an array of resultDefinition's of the lookup table and QualifiedLookup tables is set properly, immidietly after entering the try block and printing the message a fatal exception is thrown,
<b>searchKeyword</b> is the method in which the above code executes
help me resolve this 😕
Paras