RE: Some issues with simple rest application

2024-04-03 Thread COURTAULT Francois
THALES GROUP LIMITED DISTRIBUTION to email recipients 

Hello Richard,

Never mind, my fault: I took and old project which is Java EE 8.

So all the import begins with javax. instead of Jakarta.
No detection when I deploy, with import javax., classes.

But the result is that the REST endpoint I was expecting was missing.

I fix that and everything works fine now    
 
Best Regards.

-Original Message-
From: COURTAULT Francois  
Sent: mercredi 3 avril 2024 16:28
To: users@tomee.apache.org
Subject: RE: Some issues with simple rest application

THALES GROUP LIMITED DISTRIBUTION to email recipients 

Hello Richard,

I think I have a lead. 
The only difference is that in my war I have a beans.xml file whereas on yours 
you don't have.

I will remove it and will let you know if the issue is triggered due to that. 

Best Regards.

-Original Message-
From: Richard Zowalla 
Sent: mardi 2 avril 2024 20:28
To: users@tomee.apache.org
Subject: Re: Some issues with simple rest application

Hi,

I don't see an actual issue here. I have reproduced the example you described 
in your mail here (declare a resource, add an application servlet in web.xml):
 
https://github.com/rzo1/ml-jaxrs-repro

Running that on a TomEE 9.1.2 (Microprofile) deploys the resource as
expected:

02-Apr-2024 20:16:38.994 INFORMATION [main] 
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints REST
Application: http://localhost:8282/myapp->
org.apache.openejb.config.AnnotationDeployer$ProvidedJAXRSApplication@7a023e34
02-Apr-2024 20:16:38.996 INFORMATION [main]
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints 
Service URI: http://localhost:8282/myapp/health -> Pojo
org.apache.tomee.microprofile.health.MicroProfileHealthChecksEndpoint
02-Apr-2024 20:16:38.997 INFORMATION [main]
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints   
GET http://localhost:8282/myapp/health ->  Response
getChecks()   
02-Apr-2024 20:16:38.997 INFORMATION [main]
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints   
GET http://localhost:8282/myapp/health/live->  Response
getLiveChecks()   
02-Apr-2024 20:16:38.997 INFORMATION [main]
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints   
GET http://localhost:8282/myapp/health/ready   ->  Response
getReadyChecks()
02-Apr-2024 20:16:38.997 INFORMATION [main]
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints   
GET http://localhost:8282/myapp/health/started ->  Response
getStartedChecks()
02-Apr-2024 20:16:38.997 INFORMATION [main]
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints 
Service URI: http://localhost:8282/myapp/myresource -> Pojo
com.github.rzo1.MyResource   
02-Apr-2024 20:16:38.997 INFORMATION [main]
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints   
GET http://localhost:8282/myapp/myresource ->  Response test()


Next, I went on and followed the instructions for the second example (add a 
class extending Application, purge web.xml)

https://github.com/rzo1/ml-jaxrs-repro/tree/case-2

Also works as expected:

02-Apr-2024 20:16:38.994 INFORMATION [main] 
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints REST
Application: http://localhost:8282/myapp->
org.apache.openejb.config.AnnotationDeployer$ProvidedJAXRSApplication@7a023e34
02-Apr-2024 20:16:38.996 INFORMATION [main]
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints 
Service URI: http://localhost:8282/myapp/health -> Pojo
org.apache.tomee.microprofile.health.MicroProfileHealthChecksEndpoint
02-Apr-2024 20:16:38.997 INFORMATION [main]
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints   
GET http://localhost:8282/myapp/health ->  Response
getChecks()   
02-Apr-2024 20:16:38.997 INFORMATION [main]
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints   
GET http://localhost:8282/myapp/health/live->  Response
getLiveChecks()   
02-Apr-2024 20:16:38.997 INFORMATION [main]
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints   
GET http://localhost:8282/myapp/health/ready   ->  Response
getReadyChecks()
02-Apr-2024 20:16:38.997 INFORMATION [main]
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints   
GET http://localhost:8282/myapp/health/started ->  Response
getStartedChecks()
02-Apr-2024 20:16:38.997 INFORMATION [main]
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints 
Service URI: http://localhost:8282/myapp/myresource -> Pojo
com.github.rzo1.MyResource   
02-Apr-2024 20:16:38.997 INFORMATION [main]
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints   
GET http://localhost:8282/myapp/myresource ->  Response test()

Might hav

RE: Some issues with simple rest application

2024-04-03 Thread COURTAULT Francois
THALES GROUP LIMITED DISTRIBUTION to email recipients 

Hello Richard,

I think I have a lead. 
The only difference is that in my war I have a beans.xml file whereas on yours 
you don't have.

I will remove it and will let you know if the issue is triggered due to that. 

Best Regards.

-Original Message-
From: Richard Zowalla  
Sent: mardi 2 avril 2024 20:28
To: users@tomee.apache.org
Subject: Re: Some issues with simple rest application

Hi,

I don't see an actual issue here. I have reproduced the example you described 
in your mail here (declare a resource, add an application servlet in web.xml):
 
https://github.com/rzo1/ml-jaxrs-repro

Running that on a TomEE 9.1.2 (Microprofile) deploys the resource as
expected:

02-Apr-2024 20:16:38.994 INFORMATION [main] 
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints REST
Application: http://localhost:8282/myapp->
org.apache.openejb.config.AnnotationDeployer$ProvidedJAXRSApplication@7a023e34
02-Apr-2024 20:16:38.996 INFORMATION [main]
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints 
Service URI: http://localhost:8282/myapp/health -> Pojo
org.apache.tomee.microprofile.health.MicroProfileHealthChecksEndpoint
02-Apr-2024 20:16:38.997 INFORMATION [main]
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints   
GET http://localhost:8282/myapp/health ->  Response
getChecks()   
02-Apr-2024 20:16:38.997 INFORMATION [main]
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints   
GET http://localhost:8282/myapp/health/live->  Response
getLiveChecks()   
02-Apr-2024 20:16:38.997 INFORMATION [main]
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints   
GET http://localhost:8282/myapp/health/ready   ->  Response
getReadyChecks()
02-Apr-2024 20:16:38.997 INFORMATION [main]
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints   
GET http://localhost:8282/myapp/health/started ->  Response
getStartedChecks()
02-Apr-2024 20:16:38.997 INFORMATION [main]
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints 
Service URI: http://localhost:8282/myapp/myresource -> Pojo
com.github.rzo1.MyResource   
02-Apr-2024 20:16:38.997 INFORMATION [main]
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints   
GET http://localhost:8282/myapp/myresource ->  Response test()


Next, I went on and followed the instructions for the second example (add a 
class extending Application, purge web.xml)

https://github.com/rzo1/ml-jaxrs-repro/tree/case-2

Also works as expected:

02-Apr-2024 20:16:38.994 INFORMATION [main] 
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints REST
Application: http://localhost:8282/myapp->
org.apache.openejb.config.AnnotationDeployer$ProvidedJAXRSApplication@7a023e34
02-Apr-2024 20:16:38.996 INFORMATION [main]
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints 
Service URI: http://localhost:8282/myapp/health -> Pojo
org.apache.tomee.microprofile.health.MicroProfileHealthChecksEndpoint
02-Apr-2024 20:16:38.997 INFORMATION [main]
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints   
GET http://localhost:8282/myapp/health ->  Response
getChecks()   
02-Apr-2024 20:16:38.997 INFORMATION [main]
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints   
GET http://localhost:8282/myapp/health/live->  Response
getLiveChecks()   
02-Apr-2024 20:16:38.997 INFORMATION [main]
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints   
GET http://localhost:8282/myapp/health/ready   ->  Response
getReadyChecks()
02-Apr-2024 20:16:38.997 INFORMATION [main]
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints   
GET http://localhost:8282/myapp/health/started ->  Response
getStartedChecks()
02-Apr-2024 20:16:38.997 INFORMATION [main]
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints 
Service URI: http://localhost:8282/myapp/myresource -> Pojo
com.github.rzo1.MyResource   
02-Apr-2024 20:16:38.997 INFORMATION [main]
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints   
GET http://localhost:8282/myapp/myresource ->  Response test()

Might have missed something from your explanation, though.

Gruß
Richard


Am Montag, dem 01.04.2024 um 20:15 + schrieb COURTAULT Francois:
> THALES GROUP LIMITED DISTRIBUTION to email recipients
> 
> Hello everyone,
> 
> After having read the Jakarta Restful 3.0 specification.
> I want to check how it works.
> 
> For that I have built a web application (war) without any Application 
> subclass.
> According to the specification, I have to add a servlet with the name 
> jakarta.ws.rs.core.Application in web.xml.
>

Re: Some issues with simple rest application

2024-04-02 Thread Richard Zowalla
Hi,

I don't see an actual issue here. I have reproduced the example you
described in your mail here (declare a resource, add an application
servlet in web.xml):
 
https://github.com/rzo1/ml-jaxrs-repro

Running that on a TomEE 9.1.2 (Microprofile) deploys the resource as
expected:

02-Apr-2024 20:16:38.994 INFORMATION [main]
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints REST
Application: http://localhost:8282/myapp->
org.apache.openejb.config.AnnotationDeployer$ProvidedJAXRSApplication@7a023e34
02-Apr-2024 20:16:38.996 INFORMATION [main]
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints 
Service URI: http://localhost:8282/myapp/health -> Pojo
org.apache.tomee.microprofile.health.MicroProfileHealthChecksEndpoint
02-Apr-2024 20:16:38.997 INFORMATION [main]
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints   
GET http://localhost:8282/myapp/health ->  Response
getChecks()   
02-Apr-2024 20:16:38.997 INFORMATION [main]
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints   
GET http://localhost:8282/myapp/health/live->  Response
getLiveChecks()   
02-Apr-2024 20:16:38.997 INFORMATION [main]
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints   
GET http://localhost:8282/myapp/health/ready   ->  Response
getReadyChecks()  
02-Apr-2024 20:16:38.997 INFORMATION [main]
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints   
GET http://localhost:8282/myapp/health/started ->  Response
getStartedChecks()
02-Apr-2024 20:16:38.997 INFORMATION [main]
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints 
Service URI: http://localhost:8282/myapp/myresource -> Pojo
com.github.rzo1.MyResource   
02-Apr-2024 20:16:38.997 INFORMATION [main]
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints   
GET http://localhost:8282/myapp/myresource ->  Response test()


Next, I went on and followed the instructions for the second example
(add a class extending Application, purge web.xml)

https://github.com/rzo1/ml-jaxrs-repro/tree/case-2

Also works as expected:

02-Apr-2024 20:16:38.994 INFORMATION [main]
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints REST
Application: http://localhost:8282/myapp->
org.apache.openejb.config.AnnotationDeployer$ProvidedJAXRSApplication@7a023e34
02-Apr-2024 20:16:38.996 INFORMATION [main]
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints 
Service URI: http://localhost:8282/myapp/health -> Pojo
org.apache.tomee.microprofile.health.MicroProfileHealthChecksEndpoint
02-Apr-2024 20:16:38.997 INFORMATION [main]
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints   
GET http://localhost:8282/myapp/health ->  Response
getChecks()   
02-Apr-2024 20:16:38.997 INFORMATION [main]
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints   
GET http://localhost:8282/myapp/health/live->  Response
getLiveChecks()   
02-Apr-2024 20:16:38.997 INFORMATION [main]
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints   
GET http://localhost:8282/myapp/health/ready   ->  Response
getReadyChecks()  
02-Apr-2024 20:16:38.997 INFORMATION [main]
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints   
GET http://localhost:8282/myapp/health/started ->  Response
getStartedChecks()
02-Apr-2024 20:16:38.997 INFORMATION [main]
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints 
Service URI: http://localhost:8282/myapp/myresource -> Pojo
com.github.rzo1.MyResource   
02-Apr-2024 20:16:38.997 INFORMATION [main]
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints   
GET http://localhost:8282/myapp/myresource ->  Response test()

Might have missed something from your explanation, though.

Gruß
Richard


Am Montag, dem 01.04.2024 um 20:15 + schrieb COURTAULT Francois:
> THALES GROUP LIMITED DISTRIBUTION to email recipients
> 
> Hello everyone,
> 
> After having read the Jakarta Restful 3.0 specification.
> I want to check how it works.
> 
> For that I have built a web application (war) without any Application
> subclass.
> According to the specification, I have to add a servlet with the name
> jakarta.ws.rs.core.Application in web.xml.
> In the war, I have:
> 
>   *   a Root resource named MyResource
> @Path("myresource")
> 
> public class MyResource {
> 
>     @GET
> 
>    public Response test () {
> 
>     return Response.ok().build();
> 
>     }
> 
> }
> 
>   *   web.xml with the following section
>     
> 
>     jakarta.ws.rs.core.Application
> 
>     
> 
>     
> 
>     jakarta.ws.rs.core.Application
> 
>     /myapp/*
> 
>     
> 
> Pb when I start up tomee-microprofile 9.1.2, I see:
> 01-Apr-2024 21:42:21.835 INFO [main]
> 

RE: Some issues with simple rest application

2024-04-02 Thread COURTAULT Francois
THALES GROUP LIMITED DISTRIBUTION to email recipients 

Hello everyone,

I posted "Second issue with simple rest application on TomEE 9.1.2".
In fact I deployed the very same application on TomEE 8.0.16 micro-profile 
flavor.

The output is not the same (see below).
02-Apr-2024 12:58:44.825 INFO [main] 
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints REST 
Application: http://localhost:8080/JAXRS/-> 
org.apache.openejb.server.rest.InternalApplication@149238fe
02-Apr-2024 12:58:44.827 INFO [main] 
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints  Service 
URI: http://localhost:8080/JAXRS/health  -> Pojo 
org.apache.geronimo.microprofile.impl.health.cdi.CdiHealthChecksEndpoint
02-Apr-2024 12:58:44.827 INFO [main] 
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints   
GET http://localhost:8080/JAXRS/health  ->  Response 
getChecks()
02-Apr-2024 12:58:44.830 INFO [main] 
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints  Service 
URI: http://localhost:8080/JAXRS/metrics -> Pojo 
org.apache.geronimo.microprofile.metrics.jaxrs.CdiMetricsEndpoints
02-Apr-2024 12:58:44.831 INFO [main] 
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints   
GET http://localhost:8080/JAXRS/metrics ->  Object 
getJson(SecurityContext, UriInfo)
02-Apr-2024 12:58:44.831 INFO [main] 
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints   
GET http://localhost:8080/JAXRS/metrics ->  String 
getText(SecurityContext, UriInfo)
02-Apr-2024 12:58:44.831 INFO [main] 
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints   
GET http://localhost:8080/JAXRS/metrics/{registry}  ->  Object 
getJson(String, SecurityContext, UriInfo)
02-Apr-2024 12:58:44.831 INFO [main] 
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints   
GET http://localhost:8080/JAXRS/metrics/{registry}  ->  String 
getText(String, SecurityContext, UriInfo)
02-Apr-2024 12:58:44.831 INFO [main] 
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints   
GET http://localhost:8080/JAXRS/metrics/{registry}/{metric} ->  Object 
getJson(String, String, SecurityContext, UriInfo)
02-Apr-2024 12:58:44.831 INFO [main] 
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints   
GET http://localhost:8080/JAXRS/metrics/{registry}/{metric} ->  String 
getText(String, String, SecurityContext, UriInfo)
02-Apr-2024 12:58:44.831 INFO [main] 
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints   
OPTIONS http://localhost:8080/JAXRS/metrics/{registry}  ->  Object 
getMetadata(String, SecurityContext, UriInfo)
02-Apr-2024 12:58:44.831 INFO [main] 
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints   
OPTIONS http://localhost:8080/JAXRS/metrics/{registry}/{metric} ->  Object 
getMetadata(String, String, SecurityContext, UriInfo)
02-Apr-2024 12:58:44.831 INFO [main] 
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints  Service 
URI: http://localhost:8080/JAXRS/myresource  -> Pojo 
jaxrs.skeleton.MyResource
02-Apr-2024 12:58:44.831 INFO [main] 
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints   
GET http://localhost:8080/JAXRS/myresource  ->  Response 
test()
02-Apr-2024 12:58:44.831 INFO [main] 
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints  Service 
URI: http://localhost:8080/JAXRS/openapi -> Pojo 
org.apache.geronimo.microprofile.openapi.jaxrs.OpenAPIEndpoint
02-Apr-2024 12:58:44.831 INFO [main] 
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints   
GET http://localhost:8080/JAXRS/openapi ->  OpenAPI 
get()

This time I am able to see a GET on a path with myresource 

So big issue on TomEE 9.1.2 micro-profile ? 

Best Regards.


-Original Message-
From: COURTAULT Francois  
Sent: mardi 2 avril 2024 09:50
To: users@tomee.apache.org
Subject: RE: Some issues with simple rest application

THALES GROUP LIMITED DISTRIBUTION to email recipients 

Hello Kean,

I am using TomEE 9.1.2 microprofile flavor.
In the conf/system.properties file, I have this line tomee.mp.scan = all So 
it's not due to this lack of this property unfortunately.

Thanks for trying to help me.
I am able to provide you the war if needed.

Best Regards.

-Original Message-
From: Kean Erickson 
Sent: lundi 1 avril 2024 23:25
To: users@tomee.apache.org
Subject: Re: Some issues with simple rest application

If you're on tomee plus or plume, there is a system.proprties flag needed to 
turn on the automatic resource scanning

tomee.mp.scan = all

On Mon, Apr 1, 2024, 1

RE: Some issues with simple rest application

2024-04-02 Thread COURTAULT Francois
THALES GROUP LIMITED DISTRIBUTION to email recipients 

Hello Kean,

I am using TomEE 9.1.2 microprofile flavor.
In the conf/system.properties file, I have this line tomee.mp.scan = all
So it's not due to this lack of this property unfortunately.

Thanks for trying to help me.
I am able to provide you the war if needed.

Best Regards.

-Original Message-
From: Kean Erickson  
Sent: lundi 1 avril 2024 23:25
To: users@tomee.apache.org
Subject: Re: Some issues with simple rest application

If you're on tomee plus or plume, there is a system.proprties flag needed to 
turn on the automatic resource scanning

tomee.mp.scan = all

On Mon, Apr 1, 2024, 1:16 PM COURTAULT Francois 
 wrote:

> THALES GROUP LIMITED DISTRIBUTION to email recipients
>
> Hello everyone,
>
> After having read the Jakarta Restful 3.0 specification.
> I want to check how it works.
>
> For that I have built a web application (war) without any Application 
> subclass.
> According to the specification, I have to add a servlet with the name 
> jakarta.ws.rs.core.Application in web.xml.
> In the war, I have:
>
>   *   a Root resource named MyResource
> @Path("myresource")
>
> public class MyResource {
>
> @GET
>
>public Response test () {
>
> return Response.ok().build();
>
> }
>
> }
>
>   *   web.xml with the following section
> 
>
> jakarta.ws.rs.core.Application
>
> 
>
> 
>
> jakarta.ws.rs.core.Application
>
> /myapp/*
>
> 
>
> Pb when I start up tomee-microprofile 9.1.2, I see:
> 01-Apr-2024 21:42:21.835 INFO [main]
> org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints
> Service URI: http://localhost:8080/JAXRS/myapp/health -> Pojo
> org.apache.tomee.microprofile.health.MicroProfileHealthChecksEndpoint
> 01-Apr-2024 21:42:21.835 INFO [main]
> org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints
>GET http://localhost:8080/JAXRS/myapp/health ->  Response
> getChecks()
> 01-Apr-2024 21:42:21.835 INFO [main]
> org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints
>GET http://localhost:8080/JAXRS/myapp/health/live->  Response
> getLiveChecks()
> 01-Apr-2024 21:42:21.835 INFO [main]
> org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints
>GET http://localhost:8080/JAXRS/myapp/health/ready   ->  Response
> getReadyChecks()
> 01-Apr-2024 21:42:21.835 INFO [main]
> org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints
>GET http://localhost:8080/JAXRS/myapp/health/started ->  Response
> getStartedChecks()
>
> No GET on a path with myresource ☹
> What’s wrong in my understanding  of the spec (“REQUIRED …. and to 
> automatically discover all root resource classes …”) ?
>
> Best Regards.
>
>
>
>


Re: Some issues with simple rest application

2024-04-01 Thread Kean Erickson
If you're on tomee plus or plume, there is a system.proprties flag needed
to turn on the automatic resource scanning

tomee.mp.scan = all

On Mon, Apr 1, 2024, 1:16 PM COURTAULT Francois
 wrote:

> THALES GROUP LIMITED DISTRIBUTION to email recipients
>
> Hello everyone,
>
> After having read the Jakarta Restful 3.0 specification.
> I want to check how it works.
>
> For that I have built a web application (war) without any Application
> subclass.
> According to the specification, I have to add a servlet with the name
> jakarta.ws.rs.core.Application in web.xml.
> In the war, I have:
>
>   *   a Root resource named MyResource
> @Path("myresource")
>
> public class MyResource {
>
> @GET
>
>public Response test () {
>
> return Response.ok().build();
>
> }
>
> }
>
>   *   web.xml with the following section
> 
>
> jakarta.ws.rs.core.Application
>
> 
>
> 
>
> jakarta.ws.rs.core.Application
>
> /myapp/*
>
> 
>
> Pb when I start up tomee-microprofile 9.1.2, I see:
> 01-Apr-2024 21:42:21.835 INFO [main]
> org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints
> Service URI: http://localhost:8080/JAXRS/myapp/health -> Pojo
> org.apache.tomee.microprofile.health.MicroProfileHealthChecksEndpoint
> 01-Apr-2024 21:42:21.835 INFO [main]
> org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints
>GET http://localhost:8080/JAXRS/myapp/health ->  Response
> getChecks()
> 01-Apr-2024 21:42:21.835 INFO [main]
> org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints
>GET http://localhost:8080/JAXRS/myapp/health/live->  Response
> getLiveChecks()
> 01-Apr-2024 21:42:21.835 INFO [main]
> org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints
>GET http://localhost:8080/JAXRS/myapp/health/ready   ->  Response
> getReadyChecks()
> 01-Apr-2024 21:42:21.835 INFO [main]
> org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints
>GET http://localhost:8080/JAXRS/myapp/health/started ->  Response
> getStartedChecks()
>
> No GET on a path with myresource ☹
> What’s wrong in my understanding  of the spec (“REQUIRED …. and to
> automatically discover all root resource classes …”) ?
>
> Best Regards.
>
>
>
>