Geronimo
  1. Geronimo
  2. GERONIMO-4253

Server logging similar exceptions for AxisFaults and for unexpected errors

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1.2
    • Fix Version/s: 2.1.3, 2.2
    • Component/s: webservices
    • Security Level: public (Regular issues)
    • Labels:
      None
    • Environment:

      All

      Description

      When a SOAP Fault is thrown in the server response, the server logs bring up an exception:

      08:46:22,027 ERROR Axis2WebServiceContainer Exception occurred while
      trying to invoke service method doService()
      org.apache.axis2.AxisFault: An error was detected during JAXWS
      processing
      at
      org.apache.geronimo.axis2.ejb.EJBInterceptor.intercept(EJBInterceptor.ja
      va:88)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at
      sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
      a:39)
      at
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
      Impl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at
      org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocati
      on.invoke(ReflectionInvocationContext.java:158)
      at
      org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(
      ReflectionInvocationContext.java:141)
      at
      org.apache.openejb.core.interceptor.InterceptorStack.invoke(InterceptorS
      tack.java:73)
      at
      org.apache.openejb.core.stateless.StatelessContainer.invokeWebService(St
      atelessContainer.java:277)
      at
      org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessCo
      ntainer.java:206)
      at
      org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessCo
      ntainer.java:188)
      at
      org.apache.openejb.core.stateless.StatelessContainer.invoke(StatelessCon
      tainer.java:165)
      at
      org.apache.geronimo.axis2.ejb.EJBMessageReceiver.receive(EJBMessageRecei
      ver.java:88)
      at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:145)
      at
      org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostReques
      t(HTTPTransportUtils.java:275)
      at
      org.apache.geronimo.axis2.Axis2WebServiceContainer.processXMLRequest(Axi
      s2WebServiceContainer.java:386)
      at
      org.apache.geronimo.axis2.Axis2WebServiceContainer.processPOSTRequest(Ax
      is2WebServiceContainer.java:335)
      at
      org.apache.geronimo.axis2.Axis2WebServiceContainer.doService2(Axis2WebSe
      rviceContainer.java:265)
      at
      org.apache.geronimo.axis2.Axis2WebServiceContainer.doService(Axis2WebSer
      viceContainer.java:204)
      at
      org.apache.geronimo.axis2.Axis2WebServiceContainer.invoke(Axis2WebServic
      eContainer.java:167)
      at
      org.apache.geronimo.tomcat.TomcatEJBWebServiceContext$EJBWebServiceValve
      .invoke(TomcatEJBWebServiceContext.java:180)
      at
      org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authenticator
      Base.java:525)
      at
      org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
      :128)
      at
      org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
      :102)
      at
      org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
      java:109)
      at
      org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:568
      )
      at
      org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:2
      86)
      at
      org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:84
      4)
      at
      org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(
      Http11Protocol.java:583)
      at
      org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
      at java.lang.Thread.run(Thread.java:595)

      The exception should be logged like this only if something unexpected happens.

        Activity

        Hide
        Manu T George added a comment -

        This is because of the following code in doService method of Axis2WebServiceContainer

        } catch (Throwable e) {
        String msg = "Exception occurred while trying to invoke service method doService()";
        LOG.error(msg, e);

        One solution is to have a separate catch for AxixFault while another is to change to
        if(e instanceof AxisFault)

        { LOG.debug(msg, e); }

        else

        { LOG.error(msg, e); }

        Then setting the log level to error the fault stack trace will not be printed out.

        Show
        Manu T George added a comment - This is because of the following code in doService method of Axis2WebServiceContainer } catch (Throwable e) { String msg = "Exception occurred while trying to invoke service method doService()"; LOG.error(msg, e); One solution is to have a separate catch for AxixFault while another is to change to if(e instanceof AxisFault) { LOG.debug(msg, e); } else { LOG.error(msg, e); } Then setting the log level to error the fault stack trace will not be printed out.
        Hide
        Manu T George added a comment -

        We may also want to print a message that an axis fault has occured in case the logging level is WARN.

        Show
        Manu T George added a comment - We may also want to print a message that an axis fault has occured in case the logging level is WARN.
        Hide
        Jarek Gawor added a comment -

        This was already fixed in trunk (revision 681593) and branches/2.1 (revision 681594).

        Show
        Jarek Gawor added a comment - This was already fixed in trunk (revision 681593) and branches/2.1 (revision 681594).

          People

          • Assignee:
            Jarek Gawor
            Reporter:
            Manu T George
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development