[ 
https://issues.apache.org/jira/browse/CXF-7808?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16607401#comment-16607401
 ] 

ASF GitHub Bot commented on CXF-7808:
-------------------------------------

dkulp closed pull request #442: [CXF-7808] Ensure injectThroughMethod reports 
its error in the log
URL: https://github.com/apache/cxf/pull/442
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/InjectionUtils.java
 
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/InjectionUtils.java
index d6b12778623..cee4a592f62 100644
--- 
a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/InjectionUtils.java
+++ 
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/InjectionUtils.java
@@ -49,6 +49,7 @@
 import java.util.Set;
 import java.util.SortedSet;
 import java.util.TreeSet;
+import java.util.logging.Level;
 import java.util.logging.Logger;
 
 import javax.ws.rs.WebApplicationException;
@@ -366,6 +367,7 @@ public static void injectThroughMethod(Object requestObject,
         } catch (IllegalAccessException ex) {
             reportServerError("METHOD_ACCESS_FAILURE", method.getName());
         } catch (InvocationTargetException ex) {
+            LOG.log(Level.SEVERE, ex.getCause().getMessage(), ex);
             Response r = JAXRSUtils.convertFaultToResponse(ex.getCause(), 
inMessage);
             if (r != null) {
                 inMessage.getExchange().put(Response.class, r);


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> Ensure org.apache.cxf.jaxrs.utils.InjectionUtils#injectThroughMethod logs an 
> error
> ----------------------------------------------------------------------------------
>
>                 Key: CXF-7808
>                 URL: https://issues.apache.org/jira/browse/CXF-7808
>             Project: CXF
>          Issue Type: Improvement
>            Reporter: Romain Manni-Bucau
>            Priority: Major
>
> Currently org.apache.cxf.jaxrs.utils.InjectionUtils#injectThroughMethod 
> doesn't log an error message which means you have a 500 and a big stack trace 
> but not the cause so it is very hard for end users to understand what happens 
> without debugging the internals.
> Would be great to have a log error happening in such a case.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to