camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Raul Kripalani <>
Subject [HEADS UP] Classloader mixup with Jetty consumers
Date Sun, 21 Oct 2012 21:55:00 GMT

I've come across what I consider a critical bug in camel-jetty, given the
installed base of that component.

When multiple Camel Contexts expose camel-jetty consumers on the same TCP
port, they share the underlying Jetty Connector. As a side effect of this, the
route runs with the classloader of the bundle/WAR that happened to create
the Connector first, i.e. the Camel Context whose Jetty consumer started

The issue shows up in OSGi environments or Application Servers or
containers that provide per-application or per-deployable classloaders.
Classloader isolation is effectively broken, so if bundle A and bundle B
both have Jetty consumers on port 9010 and bundle A starts first, the
requests routed to B will have the class loader from bundle A as the TCCL.
Thus, class resolution performed by B may fail if the OSGi imports are not

The issue is logged under
I committed a fix to trunk along with an OSGi Integration test on the
following revision:

Would someone mind taking a quick look at this fix? If all seems correct,
I'll backport onto 2.9.x and 2.10.x.


*Raúl Kripalani*
Apache Camel Committer
Enterprise Architect, Program Manager, Open Source Integration specialist | | twitter: @raulvk <>

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message