java.lang.ClassCastException when returning an object in a Camel direct-vm invocation.

Solution In Progress - Updated -


Running an application that connects two Camel routes using the Camel direct-vm component.
Both routes run as separate OSGi bundles.

Now, when the invocation to the direct-vm endpoint returns an object a ClassCastException is raised, similar to

13:59:11,742 | ERROR | qtp450940431-649 | DefaultErrorHandler | 130 - org.apache.camel.camel-core - 
2.10.0.redhat-60024 | Failed delivery for (MessageId: ID-mac-fritz-box-57446-1391517345547-8-2 on ExchangeId: 
ID-mac-fritz-box-57446-1391517345547-9-1). Exhausted after delivery attempt: 1 caught: 
java.lang.ClassCastException: cannot be cast to

Both, the interface Session and the implemenation class SessionImpl are part of the bundle that consumes from the direct-vm endpoint.


  • Fuse Mediation Router 2.10.x
  • JBoss Fuse 6.0

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