Jaap,
1) You can use the web: commands to verify the expected context exists
2) Review karaf.log  to verify the the bundle startup and post relevant errors
3) I use the following features:
  <feature>jackson</feature>
 <feature>pax-web-http-whiteboard</feature>
 <feature>aries-jax-rs-whiteboard</feature>
 <feature>aries-jax-rs-whiteboard-jackson</feature>

Paul Spencer

> On Jan 23, 2023, at 4:49 AM, Jaap Gordijn <[email protected]> wrote:
> 
> Hi,
> 
> I have a problem with aries-jax-rs-whiteboard and the use of
> @JaxrsApplicationSelect and @JSONRequired in combination.
> That results in an inaccessible service (404).
> If I disable the JSON annotations, the /test service works (via
> /example/text
> 
> Code:
> 
> @Component(service = Rest.class, scope = ServiceScope.PROTOTYPE)
> @JaxrsResource
> @JaxrsApplicationSelect("(" + JaxrsWhiteboardConstants.JAX_RS_NAME +
> "=MyApplication)")
> @JSONRequired
> @Produces(MediaType.APPLICATION_JSON)
> public class Rest {
>    
>    @Reference(scope=ReferenceScope.PROTOTYPE_REQUIRED)
>    private volatile PersonService personService;
> 
>    @GET
>    @Path("/person")
>    public List<PersonDto> listPersons() {
>        return personService.select(); 
>    }
>    
>    @GET
>    @Path("/test")
>    public String test() {
>        return "test"; 
>    }
> }
> 
> @Component(service=Application.class, property =
> {"servlet.init.hide-service-list-page=true"} )
> @JaxrsApplicationBase("example")
> @JaxrsName("MyApplication")
> public class MyApplication extends Application {
> 
> }
> 
> 
> <repository>mvn:org.apache.cxf.karaf/apache-cxf/3.5.5/xml/features</reposito
> ry>
> 
> <repository>mvn:org.apache.aries.jax.rs/org.apache.aries.jax.rs.features/2.0
> .2/xml</repositor
>       ....
>       <feature>hibernate</feature>
>       <feature>hibernate-validator</feature>
>       ...
> 
> I use Karaf 4.4.3
> 
> Any ideas?
> 
> Best,
> 
> -- Jaap
> 

Reply via email to