Hi Achim, Do you mean something like this ?
install -s mvn:javax.annotation/javax.annotation-api/1.2 I tried that but it didn't solve the problem. I'm still trying to understand the issue of the two versions exported by the framework though. I'm guessing that someone something is getting picked up in version 1.2 but I'm not sure how. I'm not doing something very special or unique, just setting up Karaf + CXF to provide micro-services :) 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 On Fri, Jul 24, 2015 at 4:42 PM, Achim Nierbeck <[email protected]> wrote: > Hi Serge, > > as neither JDK7 or 8 are actually fully providing these packages it's best > to install the appropriate bundle for it. > > regards, Achim > > 2015-07-24 16:36 GMT+02:00 Serge Huber <[email protected]>: > >> Hi JB, >> >> Thanks for the quick answer. I'm not sure I understand though, should I >> update it to 1.2 ? I thought JDK 7 doesn't support it ? Any idea also why >> I'm seeing the export with two versions ? >> >> Cheers, >> Serge >> >> Envoyé de mon iPad >> >> > Le 24 juil. 2015 à 16:02, Jean-Baptiste Onofré <[email protected]> a >> écrit : >> > >> > Hi Serge, >> > >> > take a look in etc/jre.properties, and update javax.annotation to match >> the needed. >> > >> > Regards >> > JB >> > >> >> On 07/24/2015 03:49 PM, Serge Huber wrote: >> >> 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 >> >> <http://www.jahia.com/> >> > >> > -- >> > Jean-Baptiste Onofré >> > [email protected] >> > http://blog.nanthrax.net >> > Talend - http://www.talend.com >> > > > > -- > > Apache Member > Apache Karaf <http://karaf.apache.org/> Committer & PMC > OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer & > Project Lead > blog <http://notizblog.nierbeck.de/> > Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS> > > Software Architect / Project Manager / Scrum Master > >
