Compile fails with .setHeader().constant().otherwise() sequence

Solution Verified - Updated -

Issue

In the .configure() method, compile failed with this ".setHeader().constant().otherwise()" sequence.

.setHeader("greeting").constant("Hello World")
.otherwise()

log

org.joor.ReflectException: Compilation error:
/sample.java:16: error: cannot find symbol
.otherwise()
^
  symbol:   method otherwise()
  location: class org.apache.camel.model.ProcessorDefinition<org.apache.camel.model.ChoiceDefinition>

Environment

  • Red Hat Fuse
  • Camel products
    • Camel for SpringBoot
    • Camel Extensions for Quarkus
    • Camel-K

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content