1

I've the following dependency to 3.7.2:

<groupId>org.apache.camel.springboot</groupId>
<artifactId>camel-spring-boot-dependencies</artifactId>
<version>3.7.2</version>

I've this in the code:

fluentProducerTemplate.to("direct:myenpoint");
fluentProducerTemplate.send();

This code was working until the upgrade, but now it throws:

java.lang.IllegalArgumentException: No endpoint configured on FluentProducerTemplate. You can configure an endpoint with to(uri)`

Now I'm not able to figure why it's complaining about configuring endpoint as endpoint is clearly set in to(endpoint) call. I couldn't find anything in their documentation.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
John Doe
  • 143
  • 2
  • 13

2 Answers2

0

I found that endpoint has to be set at fluentProducerTemplate.setDefaultEndpoint(startingEndpoint);

The error message was misleading. And, I am not sure why to (endpoint) is still there.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
John Doe
  • 143
  • 2
  • 13
0

It's a fluent builder, so you should use it in a style like this:

template.to("xxx").send()
Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Claus Ibsen
  • 56,060
  • 7
  • 50
  • 65