Hi again,
still migrating my camel 2.5 route to 2.8.1.
I ran into this problem this morning:
When i try to start camel with this route configuration:

[..]
.choice()
            .when()
                    .xpath( "count(//foo_write:bar) = 1", ns)
                    .wireTap( "log:WriteRequestRecieved?level=INFO").end()
                    .wireTap(
"log:WriteRequestRecieved?showHeaders=true&level=DEBUG" ).end()
                    .setProperty(RoutingConstants.REQUEST_MESSAGE_ID,
XPathBuilder.xpath( "foo_write:bar/@message-id", String.class ).namespaces(
ns ))
                    .to( "direct:Write" )
           .when()
                .xpath( "count(//foo_read:bar) = 1", readNs )
                    .wireTap( "log:ReadRequestRecieved?level=INFO" ).end()
                    .setProperty(RoutingConstants.REQUEST_MESSAGE_ID,
XPathBuilder.xpath( "foo_read:bar/@message-id", String.class ).namespaces(
readNs ))
                    .to( "direct:Read" )
           .otherwise()
               .wireTap(
"log:UnspecifiedRequestRecieved?showBody=false&level=INFO" ).end()
               .stop()
       .end()
[..]

I get a  java.lang.ClassCastException:
org.apache.camel.model.OtherwiseDefinition cannot be cast to
org.apache.camel.model.ChoiceDefinition
Why is this so? Do i have to close the "when" block in a special way?

Thanks

 martin

--
View this message in context: 
http://camel.465427.n5.nabble.com/OtherwiseDefinition-cannot-be-cast-to-org-apache-camel-model-ChoiceDefinition-tp4867692p4867692.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to