Apache Camel

From Vague Hope Wiki
Jump to: navigation, search

Known issues

@Produce without endpoint ref and ConversionNotSupportedException

org.springframework.beans.ConversionNotSupportedException: Failed to convert value of type 'org.apache.camel.impl.DefaultProducerTemplate' to required type 'org.apache.camel.Endpoint'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [org.apache.camel.impl.DefaultProducerTemplate] to required type [org.apache.camel.Endpoint]: no matching editors or conversion strategy found

  • Issue is in org.apache.camel.impl.CamelPostProcessorHelper.createInjectionProducerTemplate()
  • It passes incorrect parameters to getEndpointInjection() -> the injectionPointName should not be specified.
  • In fact, getEndpointInjection() should not even be called for null or empty endpointUri.
  • getEndpointInjection() does 'if (isEmpty(ref)) ref = injectionPointName;' then tried to call mandatoryLookup(camelContext, ref, Endpoint.class). This fails as ref (or rather injectionPointName) is not Endpoint.class. duh.