-
Bug
-
Resolution: Done
-
Major
-
fuse-7.2
-
None
-
%
-
When 'fields' header is not specified on EAP, we can see this error:
Caused by: org.apache.camel.RuntimeCamelException: Error invoking getCompanyById with {company_id=2414183, fields=}: Value for fields is not specified at org.apache.camel.util.component.ApiMethodHelper.invokeMethod(ApiMethodHelper.java:514) at org.apache.camel.util.component.AbstractApiProducer.doInvokeMethod(AbstractApiProducer.java:120) at org.apache.camel.component.linkedin.LinkedInProducer.doInvokeMethod(LinkedInProducer.java:43) at org.apache.camel.util.component.AbstractApiProducer$1.run(AbstractApiProducer.java:86) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) ... 3 more Caused by: java.lang.IllegalArgumentException: Value for fields is not specified at org.apache.cxf.jaxrs.client.AbstractClient.convertParamValue(AbstractClient.java:818) at org.apache.cxf.jaxrs.client.ClientProxyImpl.getPathParamValues(ClientProxyImpl.java:452) at org.apache.cxf.jaxrs.client.ClientProxyImpl.invoke(ClientProxyImpl.java:179) at com.sun.proxy.$Proxy95.getCompanyById(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.camel.util.component.ApiMethodHelper.invokeMethod(ApiMethodHelper.java:506) ... 10 more
The fields option should be optional. If it's not specified, it should return a default set of fields. The option behaves correctly in Karaf and spring-boot, the problem is only in EAP.