You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Glen Mazza (JIRA)" <ji...@apache.org> on 2011/01/16 00:14:45 UTC
[jira] Created: (CXF-3248) JAX-RS (wrongly?) complaining about no
resource methods for ExceptionMappers.
JAX-RS (wrongly?) complaining about no resource methods for ExceptionMappers.
-----------------------------------------------------------------------------
Key: CXF-3248
URL: https://issues.apache.org/jira/browse/CXF-3248
Project: CXF
Issue Type: Improvement
Components: JAX-RS
Affects Versions: 2.3.2
Reporter: Glen Mazza
Priority: Minor
Example 7-1 of the JAX-RS book samples (see https://issues.apache.org/jira/browse/CXF-3247) is returning a unclear error message when it processes the following ExceptionMapper:
@Provider
public class NotFoundExceptionMapper implements ExceptionMapper<NotFoundException>
{
public Response toResponse(NotFoundException exception)
{
return Response.status(Response.Status.NOT_FOUND)
.entity(exception.getMessage())
.type("text/plain").build();
}
}
This is the error message it's returning:
WARNING: No resource methods have been found for resource class com.restfully.shop.services.NotFoundExceptionMapper
I'm not sure why an exception mapper needs to have resource methods, or what a "resource method" is for that matter. I think this error is appropriate for root resources only and not exception mappers, if so, this message should be suppressed for exception mappers. OTOH, if this warning does have meaning for exception mappers, could it be made clearer for newbies/novices?
Note this example has other bugs with it, not related to this problem (https://issues.jboss.org/browse/RESTEASY-495).
To duplicate, download and extract RESTEasy and make the pom.xml and web.xml changes all described in https://issues.apache.org/jira/browse/CXF-3247. Then just run mvn clean install and you'll see the above error message.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (CXF-3248) JAX-RS (wrongly?) complaining about no
resource methods for ExceptionMappers.
Posted by "Glen Mazza (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-3248?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Glen Mazza updated CXF-3248:
----------------------------
Issue Type: Bug (was: Improvement)
> JAX-RS (wrongly?) complaining about no resource methods for ExceptionMappers.
> -----------------------------------------------------------------------------
>
> Key: CXF-3248
> URL: https://issues.apache.org/jira/browse/CXF-3248
> Project: CXF
> Issue Type: Bug
> Components: JAX-RS
> Affects Versions: 2.3.2
> Reporter: Glen Mazza
> Priority: Minor
>
> Example 7-1 of the JAX-RS book samples (see https://issues.apache.org/jira/browse/CXF-3247) is returning a unclear error message when it processes the following ExceptionMapper:
> @Provider
> public class NotFoundExceptionMapper implements ExceptionMapper<NotFoundException>
> {
> public Response toResponse(NotFoundException exception)
> {
> return Response.status(Response.Status.NOT_FOUND)
> .entity(exception.getMessage())
> .type("text/plain").build();
> }
> }
> This is the error message it's returning:
> WARNING: No resource methods have been found for resource class com.restfully.shop.services.NotFoundExceptionMapper
> I'm not sure why an exception mapper needs to have resource methods, or what a "resource method" is for that matter. I think this error is appropriate for root resources only and not exception mappers, if so, this message should be suppressed for exception mappers. OTOH, if this warning does have meaning for exception mappers, could it be made clearer for newbies/novices?
> Note this example has other bugs with it, not related to this problem (https://issues.jboss.org/browse/RESTEASY-495).
> To duplicate, download and extract RESTEasy and make the pom.xml and web.xml changes all described in https://issues.apache.org/jira/browse/CXF-3247. Then just run mvn clean install and you'll see the above error message.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Reopened: (CXF-3248) CXF JAX-RS assumes custom Application
returns providers only via Application.getSingletons
Posted by "Sergey Beryozkin (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-3248?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sergey Beryozkin reopened CXF-3248:
-----------------------------------
> CXF JAX-RS assumes custom Application returns providers only via Application.getSingletons
> -------------------------------------------------------------------------------------------
>
> Key: CXF-3248
> URL: https://issues.apache.org/jira/browse/CXF-3248
> Project: CXF
> Issue Type: Bug
> Components: JAX-RS
> Affects Versions: 2.3.2
> Reporter: Glen Mazza
> Assignee: Sergey Beryozkin
> Priority: Minor
> Fix For: 2.3.2, 2.4
>
>
> Example 7-1 of the JAX-RS book samples (see https://issues.apache.org/jira/browse/CXF-3247) is returning a unclear error message when it processes the following ExceptionMapper:
> @Provider
> public class NotFoundExceptionMapper implements ExceptionMapper<NotFoundException>
> {
> public Response toResponse(NotFoundException exception)
> {
> return Response.status(Response.Status.NOT_FOUND)
> .entity(exception.getMessage())
> .type("text/plain").build();
> }
> }
> This is the error message it's returning:
> WARNING: No resource methods have been found for resource class com.restfully.shop.services.NotFoundExceptionMapper
> I'm not sure why an exception mapper needs to have resource methods, or what a "resource method" is for that matter. I think this error is appropriate for root resources only and not exception mappers, if so, this message should be suppressed for exception mappers. OTOH, if this warning does have meaning for exception mappers, could it be made clearer for newbies/novices?
> Note this example has other bugs with it, not related to this problem (https://issues.jboss.org/browse/RESTEASY-495).
> To duplicate, download and extract RESTEasy and make the pom.xml and web.xml changes all described in https://issues.apache.org/jira/browse/CXF-3247. Then just run mvn clean install and you'll see the above error message.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (CXF-3248) CXF JAX-RS assumes custom Application
returns providers only via Application.getSingletons
Posted by "Sergey Beryozkin (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-3248?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sergey Beryozkin resolved CXF-3248.
-----------------------------------
Resolution: Fixed
> CXF JAX-RS assumes custom Application returns providers only via Application.getSingletons
> -------------------------------------------------------------------------------------------
>
> Key: CXF-3248
> URL: https://issues.apache.org/jira/browse/CXF-3248
> Project: CXF
> Issue Type: Bug
> Components: JAX-RS
> Affects Versions: 2.3.2
> Reporter: Glen Mazza
> Assignee: Sergey Beryozkin
> Priority: Minor
> Fix For: 2.3.2, 2.4
>
>
> Example 7-1 of the JAX-RS book samples (see https://issues.apache.org/jira/browse/CXF-3247) is returning a unclear error message when it processes the following ExceptionMapper:
> @Provider
> public class NotFoundExceptionMapper implements ExceptionMapper<NotFoundException>
> {
> public Response toResponse(NotFoundException exception)
> {
> return Response.status(Response.Status.NOT_FOUND)
> .entity(exception.getMessage())
> .type("text/plain").build();
> }
> }
> This is the error message it's returning:
> WARNING: No resource methods have been found for resource class com.restfully.shop.services.NotFoundExceptionMapper
> I'm not sure why an exception mapper needs to have resource methods, or what a "resource method" is for that matter. I think this error is appropriate for root resources only and not exception mappers, if so, this message should be suppressed for exception mappers. OTOH, if this warning does have meaning for exception mappers, could it be made clearer for newbies/novices?
> Note this example has other bugs with it, not related to this problem (https://issues.jboss.org/browse/RESTEASY-495).
> To duplicate, download and extract RESTEasy and make the pom.xml and web.xml changes all described in https://issues.apache.org/jira/browse/CXF-3247. Then just run mvn clean install and you'll see the above error message.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (CXF-3248) CXF JAX-RS assumes custom Application
returns providers only via Application.getSingletons
Posted by "Sergey Beryozkin (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-3248?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sergey Beryozkin resolved CXF-3248.
-----------------------------------
Resolution: Fixed
Fix Version/s: 2.4
2.3.2
> CXF JAX-RS assumes custom Application returns providers only via Application.getSingletons
> -------------------------------------------------------------------------------------------
>
> Key: CXF-3248
> URL: https://issues.apache.org/jira/browse/CXF-3248
> Project: CXF
> Issue Type: Bug
> Components: JAX-RS
> Affects Versions: 2.3.2
> Reporter: Glen Mazza
> Assignee: Sergey Beryozkin
> Priority: Minor
> Fix For: 2.3.2, 2.4
>
>
> Example 7-1 of the JAX-RS book samples (see https://issues.apache.org/jira/browse/CXF-3247) is returning a unclear error message when it processes the following ExceptionMapper:
> @Provider
> public class NotFoundExceptionMapper implements ExceptionMapper<NotFoundException>
> {
> public Response toResponse(NotFoundException exception)
> {
> return Response.status(Response.Status.NOT_FOUND)
> .entity(exception.getMessage())
> .type("text/plain").build();
> }
> }
> This is the error message it's returning:
> WARNING: No resource methods have been found for resource class com.restfully.shop.services.NotFoundExceptionMapper
> I'm not sure why an exception mapper needs to have resource methods, or what a "resource method" is for that matter. I think this error is appropriate for root resources only and not exception mappers, if so, this message should be suppressed for exception mappers. OTOH, if this warning does have meaning for exception mappers, could it be made clearer for newbies/novices?
> Note this example has other bugs with it, not related to this problem (https://issues.jboss.org/browse/RESTEASY-495).
> To duplicate, download and extract RESTEasy and make the pom.xml and web.xml changes all described in https://issues.apache.org/jira/browse/CXF-3247. Then just run mvn clean install and you'll see the above error message.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (CXF-3248) CXF JAX-RS assumes custom Application
returns providers only via Application.getSingletons
Posted by "Sergey Beryozkin (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-3248?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sergey Beryozkin updated CXF-3248:
----------------------------------
Summary: CXF JAX-RS assumes custom Application returns providers only via Application.getSingletons (was: JAX-RS (wrongly?) complaining about no resource methods for ExceptionMappers.)
Application.getClasses() can also return provider classes, not only root resource classes
> CXF JAX-RS assumes custom Application returns providers only via Application.getSingletons
> -------------------------------------------------------------------------------------------
>
> Key: CXF-3248
> URL: https://issues.apache.org/jira/browse/CXF-3248
> Project: CXF
> Issue Type: Bug
> Components: JAX-RS
> Affects Versions: 2.3.2
> Reporter: Glen Mazza
> Priority: Minor
>
> Example 7-1 of the JAX-RS book samples (see https://issues.apache.org/jira/browse/CXF-3247) is returning a unclear error message when it processes the following ExceptionMapper:
> @Provider
> public class NotFoundExceptionMapper implements ExceptionMapper<NotFoundException>
> {
> public Response toResponse(NotFoundException exception)
> {
> return Response.status(Response.Status.NOT_FOUND)
> .entity(exception.getMessage())
> .type("text/plain").build();
> }
> }
> This is the error message it's returning:
> WARNING: No resource methods have been found for resource class com.restfully.shop.services.NotFoundExceptionMapper
> I'm not sure why an exception mapper needs to have resource methods, or what a "resource method" is for that matter. I think this error is appropriate for root resources only and not exception mappers, if so, this message should be suppressed for exception mappers. OTOH, if this warning does have meaning for exception mappers, could it be made clearer for newbies/novices?
> Note this example has other bugs with it, not related to this problem (https://issues.jboss.org/browse/RESTEASY-495).
> To duplicate, download and extract RESTEasy and make the pom.xml and web.xml changes all described in https://issues.apache.org/jira/browse/CXF-3247. Then just run mvn clean install and you'll see the above error message.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (CXF-3248) CXF JAX-RS assumes custom Application
returns providers only via Application.getSingletons
Posted by "Sergey Beryozkin (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-3248?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sergey Beryozkin closed CXF-3248.
---------------------------------
Resolution: Fixed
Reopened the wrong issue
> CXF JAX-RS assumes custom Application returns providers only via Application.getSingletons
> -------------------------------------------------------------------------------------------
>
> Key: CXF-3248
> URL: https://issues.apache.org/jira/browse/CXF-3248
> Project: CXF
> Issue Type: Bug
> Components: JAX-RS
> Affects Versions: 2.3.2
> Reporter: Glen Mazza
> Assignee: Sergey Beryozkin
> Priority: Minor
> Fix For: 2.3.2, 2.4
>
>
> Example 7-1 of the JAX-RS book samples (see https://issues.apache.org/jira/browse/CXF-3247) is returning a unclear error message when it processes the following ExceptionMapper:
> @Provider
> public class NotFoundExceptionMapper implements ExceptionMapper<NotFoundException>
> {
> public Response toResponse(NotFoundException exception)
> {
> return Response.status(Response.Status.NOT_FOUND)
> .entity(exception.getMessage())
> .type("text/plain").build();
> }
> }
> This is the error message it's returning:
> WARNING: No resource methods have been found for resource class com.restfully.shop.services.NotFoundExceptionMapper
> I'm not sure why an exception mapper needs to have resource methods, or what a "resource method" is for that matter. I think this error is appropriate for root resources only and not exception mappers, if so, this message should be suppressed for exception mappers. OTOH, if this warning does have meaning for exception mappers, could it be made clearer for newbies/novices?
> Note this example has other bugs with it, not related to this problem (https://issues.jboss.org/browse/RESTEASY-495).
> To duplicate, download and extract RESTEasy and make the pom.xml and web.xml changes all described in https://issues.apache.org/jira/browse/CXF-3247. Then just run mvn clean install and you'll see the above error message.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Reopened: (CXF-3248) CXF JAX-RS assumes custom Application
returns providers only via Application.getSingletons
Posted by "Sergey Beryozkin (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-3248?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sergey Beryozkin reopened CXF-3248:
-----------------------------------
> CXF JAX-RS assumes custom Application returns providers only via Application.getSingletons
> -------------------------------------------------------------------------------------------
>
> Key: CXF-3248
> URL: https://issues.apache.org/jira/browse/CXF-3248
> Project: CXF
> Issue Type: Bug
> Components: JAX-RS
> Affects Versions: 2.3.2
> Reporter: Glen Mazza
> Assignee: Sergey Beryozkin
> Priority: Minor
> Fix For: 2.3.2, 2.4
>
>
> Example 7-1 of the JAX-RS book samples (see https://issues.apache.org/jira/browse/CXF-3247) is returning a unclear error message when it processes the following ExceptionMapper:
> @Provider
> public class NotFoundExceptionMapper implements ExceptionMapper<NotFoundException>
> {
> public Response toResponse(NotFoundException exception)
> {
> return Response.status(Response.Status.NOT_FOUND)
> .entity(exception.getMessage())
> .type("text/plain").build();
> }
> }
> This is the error message it's returning:
> WARNING: No resource methods have been found for resource class com.restfully.shop.services.NotFoundExceptionMapper
> I'm not sure why an exception mapper needs to have resource methods, or what a "resource method" is for that matter. I think this error is appropriate for root resources only and not exception mappers, if so, this message should be suppressed for exception mappers. OTOH, if this warning does have meaning for exception mappers, could it be made clearer for newbies/novices?
> Note this example has other bugs with it, not related to this problem (https://issues.jboss.org/browse/RESTEASY-495).
> To duplicate, download and extract RESTEasy and make the pom.xml and web.xml changes all described in https://issues.apache.org/jira/browse/CXF-3247. Then just run mvn clean install and you'll see the above error message.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (CXF-3248) CXF JAX-RS assumes custom Application
returns providers only via Application.getSingletons
Posted by "Sergey Beryozkin (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-3248?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sergey Beryozkin reassigned CXF-3248:
-------------------------------------
Assignee: Sergey Beryozkin
> CXF JAX-RS assumes custom Application returns providers only via Application.getSingletons
> -------------------------------------------------------------------------------------------
>
> Key: CXF-3248
> URL: https://issues.apache.org/jira/browse/CXF-3248
> Project: CXF
> Issue Type: Bug
> Components: JAX-RS
> Affects Versions: 2.3.2
> Reporter: Glen Mazza
> Assignee: Sergey Beryozkin
> Priority: Minor
>
> Example 7-1 of the JAX-RS book samples (see https://issues.apache.org/jira/browse/CXF-3247) is returning a unclear error message when it processes the following ExceptionMapper:
> @Provider
> public class NotFoundExceptionMapper implements ExceptionMapper<NotFoundException>
> {
> public Response toResponse(NotFoundException exception)
> {
> return Response.status(Response.Status.NOT_FOUND)
> .entity(exception.getMessage())
> .type("text/plain").build();
> }
> }
> This is the error message it's returning:
> WARNING: No resource methods have been found for resource class com.restfully.shop.services.NotFoundExceptionMapper
> I'm not sure why an exception mapper needs to have resource methods, or what a "resource method" is for that matter. I think this error is appropriate for root resources only and not exception mappers, if so, this message should be suppressed for exception mappers. OTOH, if this warning does have meaning for exception mappers, could it be made clearer for newbies/novices?
> Note this example has other bugs with it, not related to this problem (https://issues.jboss.org/browse/RESTEASY-495).
> To duplicate, download and extract RESTEasy and make the pom.xml and web.xml changes all described in https://issues.apache.org/jira/browse/CXF-3247. Then just run mvn clean install and you'll see the above error message.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CXF-3248) JAX-RS (wrongly?) complaining about no
resource methods for ExceptionMappers.
Posted by "Glen Mazza (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-3248?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12982357#action_12982357 ]
Glen Mazza commented on CXF-3248:
---------------------------------
Instructions for running the example are in the last sentence of the description. NotFoundExceptionMapper is as given in the description, and linked in as follows:
public class ShoppingApplication extends Application
{
private Set<Object> singletons = new HashSet<Object>();
private Set<Class<?>> classes = new HashSet<Class<?>>();
public ShoppingApplication()
{
singletons.add(new CustomerResource());
classes.add(NotFoundExceptionMapper.class);
}
...
}
> JAX-RS (wrongly?) complaining about no resource methods for ExceptionMappers.
> -----------------------------------------------------------------------------
>
> Key: CXF-3248
> URL: https://issues.apache.org/jira/browse/CXF-3248
> Project: CXF
> Issue Type: Bug
> Components: JAX-RS
> Affects Versions: 2.3.2
> Reporter: Glen Mazza
> Priority: Minor
>
> Example 7-1 of the JAX-RS book samples (see https://issues.apache.org/jira/browse/CXF-3247) is returning a unclear error message when it processes the following ExceptionMapper:
> @Provider
> public class NotFoundExceptionMapper implements ExceptionMapper<NotFoundException>
> {
> public Response toResponse(NotFoundException exception)
> {
> return Response.status(Response.Status.NOT_FOUND)
> .entity(exception.getMessage())
> .type("text/plain").build();
> }
> }
> This is the error message it's returning:
> WARNING: No resource methods have been found for resource class com.restfully.shop.services.NotFoundExceptionMapper
> I'm not sure why an exception mapper needs to have resource methods, or what a "resource method" is for that matter. I think this error is appropriate for root resources only and not exception mappers, if so, this message should be suppressed for exception mappers. OTOH, if this warning does have meaning for exception mappers, could it be made clearer for newbies/novices?
> Note this example has other bugs with it, not related to this problem (https://issues.jboss.org/browse/RESTEASY-495).
> To duplicate, download and extract RESTEasy and make the pom.xml and web.xml changes all described in https://issues.apache.org/jira/browse/CXF-3247. Then just run mvn clean install and you'll see the above error message.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CXF-3248) JAX-RS (wrongly?) complaining about no
resource methods for ExceptionMappers.
Posted by "Sergey Beryozkin (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-3248?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12982341#action_12982341 ]
Sergey Beryozkin commented on CXF-3248:
---------------------------------------
Glen, how do you run this example in CXF ? Are you sure you haven't specified NotFoundExceptionMapper as a service bean ?
> JAX-RS (wrongly?) complaining about no resource methods for ExceptionMappers.
> -----------------------------------------------------------------------------
>
> Key: CXF-3248
> URL: https://issues.apache.org/jira/browse/CXF-3248
> Project: CXF
> Issue Type: Bug
> Components: JAX-RS
> Affects Versions: 2.3.2
> Reporter: Glen Mazza
> Priority: Minor
>
> Example 7-1 of the JAX-RS book samples (see https://issues.apache.org/jira/browse/CXF-3247) is returning a unclear error message when it processes the following ExceptionMapper:
> @Provider
> public class NotFoundExceptionMapper implements ExceptionMapper<NotFoundException>
> {
> public Response toResponse(NotFoundException exception)
> {
> return Response.status(Response.Status.NOT_FOUND)
> .entity(exception.getMessage())
> .type("text/plain").build();
> }
> }
> This is the error message it's returning:
> WARNING: No resource methods have been found for resource class com.restfully.shop.services.NotFoundExceptionMapper
> I'm not sure why an exception mapper needs to have resource methods, or what a "resource method" is for that matter. I think this error is appropriate for root resources only and not exception mappers, if so, this message should be suppressed for exception mappers. OTOH, if this warning does have meaning for exception mappers, could it be made clearer for newbies/novices?
> Note this example has other bugs with it, not related to this problem (https://issues.jboss.org/browse/RESTEASY-495).
> To duplicate, download and extract RESTEasy and make the pom.xml and web.xml changes all described in https://issues.apache.org/jira/browse/CXF-3247. Then just run mvn clean install and you'll see the above error message.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.