java.lang.IllegalStateException: strict servlet API: cannot call getWriter() after getOutputStream()

Coderanch | Padmaja Akella | 3 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Web application runs fine on Tomcat fails on Weblogic

    Oracle Community | 3 years ago | e6ee476b-0da4-4e71-b0cc-18221d41534c
    java.lang.IllegalStateException: strict servlet API: cannot call getWriter() after getOutputStream()
  2. 0

    Web application fails on Weblogic

    Coderanch | 3 years ago | Padmaja Akella
    java.lang.IllegalStateException: strict servlet API: cannot call getWriter() after getOutputStream()

    Root Cause Analysis

    1. java.lang.IllegalStateException

      strict servlet API: cannot call getWriter() after getOutputStream()

      at com.gm.gmds.exceptions.ExceptionHandler.execute()
    2. com.gm.gmds
      ExceptionHandler.execute
      1. com.gm.gmds.exceptions.ExceptionHandler.execute(ExceptionHandler.java:36)
      1 frame
    3. Java RT
      Method.invoke
      1. sun.reflect.GeneratedMethodAccessor362.invoke(Unknown Source)
      2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      3. java.lang.reflect.Method.invoke(Method.java:597)
      3 frames
    4. XWork
      ValidationInterceptor.doIntercept
      1. com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:441)
      2. com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:280)
      3. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:243)
      4. com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:165)
      5. com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
      6. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
      7. com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:252)
      7 frames
    5. Struts2
      AnnotationValidationInterceptor.doIntercept
      1. org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)
      1 frame
    6. XWork
      DefaultActionInvocation.invoke
      1. com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
      2. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
      3. com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:122)
      4. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
      5. com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)
      6. com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
      7. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
      8. com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)
      9. com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
      10. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
      11. com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:179)
      12. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
      12 frames
    7. Struts2
      MultiselectInterceptor.intercept
      1. org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75)
      1 frame
    8. XWork
      DefaultActionInvocation.invoke
      1. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
      1 frame
    9. Struts2
      CheckboxInterceptor.intercept
      1. org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:94)
      1 frame
    10. XWork
      DefaultActionInvocation.invoke
      1. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
      1 frame
    11. Struts2
      FileUploadInterceptor.intercept
      1. org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:235)
      1 frame
    12. XWork
      DefaultActionInvocation.invoke
      1. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
      2. com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:89)
      3. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
      4. com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:130)
      5. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
      5 frames
    13. Struts2
      DebuggingInterceptor.intercept
      1. org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:267)
      1 frame
    14. XWork
      DefaultActionInvocation.invoke
      1. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
      2. com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:126)
      3. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
      4. com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:138)
      5. com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
      6. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
      7. com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:165)
      8. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
      8 frames
    15. Struts2
      ServletConfigInterceptor.intercept
      1. org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)
      1 frame
    16. XWork
      DefaultActionInvocation.invoke
      1. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
      2. com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:179)
      3. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
      4. com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:176)
      5. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
      5 frames
    17. Struts2
      StrutsActionProxy.execute
      1. org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)
      1 frame
    18. XWork
      DefaultActionInvocation.invoke
      1. com.opensymphony.xwork2.ActionChainResult.execute(ActionChainResult.java:222)
      2. com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:362)
      3. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:266)
      3 frames
    19. Struts2
      StrutsPrepareAndExecuteFilter.doFilter
      1. org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)
      2. org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:488)
      3. org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
      4. org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)
      4 frames
    20. Atmosphere weblogic
      FilterChainImpl.doFilter
      1. weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      1 frame
    21. com.gm.gmds
      UTF8EncodingFilter.doFilter
      1. com.gm.gmds.filters.UTF8EncodingFilter.doFilter(UTF8EncodingFilter.java:38)
      1 frame
    22. Atmosphere weblogic
      WebAppServletContext$ServletInvocationAction.run
      1. weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      2. weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
      3. weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      4. weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3730)
      5. weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3696)
      5 frames
    23. weblogic.security.acl
      AuthenticatedSubject.doAs
      1. weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
      1 frame
    24. weblogic.security.service
      SecurityManager.runAs
      1. weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
      1 frame
    25. Atmosphere weblogic
      ServletRequestImpl.run
      1. weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2273)
      2. weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2179)
      3. weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1490)
      3 frames
    26. weblogic.work
      ExecuteThread.run
      1. weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
      2. weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
      2 frames