camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Charles Moulliard <cmoulli...@gmail.com>
Subject issue with mvn camel:run and spring 3.0.3 - camel 2.5-SNAPSHOT
Date Tue, 24 Aug 2010 08:02:29 GMT
Hi,

I have created a small camel - spring project that I launch using the
command mvn camel:run. Everything is started correctly (I mean that the
camel-spring.xml context file is retrieved) but I get a NoClassDefError even
if spring-context jar is declared in the classpath

[INFO] Classpath =
[file:/C:/chm/dvlpt/java/apache/camel/tests/camel-itest-activemq-highvolume/target/classes/,
file:/C:/chm/repository/org/apache/camel/camel-core/2.5-SN
APSHOT/camel-core-2.5-SNAPSHOT.jar,
file:/C:/chm/repository/commons-logging/commons-logging-api/1.1/commons-logging-api-1.1.jar,
file:/C:/chm/repository/org/fusesource/co
mmonman/commons-management/1.0/commons-management-1.0.jar,
file:/C:/chm/repository/org/apache/camel/camel-spring/2.5-SNAPSHOT/camel-spring-2.5-SNAPSHOT.jar,
file:/C:/chm/
repository/org/springframework/spring-context/3.0.3.RELEASE/spring-context-3.0.3.RELEASE.jar,
file:/C:/chm/repository/org/springframework/spring-aop/3.0.3.RELEASE/spring-
aop-3.0.3.RELEASE.jar,
file:/C:/chm/repository/aopalliance/aopalliance/1.0/aopalliance-1.0.jar,
file:/C:/chm/repository/org/springframework/spring-asm/3.0.3.RELEASE/sprin
g-asm-3.0.3.RELEASE.jar,
file:/C:/chm/repository/org/springframework/spring-beans/3.0.3.RELEASE/spring-beans-3.0.3.RELEASE.jar,
file:/C:/chm/repository/org/springframewor
k/spring-core/3.0.3.RELEASE/spring-core-3.0.3.RELEASE.jar,
file:/C:/chm/repository/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar,
file:/C:/chm/repositor
y/org/springframework/spring-expression/3.0.3.RELEASE/spring-expression-3.0.3.RELEASE.jar,
file:/C:/chm/repository/org/springframework/spring-tx/3.0.3.RELEASE/spring-tx-3
.0.3.RELEASE.jar,
file:/C:/chm/repository/org/apache/camel/camel-core-xml/2.5-SNAPSHOT/camel-core-xml-2.5-SNAPSHOT.jar,
file:/C:/chm/repository/org/apache/camel/camel-jms
/2.5-SNAPSHOT/camel-jms-2.5-SNAPSHOT.jar,
file:/C:/chm/repository/org/springframework/spring-jms/3.0.3.RELEASE/spring-jms-3.0.3.RELEASE.jar,
file:/C:/chm/repository/org/a
pache/geronimo/specs/geronimo-jms_1.1_spec/1.1.1/geronimo-jms_1.1_spec-1.1.1.jar,
file:/C:/chm/repository/org/apache/activemq/activemq-core/5.3.2/activemq-core-5.3.2.jar,
 file:/C:/chm/repository/org/apache/activemq/activeio-core/3.1.2/activeio-core-3.1.2.jar,
file:/C:/chm/repository/org/apache/geronimo/specs/geronimo-j2ee-management_1.1_s
pec/1.0.1/geronimo-j2ee-management_1.1_spec-1.0.1.jar,
file:/C:/chm/repository/org/apache/activemq/kahadb/5.3.2/kahadb-5.3.2.jar,
file:/C:/chm/repository/org/apache/activ
emq/protobuf/activemq-protobuf/1.0/activemq-protobuf-1.0.jar,
file:/C:/chm/repository/org/osgi/org.osgi.core/4.1.0/org.osgi.core-4.1.0.jar,
file:/C:/chm/repository/org/sp
ringframework/osgi/spring-osgi-core/1.2.0/spring-osgi-core-1.2.0.jar,
file:/C:/chm/repository/org/springframework/osgi/spring-osgi-io/1.2.0/spring-osgi-io-1.2.0.jar,
file
:/C:/chm/repository/org/apache/geronimo/specs/geronimo-j2ee-management_1.0_spec/1.1/geronimo-j2ee-management_1.0_spec-1.1.jar,
file:/C:/chm/repository/commons-net/commons
-net/2.0/commons-net-2.0.jar,
file:/C:/chm/repository/org/apache/activemq/activemq-camel/5.3.2/activemq-camel-5.3.2.jar,
file:/C:/chm/repository/org/apache/activemq/activ
emq-pool/5.3.2/activemq-pool-5.3.2.jar,
file:/C:/chm/repository/org/apache/geronimo/specs/geronimo-jta_1.0.1B_spec/1.0.1/geronimo-jta_1.0.1B_spec-1.0.1.jar,
file:/C:/chm/
repository/commons-pool/commons-pool/1.5.4/commons-pool-1.5.4.jar,
file:/C:/chm/soft/jdk1.6.0_20/jre/../lib/tools.jar]
24-ao√t-2010 9:57:19 org.apache.camel.impl.MainSupport doStart
INFO: Apache Camel 2.5-SNAPSHOT starting
24-ao√t-2010 9:57:19
org.springframework.context.support.AbstractApplicationContext
prepareRefresh
INFO: Refreshing
org.springframework.context.support.ClassPathXmlApplicationContext@ec9441:
startup date [Tue Aug 24 09:57:19 CEST 2010]; root of context hierarchy
24-ao√t-2010 9:57:19
org.springframework.beans.factory.xml.XmlBeanDefinitionReader
loadBeanDefinitions
INFO: Loading XML bean definitions from file
[C:\chm\dvlpt\java\apache\camel\tests\camel-itest-activemq-highvolume\target\classes\META-INF\spring\camel-context.xml]
24-ao√t-2010 9:57:20 org.apache.camel.spring.handler.CamelNamespaceHandler
init
INFO: OSGi environment not detected.
24-ao√t-2010 9:57:20
org.springframework.beans.factory.support.DefaultListableBeanFactory
registerBeanDefinition
INFO: Overriding bean definition for bean 'timer': replacing [Generic bean:
class [org.apache.camel.spring.CamelEndpointFactoryBean]; scope=;
abstract=false; lazyInit=fal
se; autowireMode=0; dependencyCheck=0; autowireCandidate=true;
primary=false; factoryBeanName=null; factoryMethodName=null;
initMethodName=null; destroyMethodName=null] w
ith [Generic bean: class [org.apache.camel.spring.CamelEndpointFactoryBean];
scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0;
autowireCandidate=
true; primary=false; factoryBeanName=null; factoryMethodName=null;
initMethodName=null; destroyMethodName=null]
24-ao√t-2010 9:57:20
org.springframework.beans.factory.support.DefaultListableBeanFactory
registerBeanDefinition
INFO: Overriding bean definition for bean 'direct': replacing [Generic bean:
class [org.apache.camel.spring.CamelEndpointFactoryBean]; scope=;
abstract=false; lazyInit=fa
lse; autowireMode=0; dependencyCheck=0; autowireCandidate=true;
primary=false; factoryBeanName=null; factoryMethodName=null;
initMethodName=null; destroyMethodName=null]
with [Generic bean: class
[org.apache.camel.spring.CamelEndpointFactoryBean]; scope=; abstract=false;
lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate
=true; primary=false; factoryBeanName=null; factoryMethodName=null;
initMethodName=null; destroyMethodName=null]
24-ao√t-2010 9:57:20
org.springframework.beans.factory.support.DefaultListableBeanFactory
registerBeanDefinition
INFO: Overriding bean definition for bean 'split': replacing [Generic bean:
class [org.apache.camel.spring.CamelEndpointFactoryBean]; scope=;
abstract=false; lazyInit=fal
se; autowireMode=0; dependencyCheck=0; autowireCandidate=true;
primary=false; factoryBeanName=null; factoryMethodName=null;
initMethodName=null; destroyMethodName=null] w
ith [Generic bean: class [org.apache.camel.spring.CamelEndpointFactoryBean];
scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0;
autowireCandidate=
true; primary=false; factoryBeanName=null; factoryMethodName=null;
initMethodName=null; destroyMethodName=null]
24-ao√t-2010 9:57:20
org.springframework.beans.factory.support.DefaultListableBeanFactory
registerBeanDefinition
INFO: Overriding bean definition for bean 'generateMessages': replacing
[Generic bean: class [org.apache.camel.spring.CamelEndpointFactoryBean];
scope=; abstract=false; l
azyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true;
primary=false; factoryBeanName=null; factoryMethodName=null;
initMethodName=null; destroyMethodN
ame=null] with [Generic bean: class
[org.apache.camel.spring.CamelEndpointFactoryBean]; scope=; abstract=false;
lazyInit=false; autowireMode=0; dependencyCheck=0; autowir
eCandidate=true; primary=false; factoryBeanName=null;
factoryMethodName=null; initMethodName=null; destroyMethodName=null]
24-ao√t-2010 9:57:20
org.springframework.beans.factory.support.DefaultListableBeanFactory
registerBeanDefinition
INFO: Overriding bean definition for bean 'jmsQueue': replacing [Generic
bean: class [org.apache.camel.spring.CamelEndpointFactoryBean]; scope=;
abstract=false; lazyInit=
false; autowireMode=0; dependencyCheck=0; autowireCandidate=true;
primary=false; factoryBeanName=null; factoryMethodName=null;
initMethodName=null; destroyMethodName=null
] with [Generic bean: class
[org.apache.camel.spring.CamelEndpointFactoryBean]; scope=; abstract=false;
lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandida
te=true; primary=false; factoryBeanName=null; factoryMethodName=null;
initMethodName=null; destroyMethodName=null]
24-ao√t-2010 9:57:20
org.springframework.beans.factory.support.DefaultListableBeanFactory
registerBeanDefinition
INFO: Overriding bean definition for bean 'jmsQueueConsumer': replacing
[Generic bean: class [org.apache.camel.spring.CamelEndpointFactoryBean];
scope=; abstract=false; l
azyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true;
primary=false; factoryBeanName=null; factoryMethodName=null;
initMethodName=null; destroyMethodN
ame=null] with [Generic bean: class
[org.apache.camel.spring.CamelEndpointFactoryBean]; scope=; abstract=false;
lazyInit=false; autowireMode=0; dependencyCheck=0; autowir
eCandidate=true; primary=false; factoryBeanName=null;
factoryMethodName=null; initMethodName=null; destroyMethodName=null]
24-ao√t-2010 9:57:20
org.springframework.beans.factory.support.DefaultListableBeanFactory
registerBeanDefinition
INFO: Overriding bean definition for bean 'log': replacing [Generic bean:
class [org.apache.camel.spring.CamelEndpointFactoryBean]; scope=;
abstract=false; lazyInit=false
; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false;
factoryBeanName=null; factoryMethodName=null; initMethodName=null;
destroyMethodName=null] wit
h [Generic bean: class [org.apache.camel.spring.CamelEndpointFactoryBean];
scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0;
autowireCandidate=tr
ue; primary=false; factoryBeanName=null; factoryMethodName=null;
initMethodName=null; destroyMethodName=null]
24-ao√t-2010 9:57:21
org.springframework.beans.factory.support.DefaultListableBeanFactory
preInstantiateSingletons
INFO: Pre-instantiating singletons in
org.springframework.beans.factory.support.DefaultListableBeanFactory@1cc7f4b:
defining beans [timer,direct,split,generateMessages,jm
sQueue,jmsQueueConsumer,log,template,consumerTemplate,camel-1:beanPostProcessor,camel-1,jms,beanSplitter];
root of factory hierarchy
*************************************
Error occurred while running main from: org.apache.camel.spring.Main
java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.camel.maven.RunMojo$1.run(RunMojo.java:415)
        at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.NoClassDefFoundError: Could not initialize class
org.springframework.beans.factory.BeanCreationException
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:527)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
        at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
        at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
        at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
        at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
        at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:574)
        at
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
        at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
        at
org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
        at
org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93)
        at
org.apache.camel.spring.Main.createDefaultApplicationContext(Main.java:219)
        at org.apache.camel.spring.Main.doStart(Main.java:173)
        at
org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:65)
        at
org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:52)
        at org.apache.camel.impl.MainSupport.run(MainSupport.java:114)
        at org.apache.camel.impl.MainSupport.run(MainSupport.java:291)
        at org.apache.camel.spring.Main.main(Main.java:97)
        ... 6 more

Regards,

Charles Moulliard

Senior Enterprise Architect (J2EE, .NET, SOA)
Apache Camel - Karaf - ServiceMix Committer
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Blog : http://cmoulliard.blogspot.com |  Twitter :
http://twitter.com/cmoulliard
Linkedin : http://www.linkedin.com/in/charlesmoulliard | Skype: cmoulliard

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message