// CAMEL-3614: make sure we use a bundle context which imports org.apache.camel.impl.converter package
BundleContext ctx = BundleContextUtils.getBundleContext(getClass());
if (ctx == null) {
ctx = bundleContext;
}
FactoryFinder finder = new OsgiFactoryFinderResolver(bundleContext).resolveDefaultFactoryFinder(getClassResolver());
return new OsgiTypeConverter(ctx, getInjector(), finder);
}