Hi
I have tried to install activemq-broker-noweb and activemq-camel features
(5.13.2, 5.13.3 and current master) with Camel 2.17.0 on Karaf 4.0.5 but with
no success:
karaf@root()> feature:repo-add camel 2.17.0
Adding feature url mvn:org.apache.camel.karaf/apache-camel/2.17.0/xml/features
karaf@root()> feature:repo-add activemq 5.13.2
Adding feature url mvn:org.apache.activemq/activemq-karaf/5.13.2/xml/features
karaf@root()> feature:install activemq-broker-noweb
karaf@root()> activemq:list
brokerName = amq-broker
karaf@root()> feature:install activemq-camel
karaf@root()> activemq:list
karaf@root()>
The activemq-osgi bundle is refreshed and and cannot be resolved anymore
There is following entry in log
Caused by: java.lang.ClassNotFoundException:
org.apache.xbean.spring.context.v2.XBeanNamespaceHandler not found by
org.apache.activemq.activemq-osgi [61]
at
org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1574)[org.apache.felix.framework-5.4.0.jar:]
at
org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:79)[org.apache.felix.framework-5.4.0.jar:]
at
org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:2018)[org.apache.felix.framework-5.4.0.jar:]
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)[:1.7.0_80]
at
org.apache.felix.framework.Felix.loadBundleClass(Felix.java:1925)[org.apache.felix.framework-5.4.0.jar:]
at
org.apache.felix.framework.BundleImpl.loadClass(BundleImpl.java:978)[org.apache.felix.framework-5.4.0.jar:]
at
org.springframework.osgi.util.BundleDelegatingClassLoader.findClass(BundleDelegatingClassLoader.java:99)[124:org.springframework.osgi.core:1.2.1]
... 36 more
There is a bundle providing this package
karaf@root()> exports | grep org.apache.xbean.spring.context.v2
org.apache.xbean.spring.context.v2 | 3.18.0
| 91 | org.apache.xbean.spring
org.apache.xbean.spring.context.v2c | 3.18.0
| 91 | org.apache.xbean.spring
It looks like activemq-osgi doesn't import this package. But setting
dynamic-imports on it causes further error
Caused by: java.lang.ClassNotFoundException:
org.springframework.osgi.context.support.OsgiBundleXmlApplicationContext not
found by org.apache.activemq.activemq-osgi [61]
at
org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1574)[org.apache.felix.framework-5.4.0.jar:]
at
org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:79)[org.apache.felix.framework-5.4.0.jar:]
at
org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:2018)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)[:1.7.0_80]
... 46 more
There is a bundle providing this package available
karaf@root()> exports | grep org.springframework.osgi.context.support
org.springframework.osgi.context.support | 1.2.1
| 124 | org.springframework.osgi.core
One another interesting thing - headers command on activemq-osgi shows
following import
org.springframework.osgi.context.support;resolution:=optional;version="[3,5)"
but in ActiveMQ code there is following entry
org.springframework.osgi*;version="[1,4]";resolution:=optional
I think, the range [3,5) is the reason why the package
org.springframework.osgi.context.supportcannot be resolved, because it's
provided in version 1.2.1
Do you have any ideas why this problem happens? I think, it's something
connected with the changes in Spring dependencies in Camel 2.17.0
Regards
Krzysztof
--
Krzysztof Sobkowiak (@ksobkowiak)
JEE & OSS Architect, Integration Architect
Apache Software Foundation Member (http://apache.org/)
Apache ServiceMix Committer & PMC Member (http://servicemix.apache.org/)
Senior Solution Architect @ Capgemini SSC (http://www.capgeminisoftware.pl/)