You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2018/09/07 17:30:05 UTC
[cxf] 01/02: [CXF-7808] Ensure injectThroughMethod reports its
error in the log otherwise it just swallows the error for end user
This is an automated email from the ASF dual-hosted git repository.
dkulp pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cxf.git
commit a553c4215337e0bfb8d6d5a394d601102df65711
Author: Romain Manni-Bucau <rm...@gmail.com>
AuthorDate: Fri Sep 7 14:53:50 2018 +0200
[CXF-7808] Ensure injectThroughMethod reports its error in the log otherwise it just swallows the error for end user
---
.../jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/InjectionUtils.java | 2 ++
1 file changed, 2 insertions(+)
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 d6b1277..eb570fd 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.ResourceBundle;
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 final class InjectionUtils {
} catch (IllegalAccessException ex) {
reportServerError("METHOD_ACCESS_FAILURE", method.getName());
} catch (InvocationTargetException ex) {
+ LOG.severe(ex.getCause().getMessage(), ex.getCause());
Response r = JAXRSUtils.convertFaultToResponse(ex.getCause(), inMessage);
if (r != null) {
inMessage.getExchange().put(Response.class, r);