Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IllegalStateException in JMX Connector RESTHandler from call to getWriter #9380

Closed
edavidj opened this issue Oct 18, 2019 · 0 comments · Fixed by #9381
Closed

IllegalStateException in JMX Connector RESTHandler from call to getWriter #9380

edavidj opened this issue Oct 18, 2019 · 0 comments · Fixed by #9381
Assignees
Labels
release bug This bug is present in a released version of Open Liberty release:190011

Comments

@edavidj
Copy link
Contributor

edavidj commented Oct 18, 2019

  • Seen in com.ibm.ws.rest.handler's RESTHandlerContainerImpl.java
  • While handling error thrown by handleRequest method, the catch statement uses getWriter to report the error message in the response. As seen in documentation when getOutputStream has been called on this response object prior to the exception, this use of getWriter will throw IllegalStateException.
  • Would occur whenever an implementation of RESTHandler.handleRequest calls response.getOutputStream prior to throwing a RESTHandlerJsonException.
  • Encountered error output:
00000049 id=00000000 com.ibm.ws.webcontainer.util.ApplicationErrorUtils           E SRVE0777E: Exception thrown by application class 'com.ibm.ws.webcontainer.srt.SRTServletResponse.getWriter:807'
java.lang.IllegalStateException: SRVE0199E: OutputStream already obtained
    at com.ibm.ws.webcontainer.srt.SRTServletResponse.getWriter(SRTServletResponse.java:807)
    at com.ibm.ws.rest.handler.helper.ServletRESTResponseImpl.getWriter(ServletRESTResponseImpl.java:43)
    at com.ibm.ws.rest.handler.internal.service.RESTHandlerContainerImpl.handleRequest(RESTHandlerContainerImpl.java:470)
    at com.ibm.ws.jmx.connector.server.rest.JMXRESTProxyServlet.handleWithDelegate(JMXRESTProxyServlet.java:58)
    at com.ibm.ws.jmx.connector.server.rest.JMXRESTProxyServlet.service(JMXRESTProxyServlet.java:43)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1230)
@edavidj edavidj added the release bug This bug is present in a released version of Open Liberty label Oct 18, 2019
@edavidj edavidj self-assigned this Oct 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release bug This bug is present in a released version of Open Liberty release:190011
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants