camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <>
Subject Re: Loading TypeConverters in OSGi with Camel 2.0 RC1
Date Mon, 24 Aug 2009 15:34:33 GMT
On Mon, Aug 24, 2009 at 4:38 PM, Martin Krasser<> wrote:
> Hi,
> I'm playing with Camel 2.0 in OSGi (Equinox) and found that TypeConverters
> are loaded by camel-osgi only from bundles that have been STARTED. The
> reason why TypeConverter loading from RESOLVED bundles doesn't work is that
> the OsgiPackageScanClassResolver relies on a BundleContext which is null for
> bundles in RESOLVED state (as required by the OSGi spec 4.1 section 4.3.17).
> This leads to a NullPointerException. If it should be possible by design
> that TypeConverters can also be loaded from bundles in RESOLVED state,
> please let me know then I'll try to create a patch.

That would be fantastic, as it does cause a bit of pain as you need to
have bundles started and loading in correct order
for all the type converter stuff to work properly.

G. Nodet from Apache Serviemix / Karaf also had some notes on this as well.
There is a dicusssion on Camel Dev about it - title = Converter
discover in OSGi.

In the longer run I would like to rework the compoent loading to be
more isolated and confined to per component base.
So eg type converters are loaded as part of a component and not as now
the only one discovered by classpath scanning at first need.


> Btw, great work that you all did for Camel 2.0. It's a pleasure to work with
> it!

Thanks. Hope your upgrade in IPF did go well.

> Thanks,
> Martin

Claus Ibsen
Apache Camel Committer

Open Source Integration:

View raw message