Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-7518

Loggers logs request twice in case of Fault

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.2.0
    • 3.2.2, 3.1.15
    • logging
    • None
    • JDK 1.8.0
      Apache Tomcat 8.5
      CXF 3.2.0
      Implementation logging: org.apache.cxf.common.logging.Slf4jLogger

    • Unknown

    Description

      I upgraded CFX libraries from 3.1.11 to 3.2.0.
      Since then requests raising faults are logged twice.

      CXFNonSpringExampleServlet.java
         @Override
         public void loadBus(ServletConfig servletConfig) {
            super.loadBus(servletConfig);
            BusFactory.setDefaultBus(getBus());
      
            createFactoryBean();
         }
      
         /* Creazione istanza servizio */
         private void createFactoryBean() {
            JaxWsServerFactoryBean serviceFactory = new JaxWsServerFactoryBean();
      
            /* Service details */
            serviceFactory.setAddress("/");
            serviceFactory.setWsdlLocation("...");
            serviceFactory.setServiceBean(...);
            serviceFactory.setServiceClass(...);
            serviceFactory.setServiceName(new QName("urn:...", "..."));
            serviceFactory.setEndpointName(new QName("urn:...", "..."));
      
            /* Input inteceptors */
            serviceFactory.getInInterceptors().add(new LoggingInInterceptor());
            serviceFactory.getInFaultInterceptors().add(new LoggingInInterceptor());
      
            /* Output inteceptors */
            serviceFactory.getOutInterceptors().add(new LoggingOutInterceptor());
            serviceFactory.getOutFaultInterceptors().add(new LoggingOutInterceptor());
      
            server = serviceFactory.create();
       }
      

      Requests that do not raise faults are logged only once (as well as their responses): one REQ_IN INFO -> REQ_IN and one RESP_OUT INFO -> RESP_OUT

      Requests that do raise faults are logged twice (unlike their responses, logged only once): two REQ_IN INFO -> REQ_IN and one FAULT_OUT INFO -> FAULT_OUT

      Attachments

        Activity

          People

            sergey_beryozkin Sergey Beryozkin
            pperliti Paolo Perliti
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: