You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Sbhargava <sa...@gmail.com> on 2014/10/20 11:02:39 UTC

Unable to start REST WS in Karaf 2.3.6 using CXF

Hi All,

I have been struggling with this since days. I have been trying to create a
REST Client in Karaf 2.3.6 using Apache CXF. I keep getting the following
error:

2014-10-20 00:00:16,190 | WARN  | l Console Thread | ResourceUtils                   
| he.cxf.jaxrs.utils.ResourceUtils  425 | 122 -
org.apache.cxf.cxf-rt-frontend-jaxrs - 2.7.12 | No resource methods have
been found for resource class com.sample.in.rest.SampleRestServiceImpl
2014-10-20 00:00:16,190 | WARN  | l Console Thread | ResourceUtils                   
| he.cxf.jaxrs.utils.ResourceUtils  425 | No resource methods have been
found for resource class com.sample.in.rest.SampleRestServiceImpl
2014-10-20 00:00:16,209 | ERROR | l Console Thread |
AbstractJAXRSFactoryBean         | f.jaxrs.AbstractJAXRSFactoryBean  316 |
122 - org.apache.cxf.cxf-rt-frontend-jaxrs - 2.7.12 | No resource classes
found
2014-10-20 00:00:16,209 | ERROR | l Console Thread |
AbstractJAXRSFactoryBean         | f.jaxrs.AbstractJAXRSFactoryBean  316 |
No resource classes found
2014-10-20 00:00:16,228 | WARN  | l Console Thread | BeanRecipe                      
| s.blueprint.container.BeanRecipe  851 | 7 -
org.apache.aries.blueprint.core - 1.4.0 | Object to be destroyed is not an
instance of UnwrapperedBeanHolder, type: null
2014-10-20 00:00:16,228 | WARN  | l Console Thread | BeanRecipe                      
| s.blueprint.container.BeanRecipe  851 | Object to be destroyed is not an
instance of UnwrapperedBeanHolder, type: null
2014-10-20 00:00:16,233 | ERROR | l Console Thread | BlueprintContainerImpl          
| container.BlueprintContainerImpl  402 | 7 -
org.apache.aries.blueprint.core - 1.4.0 | Unable to start blueprint
container for bundle com.sample.in.rest.SampleRestClient
org.osgi.service.blueprint.container.ComponentDefinitionException: Unable to
initialize bean restService
	at
org.apache.aries.blueprint.container.BeanRecipe.runBeanProcInit(BeanRecipe.java:714)[7:org.apache.aries.blueprint.core:1.4.0]
	at
org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanRecipe.java:824)[7:org.apache.aries.blueprint.core:1.4.0]
	at
org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:787)[7:org.apache.aries.blueprint.core:1.4.0]
	at
org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:79)[7:org.apache.aries.blueprint.core:1.4.0]
	at
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)[:1.7.0_11]
	at java.util.concurrent.FutureTask.run(FutureTask.java:166)[:1.7.0_11]
	at
org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:88)[7:org.apache.aries.blueprint.core:1.4.0]
	at
org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:245)[7:org.apache.aries.blueprint.core:1.4.0]
	at
org.apache.aries.blueprint.container.BlueprintRepository.createAll(BlueprintRepository.java:183)[7:org.apache.aries.blueprint.core:1.4.0]
	at
org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.java:681)[7:org.apache.aries.blueprint.core:1.4.0]
	at
org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:378)[7:org.apache.aries.blueprint.core:1.4.0]
	at
org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:269)[7:org.apache.aries.blueprint.core:1.4.0]
	at
org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:276)[7:org.apache.aries.blueprint.core:1.4.0]
	at
org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:245)[7:org.apache.aries.blueprint.core:1.4.0]
	at
org.apache.aries.blueprint.container.BlueprintExtender.modifiedBundle(BlueprintExtender.java:235)[7:org.apache.aries.blueprint.core:1.4.0]
	at
org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerModified(BundleHookBundleTracker.java:500)[10:org.apache.aries.util:1.1.0]
	at
org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerModified(BundleHookBundleTracker.java:433)[10:org.apache.aries.util:1.1.0]
	at
org.apache.aries.util.tracker.hook.BundleHookBundleTracker$AbstractTracked.track(BundleHookBundleTracker.java:725)[10:org.apache.aries.util:1.1.0]
	at
org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.bundleChanged(BundleHookBundleTracker.java:463)[10:org.apache.aries.util:1.1.0]
	at
org.apache.aries.util.tracker.hook.BundleHookBundleTracker$BundleEventHook.event(BundleHookBundleTracker.java:422)[10:org.apache.aries.util:1.1.0]
	at
org.apache.felix.framework.util.SecureAction.invokeBundleEventHook(SecureAction.java:1103)[org.apache.felix.framework-4.0.3.jar:]
	at
org.apache.felix.framework.util.EventDispatcher.createWhitelistFromHooks(EventDispatcher.java:695)[org.apache.felix.framework-4.0.3.jar:]
	at
org.apache.felix.framework.util.EventDispatcher.fireBundleEvent(EventDispatcher.java:483)[org.apache.felix.framework-4.0.3.jar:]
	at
org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4244)[org.apache.felix.framework-4.0.3.jar:]
	at
org.apache.felix.framework.Felix.startBundle(Felix.java:1923)[org.apache.felix.framework-4.0.3.jar:]
	at
org.apache.felix.framework.BundleImpl.start(BundleImpl.java:944)[org.apache.felix.framework-4.0.3.jar:]
	at
org.apache.felix.framework.BundleImpl.start(BundleImpl.java:931)[org.apache.felix.framework-4.0.3.jar:]
	at
org.apache.karaf.shell.osgi.StartBundle.doExecute(StartBundle.java:37)[35:org.apache.karaf.shell.osgi:2.3.6]
	at
org.apache.karaf.shell.osgi.BundlesCommand.doExecute(BundlesCommand.java:37)[35:org.apache.karaf.shell.osgi:2.3.6]
	at
org.apache.karaf.shell.console.OsgiCommandSupport.execute(OsgiCommandSupport.java:38)[14:org.apache.karaf.shell.console:2.3.6]
	at
org.apache.felix.gogo.commands.basic.AbstractCommand.execute(AbstractCommand.java:35)[14:org.apache.karaf.shell.console:2.3.6]
	at
org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:78)[14:org.apache.karaf.shell.console:2.3.6]
	at
org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:474)[14:org.apache.karaf.shell.console:2.3.6]
	at
org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:400)[14:org.apache.karaf.shell.console:2.3.6]
	at
org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[14:org.apache.karaf.shell.console:2.3.6]
	at
org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)[14:org.apache.karaf.shell.console:2.3.6]
	at
org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)[14:org.apache.karaf.shell.console:2.3.6]
	at
org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:89)[14:org.apache.karaf.shell.console:2.3.6]
	at
org.apache.karaf.shell.console.jline.Console.run(Console.java:184)[14:org.apache.karaf.shell.console:2.3.6]
	at java.lang.Thread.run(Thread.java:722)[:1.7.0_11]
Caused by: org.apache.cxf.service.factory.ServiceConstructionException
	at
org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:215)
	at
org.apache.cxf.jaxrs.JAXRSServerFactoryBean.init(JAXRSServerFactoryBean.java:135)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.7.0_11]
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)[:1.7.0_11]
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.7.0_11]
	at java.lang.reflect.Method.invoke(Method.java:601)[:1.7.0_11]
	at
org.apache.aries.blueprint.utils.ReflectionUtils.invoke(ReflectionUtils.java:297)[7:org.apache.aries.blueprint.core:1.4.0]
	at
org.apache.aries.blueprint.container.BeanRecipe.invoke(BeanRecipe.java:958)[7:org.apache.aries.blueprint.core:1.4.0]
	at
org.apache.aries.blueprint.container.BeanRecipe.runBeanProcInit(BeanRecipe.java:712)[7:org.apache.aries.blueprint.core:1.4.0]
	... 39 more
Caused by: javax.ws.rs.NotFoundException
	at
org.apache.cxf.jaxrs.AbstractJAXRSFactoryBean.checkResources(AbstractJAXRSFactoryBean.java:317)
	at
org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:152)
	... 47 more

Below is the rest.xml:
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          
xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0"
           xmlns:jaxws="http://cxf.apache.org/blueprint/jaxws"
           xmlns:jaxrs="http://cxf.apache.org/blueprint/jaxrs"
           xmlns:cxf="http://cxf.apache.org/blueprint/core"
           xsi:schemaLocation="
  http://www.osgi.org/xmlns/blueprint/v1.0.0
http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
  http://cxf.apache.org/blueprint/jaxws
http://cxf.apache.org/schemas/blueprint/jaxws.xsd
  http://cxf.apache.org/blueprint/jaxrs
http://cxf.apache.org/schemas/blueprint/jaxrs.xsd
  http://cxf.apache.org/blueprint/core
http://cxf.apache.org/schemas/blueprint/core.xsd">

    <cxf:bus id="cxfBus1">
        <cxf:features>
            <cxf:logging/>
        </cxf:features>
    </cxf:bus>


    <jaxrs:server address="/rest" id="restService">
        <jaxrs:serviceBeans>        
         	 <ref component-id="sampleRestServiceImpl"/>
        </jaxrs:serviceBeans>
    </jaxrs:server>


    
    <bean id="sampleRestServiceImpl"
class="com.sample.in.rest.SampleRestServiceImpl"> 
    	<property name="dbSampleViewer" ref="dbSampleViewerBean"></property>     
    </bean>

   <reference id="dbSampleViewerBean"
interface="com.sample.services.impl.DBSampleViewer"></reference>

</blueprint>

SampleRestServiceImpl.java

public class SampleRestServiceImpl implements SampleRestService {

	DBSampleViewer dbSampleViewer;
	
	public DBSampleViewer getDbSampleViewer() {
		return dbSampleViewer;
	}


	public void setDbSampleViewer(DBSampleViewer dbSampleViewer) {
		this.dbSampleViewer= dbSampleViewer;}

	@GET
	@Path("employeeId/{id}")
	@Produces("text/plain")
	public String getInstanceById(@PathParam("id") String id) {
		return "My Employee id is "+id;
	}
	
	
	public SampleRestServiceImpl() {		
	}

}

DBSampleViewer is a running service in Karaf, which does some REST API calls
to fetch DB details.
Could someone help me with the issue?

Thanks in advance,
Sapna




--
View this message in context: http://cxf.547215.n5.nabble.com/Unable-to-start-REST-WS-in-Karaf-2-3-6-using-CXF-tp5750048.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: Unable to start REST WS in Karaf 2.3.6 using CXF

Posted by Sergey Beryozkin <sb...@gmail.com>.
Hi
On 20/10/14 19:26, Sbhargava wrote:
> Hi Sergey,
>
> Tried after removing JAX-RS annotations , but still get the same error. I
> didn't understand though, why is it important to have annotations in either
> Interface or implementation class.
>
I did not suggest removing the annotations, I only implied they may not 
be visible... It is difficult to suggest something more specific without 
having a test case

Cheers, Sergey
> Thanks,
> Sapna
>
>
>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/Unable-to-start-REST-WS-in-Karaf-2-3-6-using-CXF-tp5750048p5750083.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>


Re: Unable to start REST WS in Karaf 2.3.6 using CXF

Posted by Sbhargava <sa...@gmail.com>.
Hi Sergey,

Tried after removing JAX-RS annotations , but still get the same error. I
didn't understand though, why is it important to have annotations in either
Interface or implementation class.

Thanks,
Sapna



--
View this message in context: http://cxf.547215.n5.nabble.com/Unable-to-start-REST-WS-in-Karaf-2-3-6-using-CXF-tp5750048p5750083.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: Unable to start REST WS in Karaf 2.3.6 using CXF

Posted by Sergey Beryozkin <sb...@gmail.com>.
Hi

I can only think of the JAX-RS annotations not being visible for some 
reasons in this case, also make sure that the annotations are not added 
to both the interface and the implementation

Cheers, Sergey
On 20/10/14 10:02, Sbhargava wrote:
> Hi All,
>
> I have been struggling with this since days. I have been trying to create a
> REST Client in Karaf 2.3.6 using Apache CXF. I keep getting the following
> error:
>
> 2014-10-20 00:00:16,190 | WARN  | l Console Thread | ResourceUtils
> | he.cxf.jaxrs.utils.ResourceUtils  425 | 122 -
> org.apache.cxf.cxf-rt-frontend-jaxrs - 2.7.12 | No resource methods have
> been found for resource class com.sample.in.rest.SampleRestServiceImpl
> 2014-10-20 00:00:16,190 | WARN  | l Console Thread | ResourceUtils
> | he.cxf.jaxrs.utils.ResourceUtils  425 | No resource methods have been
> found for resource class com.sample.in.rest.SampleRestServiceImpl
> 2014-10-20 00:00:16,209 | ERROR | l Console Thread |
> AbstractJAXRSFactoryBean         | f.jaxrs.AbstractJAXRSFactoryBean  316 |
> 122 - org.apache.cxf.cxf-rt-frontend-jaxrs - 2.7.12 | No resource classes
> found
> 2014-10-20 00:00:16,209 | ERROR | l Console Thread |
> AbstractJAXRSFactoryBean         | f.jaxrs.AbstractJAXRSFactoryBean  316 |
> No resource classes found
> 2014-10-20 00:00:16,228 | WARN  | l Console Thread | BeanRecipe
> | s.blueprint.container.BeanRecipe  851 | 7 -
> org.apache.aries.blueprint.core - 1.4.0 | Object to be destroyed is not an
> instance of UnwrapperedBeanHolder, type: null
> 2014-10-20 00:00:16,228 | WARN  | l Console Thread | BeanRecipe
> | s.blueprint.container.BeanRecipe  851 | Object to be destroyed is not an
> instance of UnwrapperedBeanHolder, type: null
> 2014-10-20 00:00:16,233 | ERROR | l Console Thread | BlueprintContainerImpl
> | container.BlueprintContainerImpl  402 | 7 -
> org.apache.aries.blueprint.core - 1.4.0 | Unable to start blueprint
> container for bundle com.sample.in.rest.SampleRestClient
> org.osgi.service.blueprint.container.ComponentDefinitionException: Unable to
> initialize bean restService
> 	at
> org.apache.aries.blueprint.container.BeanRecipe.runBeanProcInit(BeanRecipe.java:714)[7:org.apache.aries.blueprint.core:1.4.0]
> 	at
> org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanRecipe.java:824)[7:org.apache.aries.blueprint.core:1.4.0]
> 	at
> org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:787)[7:org.apache.aries.blueprint.core:1.4.0]
> 	at
> org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:79)[7:org.apache.aries.blueprint.core:1.4.0]
> 	at
> java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)[:1.7.0_11]
> 	at java.util.concurrent.FutureTask.run(FutureTask.java:166)[:1.7.0_11]
> 	at
> org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:88)[7:org.apache.aries.blueprint.core:1.4.0]
> 	at
> org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:245)[7:org.apache.aries.blueprint.core:1.4.0]
> 	at
> org.apache.aries.blueprint.container.BlueprintRepository.createAll(BlueprintRepository.java:183)[7:org.apache.aries.blueprint.core:1.4.0]
> 	at
> org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.java:681)[7:org.apache.aries.blueprint.core:1.4.0]
> 	at
> org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:378)[7:org.apache.aries.blueprint.core:1.4.0]
> 	at
> org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:269)[7:org.apache.aries.blueprint.core:1.4.0]
> 	at
> org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:276)[7:org.apache.aries.blueprint.core:1.4.0]
> 	at
> org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:245)[7:org.apache.aries.blueprint.core:1.4.0]
> 	at
> org.apache.aries.blueprint.container.BlueprintExtender.modifiedBundle(BlueprintExtender.java:235)[7:org.apache.aries.blueprint.core:1.4.0]
> 	at
> org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerModified(BundleHookBundleTracker.java:500)[10:org.apache.aries.util:1.1.0]
> 	at
> org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerModified(BundleHookBundleTracker.java:433)[10:org.apache.aries.util:1.1.0]
> 	at
> org.apache.aries.util.tracker.hook.BundleHookBundleTracker$AbstractTracked.track(BundleHookBundleTracker.java:725)[10:org.apache.aries.util:1.1.0]
> 	at
> org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.bundleChanged(BundleHookBundleTracker.java:463)[10:org.apache.aries.util:1.1.0]
> 	at
> org.apache.aries.util.tracker.hook.BundleHookBundleTracker$BundleEventHook.event(BundleHookBundleTracker.java:422)[10:org.apache.aries.util:1.1.0]
> 	at
> org.apache.felix.framework.util.SecureAction.invokeBundleEventHook(SecureAction.java:1103)[org.apache.felix.framework-4.0.3.jar:]
> 	at
> org.apache.felix.framework.util.EventDispatcher.createWhitelistFromHooks(EventDispatcher.java:695)[org.apache.felix.framework-4.0.3.jar:]
> 	at
> org.apache.felix.framework.util.EventDispatcher.fireBundleEvent(EventDispatcher.java:483)[org.apache.felix.framework-4.0.3.jar:]
> 	at
> org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4244)[org.apache.felix.framework-4.0.3.jar:]
> 	at
> org.apache.felix.framework.Felix.startBundle(Felix.java:1923)[org.apache.felix.framework-4.0.3.jar:]
> 	at
> org.apache.felix.framework.BundleImpl.start(BundleImpl.java:944)[org.apache.felix.framework-4.0.3.jar:]
> 	at
> org.apache.felix.framework.BundleImpl.start(BundleImpl.java:931)[org.apache.felix.framework-4.0.3.jar:]
> 	at
> org.apache.karaf.shell.osgi.StartBundle.doExecute(StartBundle.java:37)[35:org.apache.karaf.shell.osgi:2.3.6]
> 	at
> org.apache.karaf.shell.osgi.BundlesCommand.doExecute(BundlesCommand.java:37)[35:org.apache.karaf.shell.osgi:2.3.6]
> 	at
> org.apache.karaf.shell.console.OsgiCommandSupport.execute(OsgiCommandSupport.java:38)[14:org.apache.karaf.shell.console:2.3.6]
> 	at
> org.apache.felix.gogo.commands.basic.AbstractCommand.execute(AbstractCommand.java:35)[14:org.apache.karaf.shell.console:2.3.6]
> 	at
> org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:78)[14:org.apache.karaf.shell.console:2.3.6]
> 	at
> org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:474)[14:org.apache.karaf.shell.console:2.3.6]
> 	at
> org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:400)[14:org.apache.karaf.shell.console:2.3.6]
> 	at
> org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[14:org.apache.karaf.shell.console:2.3.6]
> 	at
> org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)[14:org.apache.karaf.shell.console:2.3.6]
> 	at
> org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)[14:org.apache.karaf.shell.console:2.3.6]
> 	at
> org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:89)[14:org.apache.karaf.shell.console:2.3.6]
> 	at
> org.apache.karaf.shell.console.jline.Console.run(Console.java:184)[14:org.apache.karaf.shell.console:2.3.6]
> 	at java.lang.Thread.run(Thread.java:722)[:1.7.0_11]
> Caused by: org.apache.cxf.service.factory.ServiceConstructionException
> 	at
> org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:215)
> 	at
> org.apache.cxf.jaxrs.JAXRSServerFactoryBean.init(JAXRSServerFactoryBean.java:135)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.7.0_11]
> 	at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)[:1.7.0_11]
> 	at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.7.0_11]
> 	at java.lang.reflect.Method.invoke(Method.java:601)[:1.7.0_11]
> 	at
> org.apache.aries.blueprint.utils.ReflectionUtils.invoke(ReflectionUtils.java:297)[7:org.apache.aries.blueprint.core:1.4.0]
> 	at
> org.apache.aries.blueprint.container.BeanRecipe.invoke(BeanRecipe.java:958)[7:org.apache.aries.blueprint.core:1.4.0]
> 	at
> org.apache.aries.blueprint.container.BeanRecipe.runBeanProcInit(BeanRecipe.java:712)[7:org.apache.aries.blueprint.core:1.4.0]
> 	... 39 more
> Caused by: javax.ws.rs.NotFoundException
> 	at
> org.apache.cxf.jaxrs.AbstractJAXRSFactoryBean.checkResources(AbstractJAXRSFactoryBean.java:317)
> 	at
> org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:152)
> 	... 47 more
>
> Below is the rest.xml:
> <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
>             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>
> xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0"
>             xmlns:jaxws="http://cxf.apache.org/blueprint/jaxws"
>             xmlns:jaxrs="http://cxf.apache.org/blueprint/jaxrs"
>             xmlns:cxf="http://cxf.apache.org/blueprint/core"
>             xsi:schemaLocation="
>    http://www.osgi.org/xmlns/blueprint/v1.0.0
> http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
>    http://cxf.apache.org/blueprint/jaxws
> http://cxf.apache.org/schemas/blueprint/jaxws.xsd
>    http://cxf.apache.org/blueprint/jaxrs
> http://cxf.apache.org/schemas/blueprint/jaxrs.xsd
>    http://cxf.apache.org/blueprint/core
> http://cxf.apache.org/schemas/blueprint/core.xsd">
>
>      <cxf:bus id="cxfBus1">
>          <cxf:features>
>              <cxf:logging/>
>          </cxf:features>
>      </cxf:bus>
>
>
>      <jaxrs:server address="/rest" id="restService">
>          <jaxrs:serviceBeans>
>           	 <ref component-id="sampleRestServiceImpl"/>
>          </jaxrs:serviceBeans>
>      </jaxrs:server>
>
>
>
>      <bean id="sampleRestServiceImpl"
> class="com.sample.in.rest.SampleRestServiceImpl">
>      	<property name="dbSampleViewer" ref="dbSampleViewerBean"></property>
>      </bean>
>
>     <reference id="dbSampleViewerBean"
> interface="com.sample.services.impl.DBSampleViewer"></reference>
>
> </blueprint>
>
> SampleRestServiceImpl.java
>
> public class SampleRestServiceImpl implements SampleRestService {
>
> 	DBSampleViewer dbSampleViewer;
> 	
> 	public DBSampleViewer getDbSampleViewer() {
> 		return dbSampleViewer;
> 	}
>
>
> 	public void setDbSampleViewer(DBSampleViewer dbSampleViewer) {
> 		this.dbSampleViewer= dbSampleViewer;}
>
> 	@GET
> 	@Path("employeeId/{id}")
> 	@Produces("text/plain")
> 	public String getInstanceById(@PathParam("id") String id) {
> 		return "My Employee id is "+id;
> 	}
> 	
> 	
> 	public SampleRestServiceImpl() {		
> 	}
>
> }
>
> DBSampleViewer is a running service in Karaf, which does some REST API calls
> to fetch DB details.
> Could someone help me with the issue?
>
> Thanks in advance,
> Sapna
>
>
>
>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/Unable-to-start-REST-WS-in-Karaf-2-3-6-using-CXF-tp5750048.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>