Return-Path: X-Original-To: apmail-camel-dev-archive@www.apache.org Delivered-To: apmail-camel-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DD65360A6 for ; Fri, 15 Jul 2011 08:41:47 +0000 (UTC) Received: (qmail 67154 invoked by uid 500); 15 Jul 2011 08:41:45 -0000 Delivered-To: apmail-camel-dev-archive@camel.apache.org Received: (qmail 66947 invoked by uid 500); 15 Jul 2011 08:41:30 -0000 Mailing-List: contact dev-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list dev@camel.apache.org Received: (qmail 66907 invoked by uid 99); 15 Jul 2011 08:41:23 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Jul 2011 08:41:23 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Jul 2011 08:41:21 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 0EFF158E2C for ; Fri, 15 Jul 2011 08:41:00 +0000 (UTC) Date: Fri, 15 Jul 2011 08:41:00 +0000 (UTC) From: "Claus Ibsen (JIRA)" To: dev@camel.apache.org Message-ID: <661671489.16539.1310719260057.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <2024492666.16301.1310709662126.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Resolved] (CAMEL-4231) shouldn't call BaseTypeConverterRegistry.loadTypeConverters() in OSGi container MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/CAMEL-4231?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Claus Ibsen resolved CAMEL-4231. -------------------------------- Resolution: Fixed Applied patch. Thanks Freeman > shouldn't call BaseTypeConverterRegistry.loadTypeConverters() in OSGi container > ------------------------------------------------------------------------------- > > Key: CAMEL-4231 > URL: https://issues.apache.org/jira/browse/CAMEL-4231 > Project: Camel > Issue Type: Bug > Components: camel-core > Affects Versions: 2.8.0 > Reporter: Freeman Fang > Assignee: Claus Ibsen > Priority: Blocker > Fix For: 2.8.0 > > Attachments: CAMEL-4231-new.patch, CAMEL-4231.patch > > > the Activator in camel-core take care of loading the converters from bundles, we should avoid calling BaseTypeConverterRegistry.loadTypeConverters() in OSGi container, otherwise due to no classloader was specified, see this code in OsgiTypeConverter > @Override > public Set getClassLoaders() { > // we don't need any classloaders as we use osgi service tracker instead > return Collections.emptySet(); > } > we'll get exception like > Caused by: org.apache.camel.TypeConverterLoaderException: Failed to load type converters because of: Cannot find any type converter classes from the following packages: [org.apache.servicemix.camel.converter] > at org.apache.camel.impl.converter.AnnotationTypeConverterLoader.load(AnnotationTypeConverterLoader.java:90) > at org.apache.camel.impl.converter.BaseTypeConverterRegistry.loadTypeConverters(BaseTypeConverterRegistry.java:406) > at org.apache.camel.impl.converter.DefaultTypeConverter.doStart(DefaultTypeConverter.java:42) > at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:67) > at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:54) > at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:56) > at org.apache.camel.core.osgi.OsgiTypeConverter.createRegistry(OsgiTypeConverter.java:163) -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira