cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf git commit: [CXF-7483] Logging the debug message in case of the auto-wire failures
Date Wed, 23 Aug 2017 13:25:52 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.0.x-fixes b61f6ddd9 -> c091b35b1


[CXF-7483] Logging the debug message in case of the auto-wire failures


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/c091b35b
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/c091b35b
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/c091b35b

Branch: refs/heads/3.0.x-fixes
Commit: c091b35b131dcbd5c2b8bfc7d713aa574afff1e0
Parents: b61f6dd
Author: Sergey Beryozkin <sberyozkin@gmail.com>
Authored: Wed Aug 23 14:17:44 2017 +0100
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
Committed: Wed Aug 23 14:25:31 2017 +0100

----------------------------------------------------------------------
 .../spring/JAXRSServerFactoryBeanDefinitionParser.java    | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/c091b35b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/spring/JAXRSServerFactoryBeanDefinitionParser.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/spring/JAXRSServerFactoryBeanDefinitionParser.java
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/spring/JAXRSServerFactoryBeanDefinitionParser.java
index 4f56702..6e0dba6 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/spring/JAXRSServerFactoryBeanDefinitionParser.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/spring/JAXRSServerFactoryBeanDefinitionParser.java
@@ -24,6 +24,7 @@ import java.util.ArrayList;
 import java.util.Collection;
 import java.util.List;
 import java.util.Map;
+import java.util.logging.Logger;
 
 import javax.ws.rs.Path;
 import javax.ws.rs.ext.Provider;
@@ -33,6 +34,7 @@ import org.w3c.dom.Element;
 
 import org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor;
 import org.apache.cxf.common.classloader.ClassLoaderUtils;
+import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.common.util.ClasspathScanner;
 import org.apache.cxf.common.util.StringUtils;
 import org.apache.cxf.configuration.spring.AbstractBeanDefinitionParser;
@@ -41,6 +43,7 @@ import org.apache.cxf.jaxrs.JAXRSServerFactoryBean;
 import org.apache.cxf.jaxrs.JAXRSServiceFactoryBean;
 import org.apache.cxf.jaxrs.lifecycle.ResourceProvider;
 import org.apache.cxf.jaxrs.model.UserResource;
+import org.apache.cxf.jaxrs.utils.ExceptionUtils;
 import org.apache.cxf.jaxrs.utils.ResourceUtils;
 import org.springframework.beans.BeansException;
 import org.springframework.beans.factory.BeanCreationException;
@@ -55,8 +58,9 @@ import org.springframework.context.ApplicationContextAware;
 
 
 public class JAXRSServerFactoryBeanDefinitionParser extends AbstractBeanDefinitionParser
{
-    
-    
+
+    private static final Logger LOG = LogUtils.getL7dLogger(JAXRSServerFactoryBeanDefinitionParser.class);
+
     public JAXRSServerFactoryBeanDefinitionParser() {
         super();
         setBeanClass(SpringJAXRSServerFactoryBean.class);
@@ -269,6 +273,8 @@ public class JAXRSServerFactoryBeanDefinitionParser extends AbstractBeanDefiniti
                 try {
                     bean = beanFactory.createBean(clazz, AutowireCapableBeanFactory.AUTOWIRE_BY_TYPE,
true);
                 } catch (Exception ex) {
+                    String stackTrace = ExceptionUtils.getStackTrace(ex);
+                    LOG.fine("Autowire failure for a " + clazz.getName() + " bean: " + stackTrace);
                     bean = beanFactory.createBean(clazz);
                 }
                 providers.add(bean);


Mime
View raw message