null pointer exception in java service.

Hi,
I had a java service which was having 5 inputs.when i checked the java code i saw that one of the input field was no where used. so i made the input type as optional and deleted the mapping.now when i run the service im getting java.lang.NullPointerException. i tried deleting the field all together from the input /output tab. result is still the same

Any suggestion how to resolve it???

Thanks
Nandini

Hard to say without seeing the Java code. Can you share it?

Sorry i cannot share the code. I tried running the java service separately. In the input window that pops up if i do not chk the ‘include empty space for Sring type’ i get the java.lang.NullPointerException error . But if i chk it, the service runs successfully. Any idea how to incorporate it while invoking the java serive from other service…???

Thanks
Nandini

The code is not handling the fact that the “optional” variable is not present. You need to change the code to support that.