java.lang.ClassNotFoundException: org.apache.camel.converter.jaxb.JaxbConverter not found from bundle [org.apache.camel.camel-core] (Equinox - Karaf) -----------------------------------------------------------------------------------------------------------------------------------------------------
Key: CAMEL-2266 URL: https://issues.apache.org/activemq/browse/CAMEL-2266 Project: Apache Camel Issue Type: Bug Components: camel-osgi Affects Versions: 2.2.0 Environment: Apache Felix Karaf 1.2 - Equinox - Camel 2.2-SNAPSHOT Reporter: Charles Moulliard The example camel-example-etl cannot run on Apache Felix Karaf 1.2 - Equinox. the following error is generated {code} 12:48:24,184 | DEBUG | ExtenderThread-6 | OsgiPackageScanClassResolver | sgi.OsgiPackageScanClassResolver 79 | Loading from osgi bundle using classloader: org.eclipse.osgi.internal.baseadaptor.defaultclassloa...@10bbf6d 12:48:24,246 | DEBUG | ExtenderThread-6 | OsgiPackageScanClassResolver | sgi.OsgiPackageScanClassResolver 59 | Using only osgi bundle classloader 12:48:24,246 | DEBUG | ExtenderThread-6 | OsgiPackageScanClassResolver | sgi.OsgiPackageScanClassResolver 79 | Loading from osgi bundle using classloader: BundleDelegatingClassLoader for [camel-core (org.apache.camel.camel-core)] 12:48:24,309 | DEBUG | ExtenderThread-6 | OsgiPackageScanClassResolver | sgi.OsgiPackageScanClassResolver 59 | Using only osgi bundle classloader 12:48:24,309 | DEBUG | ExtenderThread-6 | OsgiPackageScanClassResolver | sgi.OsgiPackageScanClassResolver 79 | Loading from osgi bundle using classloader: BundleDelegatingClassLoader for [camel-core (org.apache.camel.camel-core)] 12:48:24,371 | DEBUG | ExtenderThread-6 | OsgiPackageScanClassResolver | .DefaultPackageScanClassResolver 418 | Cannot find class 'org/apache/camel/converter/jaxb/JaxbDataFormat.class' in classloader: BundleDelegatingClassLoader for [camel-core (org.apache.camel.camel-core)]. Reason: java.lang.ClassNotFoundException: java.lang.ClassNotFoundException: org.apache.camel.converter.jaxb.JaxbConverter not found from bundle [org.apache.camel.camel-core] at org.springframework.osgi.util.BundleDelegatingClassLoader.findClass(BundleDelegatingClassLoader.java:103) at org.springframework.osgi.util.BundleDelegatingClassLoader.loadClass(BundleDelegatingClassLoader.java:156) at java.lang.ClassLoader.loadClass(ClassLoader.java:252) at org.apache.camel.impl.DefaultPackageScanClassResolver.addIfMatching(DefaultPackageScanClassResolver.java:405) at org.apache.camel.osgi.OsgiPackageScanClassResolver.loadImplementationsInBundle(OsgiPackageScanClassResolver.java:121) at org.apache.camel.osgi.OsgiPackageScanClassResolver.findInOsgiClassLoader(OsgiPackageScanClassResolver.java:81) at org.apache.camel.osgi.OsgiPackageScanClassResolver.find(OsgiPackageScanClassResolver.java:60) at org.apache.camel.impl.DefaultPackageScanClassResolver.findAnnotated(DefaultPackageScanClassResolver.java:100) at org.apache.camel.osgi.OsgiAnnotationTypeConverterLoader.load(OsgiAnnotationTypeConverterLoader.java:42) at org.apache.camel.impl.converter.DefaultTypeConverter.checkLoaded(DefaultTypeConverter.java:379) at org.apache.camel.impl.converter.DefaultTypeConverter.doConvertTo(DefaultTypeConverter.java:160) at org.apache.camel.impl.converter.DefaultTypeConverter.mandatoryConvertTo(DefaultTypeConverter.java:120) at org.apache.camel.impl.converter.DefaultTypeConverter.mandatoryConvertTo(DefaultTypeConverter.java:113) ... Caused by: java.lang.ClassNotFoundException: org.apache.camel.converter.jaxb.JaxbConverter at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:494) at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410) at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:398) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:105) at java.lang.ClassLoader.loadClass(ClassLoader.java:252) at org.eclipse.osgi.internal.loader.BundleLoader.loadClass(BundleLoader.java:326) at org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:231) at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBundle.java:1193) at org.springframework.osgi.util.BundleDelegatingClassLoader.findClass(BundleDelegatingClassLoader.java:99) {code} REMARKs : - The project works fine with FELIX - Packages to be imported is defined in MANIFEST : org.apache.camel.converter.jaxb;version="[2.2.0,3.0.0)";resolution:=optional, - Resolution when bundle is deployed is ok {code} [ 77] [Resolved ] [ ] [ ] [ 60] camel-example-etl (2.2.0.SNAPSHOT) [ 78] [Resolved ] [ ] [ ] [ 60] JBoss Hibernate Annotations (3.4.0.GA) Hosts: 72 [ 80] [Active ] [ ] [ ] [ 60] JBoss Hibernate Common Annotations (3.3.0.ga) [ 81] [Active ] [ ] [ ] [ 60] Apache ServiceMix Bundles: commons-dbcp-1.2.2 (1.2.2.3) [ 82] [Active ] [ ] [ ] [ 60] camel-jaxb (2.2.0.SNAPSHOT) ka...@root> packages: packages:exports packages:imports ka...@root> packages:imports 77 OSGi System Bundle (0): javax.xml.bind.annotation; version="0.0.0" OPS4J Pax Logging - API (27): org.apache.commons.logging; version="1.1.1" camel-core (43): org.apache.camel.model; version="2.2.0.SNAPSHOT" camel-core (43): org.apache.camel.util; version="2.2.0.SNAPSHOT" camel-core (43): org.apache.camel; version="2.2.0.SNAPSHOT" Spring Transaction (50): org.springframework.transaction.support; version="2.5.6.SEC01" camel-spring-osgi (51): org.apache.camel.spring; version="2.2.0.SNAPSHOT" Apache ServiceMix Specs :: JAVA PERSISTENCE API 1.4 (52): javax.persistence; version="1.1.1" Apache ServiceMix Bundles: openjpa-1.2.1 (62): org.apache.openjpa.enhance; version="1.2.1" Apache ServiceMix Bundles: openjpa-1.2.1 (62): org.apache.openjpa.util; version="1.2.1" Spring ORM (63): org.springframework.orm.jpa; version="2.5.6.SEC01" Spring ORM (63): org.springframework.orm.jpa.vendor; version="2.5.6.SEC01" camel-jpa (64): org.apache.camel.component.jpa; version="2.2.0.SNAPSHOT" wrap_mvn_hsqldb_hsqldb_1.8.0.7 (65): org.hsqldb; version="0.0.0" camel-juel (76): org.apache.camel.language.juel; version="2.2.0.SNAPSHOT" camel-jaxb (82): org.apache.camel.converter.jaxb; version="2.2.0.SNAPSHOT" {code} -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.