Problem running camel-example-cxf in the ESB
ddc Sep 20, 2011 5:25 PMHi,
I successfully did the steps to run the example outside the esb (mvn exec:java -PHttpToJms/CamelTransport/etc.). However, when preparing to run them in the esb, I got the exception below after hot deploying the jar file, and the spring app state changed to Failed.
camel-example-cxf (2.7.1.fuse-00-27)
I'm running the ESB from apache-servicemix-4.4.0-fuse-00-43. I'm running the example from apache-camel-2.7.1-fuse-00-27. The OS is windows 7.
Configuration changes from default
During the ESB installation, in the install guide, chapter 2, there is an optional step of removing the jbi container.
I removed jbi-* & servicemix-* from featuresBoot in etc/org.apache.karaf.features.cfg. I also added the woodstox feature as a workaround to a problem I encountered running the ESB /cxf/HelloWorld example.
The Exception
14:52:27,929 | DEBUG | ExtenderThread-3 | OsgiBundleXmlApplicationContext | 70 - org.springframework.context - 3.0.5.RELEASE | Pre refresh error
org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from URL bundle://154.0:0/META-INF/spring/CxfRouteCamelContext.xml; nested exception is org.springframework.beans.FatalBeanException: NamespaceHandler class for namespace http://activemq.apache.org/schema/core not found; nested exception is java.lang.ClassNotFoundException: org.apache.xbean.spring.context.v2.XBeanNamespaceHandler not found from bundle
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:412)[68:org.springframework.beans:3.0.5.RELEASE]
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)[68:org.springframework.beans:3.0.5.RELEASE]
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)[68:org.springframework.beans:3.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)[68:org.springframework.beans:3.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)[68:org.springframework.beans:3.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)[68:org.springframework.beans:3.0.5.RELEASE]
at org.springframework.osgi.context.support.OsgiBundleXmlApplicationContext.loadBeanDefinitions(OsgiBundleXmlApplicationContext.java:164)[82:org.springframework.osgi.core:1.2.1]
at org.springframework.osgi.context.support.OsgiBundleXmlApplicationContext.loadBeanDefinitions(OsgiBundleXmlApplicationContext.java:136)[82:org.springframework.osgi.core:1.2.1]
at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130)[70:org.springframework.context:3.0.5.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:467)[70:org.springframework.context:3.0.5.RELEASE]
at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$800(AbstractDelegatedExecutionApplicationContext.java:69)[82:org.springframework.osgi.core:1.2.1]
at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$3.run(AbstractDelegatedExecutionApplicationContext.java:269)[82:org.springframework.osgi.core:1.2.1]
at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)[82:org.springframework.osgi.core:1.2.1]
at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.startRefresh(AbstractDelegatedExecutionApplicationContext.java:247)[82:org.springframework.osgi.core:1.2.1]
at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.stageOne(DependencyWaiterApplicationContextExecutor.java:214)[85:org.springframework.osgi.extender:1.2.1]
at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.refresh(DependencyWaiterApplicationContextExecutor.java:169)[85:org.springframework.osgi.extender:1.2.1]
at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.refresh(AbstractDelegatedExecutionApplicationContext.java:175)[82:org.springframework.osgi.core:1.2.1]
at org.springframework.osgi.extender.internal.activator.ContextLoaderListener$2.run(ContextLoaderListener.java:716)[85:org.springframework.osgi.extender:1.2.1]
at java.lang.Thread.run(Thread.java:619)[:1.6.0_21]
Caused by: org.springframework.beans.FatalBeanException: NamespaceHandler class for namespace http://activemq.apache.org/schema/core not found; nested exception is java.lang.ClassNotFoundException: org.apache.xbean.spring.context.v2.XBeanNamespaceHandler not found from bundle
at org.springframework.beans.factory.xml.DefaultNamespaceHandlerResolver.resolve(DefaultNamespaceHandlerResolver.java:135)
at org.springframework.osgi.extender.internal.support.NamespacePlugins$Plugin.resolve(NamespacePlugins.java:82)
at org.springframework.osgi.extender.internal.support.NamespacePlugins.doResolve(NamespacePlugins.java:168)
at org.springframework.osgi.extender.internal.support.NamespacePlugins.resolve(NamespacePlugins.java:131)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.6.0_21]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)[:1.6.0_21]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)[:1.6.0_21]
at java.lang.reflect.Method.invoke(Method.java:597)[:1.6.0_21]
at org.springframework.osgi.context.support.TrackingUtil$OsgiServiceHandler.invoke(TrackingUtil.java:123)[82:org.springframework.osgi.core:1.2.1]
at $Proxy26.resolve(Unknown Source)[68:org.springframework.beans:3.0.5.RELEASE]
at org.springframework.osgi.context.support.DelegatedNamespaceHandlerResolver.resolve(DelegatedNamespaceHandlerResolver.java:56)[82:org.springframework.osgi.core:1.2.1]
at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1330)[68:org.springframework.beans:3.0.5.RELEASE]
at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1325)[68:org.springframework.beans:3.0.5.RELEASE]
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:135)[68:org.springframework.beans:3.0.5.RELEASE]
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:93)[68:org.springframework.beans:3.0.5.RELEASE]
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:493)[68:org.springframework.beans:3.0.5.RELEASE]
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:390)[68:org.springframework.beans:3.0.5.RELEASE]
... 18 more
Caused by: java.lang.ClassNotFoundException: org.apache.xbean.spring.context.v2.XBeanNamespaceHandler not found from bundle
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:248)[:1.6.0_21]
at org.springframework.util.ClassUtils.forName(ClassUtils.java:257)
at org.springframework.beans.factory.xml.DefaultNamespaceHandlerResolver.resolve(DefaultNamespaceHandlerResolver.java:124)
... 34 more
Caused by: java.lang.ClassNotFoundException: org.apache.xbean.spring.context.v2.XBeanNamespaceHandler not found by org.apache.activemq.activemq-core
at org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:812)
at org.apache.felix.framework.ModuleImpl.access$400(ModuleImpl.java:72)
at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1806)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)[:1.6.0_21]
at org.apache.felix.framework.ModuleImpl.getClassByDelegation(ModuleImpl.java:670)
at org.apache.felix.framework.Felix.loadBundleClass(Felix.java:1613)
at org.apache.felix.framework.BundleImpl.loadClass(BundleImpl.java:909)
at org.springframework.osgi.util.BundleDelegatingClassLoader.findClass(BundleDelegatingClassLoader.java:99)
... 38 more
Any ideas on what I need to do to get the example working in the ESB?
David