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