VERIFIED SOLUTION i
X

Resolve Spectrum error: "java.lang.NumberFormatException: empty String" when using an external web service

Issue

When using an external web service to geocode the following error in the wrapper.log is generated:
 
INFO | jvm 1 | 2014/07/03 10:39:27 | java.lang.RuntimeException: Exception thrown by Stage:VictorGAG in dataflow VO_Geocoder: com.g1.dcg.stage.StageException: Exceed number of retry attempts. Last exception was class org.springframework.ws.soap.client.SoapFaultClientException caught: Exception thrown by Stage:AfricaWest in dataflow GeocodeAddressAllCountries: com.g1.dcg.stage.StageException: java.lang.NumberFormatException: empty String 
INFO | jvm 1 | 2014/07/03 10:39:27 | at com.pb.spectrum.platform.server.runtime.core.dataflow.engine.impl.DataflowImpl.run_aroundBody0(DataflowImpl.java:372) ~[spectrum-server-runtime-core-9.1.jar:9.1] 
INFO | jvm 1 | 2014/07/03 10:39:27 | at com.pb.spectrum.platform.server.runtime.core.dataflow.engine.impl.DataflowImpl.run_aroundBody1$advice(DataflowImpl.java:98) ~[spectrum-server-runtime-core-9.1.jar:9.1] 
INFO | jvm 1 | 2014/07/03 10:39:27 | at com.pb.spectrum.platform.server.runtime.core.dataflow.engine.impl.DataflowImpl.run(DataflowImpl.java:315) ~[spectrum-server-runtime-core-9.1.jar:9.1] 
INFO | jvm 1 | 2014/07/03 10:39:27 | at com.pb.spectrum.platform.server.runtime.core.dataflow.impl.DataflowProcessImpl.run(DataflowProcessImpl.java:192) ~[spectrum-server-runtime-core-9.1.jar:9.1] 
INFO | jvm 1 | 2014/07/03 10:39:27 | at com.pb.spectrum.platform.server.runtime.core.job.impl.JobProcessImpl.run_aroundBody0(JobProcessImpl.java:109) [spectrum-server-runtime-core-9.1.jar:9.1] 
INFO | jvm 1 | 2014/07/03 10:39:27 | at com.pb.spectrum.platform.server.runtime.core.job.impl.JobProcessImpl.run_aroundBody1$advice(JobProcessImpl.java:135) [spectrum-server-runtime-core-9.1.jar:9.1] 
INFO | jvm 1 | 2014/07/03 10:39:27 | at com.pb.spectrum.platform.server.runtime.core.job.impl.JobProcessImpl.run(JobProcessImpl.java:1) [spectrum-server-runtime-core-9.1.jar:9.1] 
INFO | jvm 1 | 2014/07/03 10:39:27 | at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [na:1.7.0_17] 
INFO | jvm 1 | 2014/07/03 10:39:27 | at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) [na:1.7.0_17] 
INFO | jvm 1 | 2014/07/03 10:39:27 | at java.util.concurrent.FutureTask.run(FutureTask.java:166) [na:1.7.0_17] 
INFO | jvm 1 | 2014/07/03 10:39:27 | at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_17] 
INFO | jvm 1 | 2014/07/03 10:39:27 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_17] 
INFO | jvm 1 | 2014/07/03 10:39:27 | at java.lang.Thread.run(Thread.java:722) [na:1.7.0_17] 
INFO | jvm 1 | 2014/07/03 10:39:27 | Caused by: com.g1.dcg.stage.StageException: Exceed number of retry attempts. Last exception was class org.springframework.ws.soap.client.SoapFaultClientException caught: Exception thrown by Stage:AfricaWest in dataflow GeocodeAddressAllCountries: com.g1.dcg.stage.StageException: java.lang.NumberFormatException: empty String 
INFO | jvm 1 | 2014/07/03 10:39:27 | at com.pb.spectrum.platform.server.runtime.core.webservice.external.impl.WebServiceStage.execute(WebServiceStage.java:167) ~[spectrum-server-runtime-core-9.1.jar:9.1] 
INFO | jvm 1 | 2014/07/03 10:39:27 | at com.pb.spectrum.platform.server.runtime.core.dataflow.engine.impl.StageRunner.call_aroundBody0(StageRunner.java:204) ~[spectrum-server-runtime-core-9.1.jar:9.1] 
INFO | jvm 1 | 2014/07/03 10:39:27 | at com.pb.spectrum.platform.server.runtime.core.dataflow.engine.impl.StageRunner.call_aroundBody1$advice(StageRunner.java:135) ~[spectrum-server-runtime-core-9.1.jar:9.1] 
INFO | jvm 1 | 2014/07/03 10:39:27 | at com.pb.spectrum.platform.server.runtime.core.dataflow.engine.impl.StageRunner.call(StageRunner.java:1) ~[spectrum-server-runtime-core-9.1.jar:9.1] 
INFO | jvm 1 | 2014/07/03 10:39:27 | at edu.emory.mathcs.backport.java.util.concurrent.FutureTask.run(FutureTask.java:178) ~[backport-util-concurrent-3.1.jar:na] 
INFO | jvm 1 | 2014/07/03 10:39:27 | at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1061) ~[backport-util-concurrent-3.1.jar:na] 
INFO | jvm 1 | 2014/07/03 10:39:27 | at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:575) ~[backport-util-concurrent-3.1.jar:na] 
INFO | jvm 1 | 2014/07/03 10:39:27 | ... 1 common frames omitted 
INFO | jvm 1 | 2014/07/03 10:39:27 | Caused by: com.pb.spectrum.platform.server.runtime.core.webservice.external.impl.WebServiceException: class org.springframework.ws.soap.client.SoapFaultClientException caught: Exception thrown by Stage:AfricaWest in dataflow GeocodeAddressAllCountries: com.g1.dcg.stage.StageException: java.lang.NumberFormatException: empty String 
INFO | jvm 1 | 2014/07/03 10:39:27 | at com.pb.spectrum.platform.server.runtime.core.webservice.external.impl.wsdl.SoapWebServiceHandler.doSendAndReceive(SoapWebServiceHandler.java:136) ~[spectrum-server-runtime-core-9.1.jar:9.1] 
INFO | jvm 1 | 2014/07/03 10:39:27 | at com.pb.spectrum.platform.server.runtime.core.webservice.external.impl.WebServiceStage.execute(WebServiceStage.java:142) ~[spectrum-server-runtime-core-9.1.jar:9.1] 
INFO | jvm 1 | 2014/07/03 10:39:27 | ... 7 common frames omitted 

Cause

The web service (in this case GeocodeAddressAllCountries) is expecting a value for an input field that it has not received.

When configuring an external web service in the Management Console, all of the fields are left exposed by default. If the fields that are not required are left exposed, the error will occur when they are not populated by the input data.

Resolution

UPDATED: September 8, 2017


To resolve ensure only the required fields are exposed by following these steps:
  1. Open the Management Console
  2. Go to Resources > External Web Services > highlight the web service and click Modify
  3. On the Request tab ensure that only the fields you require are exposed as shown below
 
User-added image


Even when exposing only the required fields this error can still occur if a record in the input data is missing a certain field. To tackle this repeat the same steps but ensure to mark the field to allow null values.

It will be up to the user which fields should allow null values. For example, there could still be a match if the County field receives a null value, but fails to find a match should the Country field receive a null value when using the GeocodeAddressAllCountries service.

Environment Details

product affected: Spectrum™

Downloads

  • No Downloads