Hello, I'm currently trying to develop a REST API using Karaf 4.0.0 and CXF 3.1.1 but upon startup I get this error :
Caused by: java.lang.NoClassDefFoundError: javax/annotation/Priority at org.apache.cxf.jaxrs.utils.AnnotationUtils.getBindingPriority(AnnotationUtils.java:85) at org.apache.cxf.jaxrs.provider.ProviderFactory.getFilterPriority(ProviderFactory.java:1172) at org.apache.cxf.jaxrs.provider.ProviderFactory$BindingPriorityComparator.compare(ProviderFactory.java:1031) at org.apache.cxf.jaxrs.provider.ProviderFactory$BindingPriorityComparator.compare(ProviderFactory.java:1021) at java.util.TimSort.countRunAndMakeAscending(TimSort.java:324)[:1.7.0_79] at java.util.TimSort.sort(TimSort.java:189)[:1.7.0_79] at java.util.TimSort.sort(TimSort.java:173)[:1.7.0_79] at java.util.Arrays.sort(Arrays.java:659)[:1.7.0_79] at java.util.Collections.sort(Collections.java:217)[:1.7.0_79] at org.apache.cxf.jaxrs.provider.ServerProviderFactory.setProviders(ServerProviderFactory.java:247) at org.apache.cxf.jaxrs.provider.ProviderFactory.setUserProviders(ProviderFactory.java:753) at org.apache.cxf.jaxrs.AbstractJAXRSFactoryBean.setupFactory(AbstractJAXRSFactoryBean.java:332) at org.apache.cxf.jaxrs.JAXRSServerFactoryBean.setupFactory(JAXRSServerFactoryBean.java:237) at org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:182) at org.apache.cxf.jaxrs.JAXRSServerFactoryBean.init(JAXRSServerFactoryBean.java:142) which seems very similar to the issue reported here : https://github.com/hstaudacher/osgi-jax-rs-connector/issues/77 Except that I'm not using JDK 8 but JDK 7 However I'm seing something really strange with the framework bundle. If I look at the web console for my bundle I see the following imports : javax.annotation,version=1.0.0 from org.apache.felix.framework (0) <http://localhost:8181/system/console/bundles/0> javax.annotation,version=1.2.0 from org.apache.felix.framework (0) <http://localhost:8181/system/console/bundles/0> whereas on the felix.framework bundle I see this : javax.annotation,version=1.0.0 javax.annotation,version=1.2.0 however in Karaf's jre.properties I do only see the following for jre-1.7 : jre-1.7= \ javax.accessibility, \ javax.activation;version="1.1", \ javax.activity, \ javax.annotation;version="1.0", \ javax.annotation.processing;version="1.0", \ what's going on where is the 1.2 version coming from ? Even in Felix's default.properties file all I could find was the following : jre-1.7=, \ javax.accessibility;uses:="javax.swing.text";version="0.0.0.1_007_JavaSE", \ javax.activation;version="0.0.0.1_007_JavaSE", \ javax.activity;version="0.0.0.1_007_JavaSE", \ javax.annotation.processing;uses:="javax.tools,javax.lang.model,javax.lang.model.element,javax.lang.model.util";version="0.0.0.1_007_JavaSE", \ javax.annotation;version="0.0.0.1_007_JavaSE", \ any help would be greatly appreciated, I'm really at a loss here. If it helps here is the list of features I have installed : <bootFeatures> <feature>shell</feature> <feature>ssh</feature> <feature>management</feature> <feature>bundle</feature> <feature>config</feature> <feature>deployer</feature> <feature>diagnostic</feature> <feature>instance</feature> <feature>kar</feature> <feature>feature</feature> <feature>log</feature> <feature>package</feature> <feature>service</feature> <feature>system</feature> <feature>scheduler</feature> <feature>webconsole</feature> <feature>cxf</feature> <feature>checker-feature</feature> </bootFeatures> (the checker-feature is my application) cheers, Serge... - -- --- -----=[ shuber at jahia dot com ]=---- --- -- - CTO & Co-founder - Jahia Solutions Group, 9 Routes de Jeunes, 1227 Acacias, Switzerland twitter: @sergehuber <https://twitter.com/sergehuber> Jahia is a leading open source User eXperience Platform (UXP) vendor, relentlessly working at transforming a siloed industry into a user-driven one, beyond technology constraints - http://www.jahia.com