Hi

you need to alter your manifest, looks like the bnd interpreted the call to
the inner class
org.apache.cxf.jaxrs.spring.JAXRSServerFactoryBeanDefinitionParser.
SpringJAXRSServerFactoryBean
as a Package Definition:
org.apache.cxf.jaxrs.spring.JAXRSServerFactoryBeanDefinitionParser

make sure you only have
org.apache.cxf.jaxrs.spring
in your manifest.
You might need to add the following to the import-package part of your bnd
instructions (or Maven-Bundle-Plugin)

!org.apache.cxf.jaxrs.spring.JAXRSServerFactoryBeanDefinitionParser


regards, Achim


2014-11-04 7:17 GMT+01:00 Srikanth Hugar <[email protected]>:

> When I try to create base JAX-RS server, I am facing below exception.
>
> Apache Karaf version : 3.0.0
> CXF version : 2.7.x
> Spring framework version : 3.2.x
>
> My OSGi bundle is importing the package
> *org.apache.cxf.jaxrs.spring,version=[2.7,3) from
> org.apache.cxf.cxf-rt-frontend-jaxrs (234)*
>
> But still bundle says missing requirement.
> org.apache.cxf.jaxrs.spring.JAXRSServerFactoryBeanDefinitionParser --
> Cannot be resolved
>
> What could be the problem?
>
> *configuration:*
> <bean id="baseJaxRSServer" abstract="true" lazy-init="false"
>
> class="org.apache.cxf.jaxrs.spring.JAXRSServerFactoryBeanDefinitionParser.SpringJAXRSServerFactoryBean"
> init-method="create" p:address="/" p:providers-ref="jaxRSProviders" />
>
> *Exception:*
> Caused by: org.osgi.framework.BundleException: Unresolved constraint in
> bundle rest-service [155]: Unable to resolve 155.0: missing requirement
> [155.0] osgi.wiring.package;
> (osgi.wiring.package=org.apache.cxf.jaxrs.spring.JAXRSServerFactoryBeanDefinitionParser)
> at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:3974)
> [org.apache.felix.framework-4.2.1.jar:na]
> at org.apache.felix.framework.Felix.startBundle(Felix.java:2037)
> [org.apache.felix.framework-4.2.1.jar:na]
> at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:955)
> ~[na:na]
>



-- 

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

Reply via email to