Thanks for your answer.
You're right. I'm all new in this world of karaf, spring, blueprint,
camel etc and it's easy to lose one's track.
I went back to a blueprint definition and now it works.
regards,
Laci
On 04.02.2014 17:48, Achim Nierbeck wrote:
Hi,
as you're trying to do this on Karaf I first would switch over to
blueprint, a bit more "native".
Second you'll need the appropriate features installed, like camel and
maybe spring if you want to stick to that.
Though there are plenty of samples around on how to use camel with
blueprint and Karaf.
regards, Achim
2014-02-04 Laci Gaspar <[email protected] <mailto:[email protected]>>:
Hi
I used the camel-example-spring-javaconfig example as a template.
When I want to install it in karaf ( I drop the jar file into the
deploy folder) then I get the following Exception.
Any ideas?
Regards
Laci
java.lang.IllegalStateException: Cannot load configuration class:
ch.curabill.msp.service.MyRouteConfig
at
org.springframework.context.annotation.ConfigurationClassPostProcessor.enhanceConfigurationClasses(ConfigurationClassPostProcessor.java:366)[68:org.springframework.context:3.2.4.RELEASE]
at
org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanFactory(ConfigurationClassPostProcessor.java:242)[68:org.springframework.context:3.2.4.RELEASE]
at
org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.invokeBeanFactoryPostProcessors(AbstractDelegatedExecutionApplicationContext.java:479)[137:org.springframework.osgi.core:1.2.1]
at
org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.invokeBeanFactoryPostProcessors(AbstractDelegatedExecutionApplicationContext.java:459)[137:org.springframework.osgi.core:1.2.1]
at
org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.invokeBeanFactoryPostProcessors(AbstractDelegatedExecutionApplicationContext.java:395)[137:org.springframework.osgi.core:1.2.1]
at
org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$3.run(AbstractDelegatedExecutionApplicationContext.java:281)[137:org.springframework.osgi.core:1.2.1]
at
org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)[137:org.springframework.osgi.core:1.2.1]
at
org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.startRefresh(AbstractDelegatedExecutionApplicationContext.java:247)[137:org.springframework.osgi.core:1.2.1]
at
org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.stageOne(DependencyWaiterApplicationContextExecutor.java:214)[138:org.springframework.osgi.extender:1.2.1]
at
org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.refresh(DependencyWaiterApplicationContextExecutor.java:169)[138:org.springframework.osgi.extender:1.2.1]
at
org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.refresh(AbstractDelegatedExecutionApplicationContext.java:175)[137:org.springframework.osgi.core:1.2.1]
at
org.springframework.osgi.extender.internal.activator.ContextLoaderListener$2.run(ContextLoaderListener.java:716)[138:org.springframework.osgi.extender:1.2.1]
at java.lang.Thread.run(Thread.java:619)[:1.6.0_20]
Caused by: java.lang.NoClassDefFoundError:
org/springframework/cglib/core/ReflectUtils
at
ch.curabill.msp.service.MyRouteConfig$$EnhancerByCGLIB$$375285f7.CGLIB$STATICHOOK14(<generated>)
at
ch.curabill.msp.service.MyRouteConfig$$EnhancerByCGLIB$$375285f7.<clinit>(<generated>)
at java.lang.Class.forName0(Native Method)[:1.6.0_20]
at java.lang.Class.forName(Class.java:247)[:1.6.0_20]
at
org.springframework.cglib.core.ReflectUtils.defineClass(ReflectUtils.java:386)
at
org.springframework.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:219)
at
org.springframework.cglib.proxy.Enhancer.createHelper(Enhancer.java:377)
at
org.springframework.cglib.proxy.Enhancer.createClass(Enhancer.java:317)
at
org.springframework.context.annotation.ConfigurationClassEnhancer.createClass(ConfigurationClassEnhancer.java:118)
at
org.springframework.context.annotation.ConfigurationClassEnhancer.enhance(ConfigurationClassEnhancer.java:92)
at
org.springframework.context.annotation.ConfigurationClassPostProcessor.enhanceConfigurationClasses(ConfigurationClassPostProcessor.java:356)
... 12 more
Caused by: java.lang.ClassNotFoundException:
org.springframework.cglib.core.ReflectUtils not found by
camel-example-spring-javaconfig [183]
at
org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1460)[org.apache.felix.framework-4.0.3.jar:]
at
org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:72)[org.apache.felix.framework-4.0.3.jar:]
at
org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1843)
--
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/>
Committer & Project Lead
OPS4J Pax for Vaadin
<http://team.ops4j.org/wiki/display/PAXVAADIN/Home> Commiter & Project
Lead
blog <http://notizblog.nierbeck.de/>