camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Charles Moulliard <cmoulli...@gmail.com>
Subject Big problem with classloading of Camel 2.1-SNAPSHOT top of ServiceMix 4.1-SNAPSHOT or Felix 1.1.0-SNAPSHOT
Date Thu, 19 Nov 2009 10:29:58 GMT
Here is the error that I have when deploying the following spring
config file on SMX 4

<beans xmlns="http://www.springframework.org/schema/beans"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:osgi="http://www.springframework.org/schema/osgi"
  xsi:schemaLocation="http://www.springframework.org/schema/beans

http://www.springframework.org/schema/beans/spring-beans.xsd
                      http://www.springframework.org/schema/osgi
                      http://www.springframework.org/schema/osgi/spring-osgi.xsd
                      http://camel.apache.org/schema/spring
                      http://camel.apache.org/schema/spring/camel-spring.xsd">

    <bean id="active-mq"
class="org.apache.activemq.camel.component.ActiveMQComponent" />

    <osgi:service id="osgiqueuingservice" ref="active-mq"
interface="org.apache.camel.Component"/>
		
</beans>

karaf@root> Exception in thread "SpringOsgiExtenderThread-17"
org.springframework.beans.factory.BeanCreationException: Error
creating bean with name '
active-mq' defined in URL
[bundle://146.0:0/META-INF/spring/osgi-queuingservice.xml]:
Instantiation of bean failed; nested exception is java.lang.NoCl
assDefFoundError: org/apache/camel/MultipleConsumersSupport
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:883)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:839
)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
        at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
        at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$1600(AbstractDelegatedExecutionApplicationCont
ext.java:69)
        at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.ja
va:355)
        at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
        at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplication
Context.java:320)
        at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(Dependen
cyWaiterApplicationContextExecutor.java:136)
        at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.NoClassDefFoundError:
org/apache/camel/MultipleConsumersSupport
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
        at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.findClass(ModuleImpl.java:1787)
        at org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:682)
        at org.apache.felix.framework.ModuleImpl.access$100(ModuleImpl.java:60)
        at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1650)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
        at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.findClass(ModuleImpl.java:1787)
        at org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:682)
        at org.apache.felix.framework.ModuleImpl.access$100(ModuleImpl.java:60)
        at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1650)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
        at java.lang.Class.getDeclaredConstructors0(Native Method)
        at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
        at java.lang.Class.getConstructor0(Class.java:2699)
        at java.lang.Class.getDeclaredConstructor(Class.java:1985)
        at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:54)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:877)
        ... 18 more
Caused by: java.lang.ClassNotFoundException:
org.apache.camel.MultipleConsumersSupport
        at org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:738)
        at org.apache.felix.framework.ModuleImpl.access$100(ModuleImpl.java:60)
        at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1650)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
        at org.apache.felix.framework.ModuleImpl.getClassByDelegation(ModuleImpl.java:598)
        at org.apache.felix.framework.searchpolicy.R4Wire.getClass(R4Wire.java:108)
        at org.apache.felix.framework.ModuleImpl.searchImports(ModuleImpl.java:1364)
        at org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:677)
        at org.apache.felix.framework.ModuleImpl.access$100(ModuleImpl.java:60)
        at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1650)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
        ... 40 more
packages:

Here is the MANIFEST file defintion of the bundle 146

Manifest-Version: 1.0
Bundle-Version: 1.0.0.SNAPSHOT
Build-Jdk: 1.6.0_16
Built-By: Charlesm
Tool: Bnd-0.0.255
Bnd-LastModified: 1258625957937
Bundle-Name: Camel Queuing Service
Spring-Context: *;publish-context:=false;create-asynchronously:=true
Bundle-ManifestVersion: 2
Created-By: Apache Maven Bundle Plugin
Import-Package: org.apache.activemq.camel.component;version="[5.3.0,5.
 4.0)",org.apache.camel;version="[2.0,2.2)",org.apache.camel.component
 ;version="[2.0,2.2)",org.apache.camel.component.jms;version="[2.0,2.2
 )"

and packages exported / imported of SMX4

karaf@root> packages:imports 146
activemq-camel (32): org.apache.activemq.camel.component; version=5.3.0
camel-spring-osgi (60): org.apache.camel.component; version=2.1.0.SNAPSHOT
camel-core (72): org.apache.camel; version=2.1.0.SNAPSHOT
camel-jms (120): org.apache.camel.component.jms; version=2.1.0.SNAPSHOT
karaf@root> packages:

packages:exports    packages:imports
karaf@root> packages:exports  72
camel-core (72): org.apache.camel.view; version=2.1.0.SNAPSHOT
camel-core (72): org.apache.camel.model.loadbalancer; version=2.1.0.SNAPSHOT
camel-core (72): org.apache.camel.language.simple; version=2.1.0.SNAPSHOT
camel-core (72): org.apache.camel.component.seda; version=2.1.0.SNAPSHOT
camel-core (72): org.apache.camel.model; version=2.1.0.SNAPSHOT
camel-core (72): org.apache.camel.language.constant; version=2.1.0.SNAPSHOT
camel-core (72): org.apache.camel.converter.jaxp; version=2.1.0.SNAPSHOT
camel-core (72): org.apache.camel.util.jndi; version=2.1.0.SNAPSHOT
camel-core (72): org.apache.camel.component.dataset; version=2.1.0.SNAPSHOT
camel-core (72): org.apache.camel.component.timer; version=2.1.0.SNAPSHOT
camel-core (72): org.apache.camel.management; version=2.1.0.SNAPSHOT
camel-core (72): org.apache.camel.language.xpath; version=2.1.0.SNAPSHOT
camel-core (72): org.apache.camel.processor.validation; version=2.1.0.SNAPSHOT
camel-core (72): org.apache.camel.processor.idempotent; version=2.1.0.SNAPSHOT
camel-core (72): org.apache.camel.model.dataformat; version=2.1.0.SNAPSHOT
camel-core (72): org.apache.camel.processor.resequencer; version=2.1.0.SNAPSHOT
camel-core (72): org.apache.camel.language.header; version=2.1.0.SNAPSHOT
camel-core (72): org.apache.camel.impl.scan; version=2.1.0.SNAPSHOT
camel-core (72): org.apache.camel.model.language; version=2.1.0.SNAPSHOT
camel-core (72): org.apache.camel.management.event; version=2.1.0.SNAPSHOT
camel-core (72): org.apache.camel.management.mbean; version=2.1.0.SNAPSHOT
camel-core (72): org.apache.camel.component.browse; version=2.1.0.SNAPSHOT
camel-core (72): org.apache.camel.language; version=2.1.0.SNAPSHOT
camel-core (72): org.apache.camel.builder; version=2.1.0.SNAPSHOT
camel-core (72): org.apache.camel.impl; version=2.1.0.SNAPSHOT
camel-core (72): org.apache.camel.util.concurrent; version=2.1.0.SNAPSHOT
camel-core (72): org.apache.camel.processor.interceptor; version=2.1.0.SNAPSHOT
camel-core (72): org.apache.camel.component.mock; version=2.1.0.SNAPSHOT
camel-core (72): org.apache.camel.component.bean; version=2.1.0.SNAPSHOT
camel-core (72): org.apache.camel.processor.exceptionpolicy;
version=2.1.0.SNAPSHOT
camel-core (72): org.apache.camel.builder.xml; version=2.1.0.SNAPSHOT
camel-core (72): org.apache.camel.language.bean; version=2.1.0.SNAPSHOT
camel-core (72): org.apache.camel.converter.stream; version=2.1.0.SNAPSHOT
camel-core (72): org.apache.camel.model.config; version=2.1.0.SNAPSHOT
camel-core (72): org.apache.camel.util; version=2.1.0.SNAPSHOT
camel-core (72): org.apache.camel.impl.converter; version=2.1.0.SNAPSHOT
camel-core (72): org.apache.camel.converter; version=2.1.0.SNAPSHOT
camel-core (72): org.apache.camel.processor.loadbalancer; version=2.1.0.SNAPSHOT
camel-core (72): org.apache.camel.component.ref; version=2.1.0.SNAPSHOT
camel-core (72): org.apache.camel.spi; version=2.1.0.SNAPSHOT
camel-core (72): org.apache.camel.language.tokenizer; version=2.1.0.SNAPSHOT
camel-core (72): org.apache.camel.component.direct; version=2.1.0.SNAPSHOT
camel-core (72): org.apache.camel; version=2.1.0.SNAPSHOT
camel-core (72): org.apache.camel.language.property; version=2.1.0.SNAPSHOT
camel-core (72): org.apache.camel.processor; version=2.1.0.SNAPSHOT
camel-core (72): org.apache.camel.processor.aggregate; version=2.1.0.SNAPSHOT
camel-core (72): org.apache.camel.component.vm; version=2.1.0.SNAPSHOT
camel-core (72): org.apache.camel.component.file.strategy;
version=2.1.0.SNAPSHOT
camel-core (72): org.apache.camel.component.file; version=2.1.0.SNAPSHOT
camel-core (72): org.apache.camel.component.log; version=2.1.0.SNAPSHOT
karaf@root>

karaf@root> osgi:list | grep camel
[  32] [Active     ] [            ] [       ] [   60] activemq-camel (5.3.0)
[  60] [Active     ] [            ] [       ] [   60]
camel-spring-osgi (2.1.0.SNAPSHOT)
[  72] [Active     ] [            ] [       ] [   60] camel-core
(2.1.0.SNAPSHOT)
[  73] [Active     ] [            ] [       ] [   60] camel-bindy
(2.1.0.SNAPSHOT)
[ 109] [Active     ] [            ] [       ] [   60] camel-cxf (2.1.0.SNAPSHOT)
[ 120] [Active     ] [            ] [       ] [   60] camel-jms (2.1.0.SNAPSHOT)


WHERE IS THE ISSUE ?

Charles Moulliard
Senior Enterprise Architect
Apache Camel Committer

*****************************
blog : http://cmoulliard.blogspot.com
twitter : http://twitter.com/cmoulliard
Linkedlin : http://www.linkedin.com/in/charlesmoulliard

Apache Camel Group :
http://www.linkedin.com/groups?home=&gid=2447439&trk=anet_ug_hm

Mime
View raw message