java.lang.RuntimeException: java.lang.IllegalStateException: Illegal attempt to call getOutputStream() after getWriter() has already been called.

Java.net JIRA | pdudits | 2 years ago
  1. 0

    remote deploy over asadmin fails with error {code} remote failure: Request failed. {code} Server logs the following (we redirect j.u.l to logback, therefore different formatting): {code} [2014-09-02 15:02:16,280] [admin-listener(4)] [INFO] [javax.enterprise.admin.rest]: An error occurred while processing the request. Please see the server logs for details. org.jvnet.mimepull.MIMEParsingException: java.io.IOException: java.util.concurrent.TimeoutException at org.jvnet.mimepull.MIMEParser.fillBuf(MIMEParser.java:442) ~[na:na] at org.jvnet.mimepull.MIMEParser.skipPreamble(MIMEParser.java:307) ~[na:na] at org.jvnet.mimepull.MIMEParser.access$300(MIMEParser.java:68) ~[na:na] at org.jvnet.mimepull.MIMEParser$MIMEEventIterator.next(MIMEParser.java:149) ~[na:na] at org.jvnet.mimepull.MIMEParser$MIMEEventIterator.next(MIMEParser.java:132) ~[na:na] at org.jvnet.mimepull.MIMEMessage.makeProgress(MIMEMessage.java:198) ~[na:na] at org.jvnet.mimepull.MIMEMessage.parseAll(MIMEMessage.java:181) ~[na:na] at org.jvnet.mimepull.MIMEMessage.getAttachments(MIMEMessage.java:106) ~[na:na] at com.sun.enterprise.admin.remote.reader.MultipartProprietaryReader.readFrom(MultipartProprietaryReader.java:98) ~[na:na] at org.glassfish.admin.rest.readers.MultipartFDPayloadReader.readFrom(MultipartFDPayloadReader.java:72) ~[na:na] at org.glassfish.admin.rest.readers.MultipartFDPayloadReader.readFrom(MultipartFDPayloadReader.java:59) ~[na:na] at org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$TerminalReaderInterceptor.invokeReadFrom(ReaderInterceptorExecutor.java:251) ~[na:na] at org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$TerminalReaderInterceptor.aroundReadFrom(ReaderInterceptorExecutor.java:229) ~[na:na] at org.glassfish.jersey.message.internal.ReaderInterceptorExecutor.proceed(ReaderInterceptorExecutor.java:149) ~[na:na] at org.glassfish.jersey.server.internal.MappableExceptionWrapperInterceptor.aroundReadFrom(MappableExceptionWrapperInterceptor.java:73) ~[na:na] at org.glassfish.jersey.message.internal.ReaderInterceptorExecutor.proceed(ReaderInterceptorExecutor.java:149) ~[na:na] at org.glassfish.jersey.message.internal.MessageBodyFactory.readFrom(MessageBodyFactory.java:1124) ~[na:na] at org.glassfish.jersey.message.internal.InboundMessageContext.readEntity(InboundMessageContext.java:851) ~[na:na] at org.glassfish.jersey.server.ContainerRequest.readEntity(ContainerRequest.java:270) ~[na:na] at org.glassfish.jersey.server.internal.inject.EntityParamValueFactoryProvider$EntityValueFactory.provide(EntityParamValueFactoryProvider.java:96) ~[na:na] at org.glassfish.jersey.server.spi.internal.ParameterValueHelper.getParameterValues(ParameterValueHelper.java:81) ~[na:na] at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$AbstractMethodParamInvoker.getParamValues(JavaResourceMethodDispatcherProvider.java:121) ~[na:na] at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:152) ~[na:na] at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:104) ~[na:na] at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:387) ~[na:na] at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:331) ~[na:na] at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:103) ~[na:na] at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:271) ~[na:na] at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) ~[na:na] at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) ~[na:na] at org.glassfish.jersey.internal.Errors.process(Errors.java:315) ~[na:na] at org.glassfish.jersey.internal.Errors.process(Errors.java:297) ~[na:na] at org.glassfish.jersey.internal.Errors.process(Errors.java:267) ~[na:na] at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:297) ~[na:na] at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:254) ~[na:na] at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1028) ~[na:na] at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:365) ~[na:na] at org.glassfish.admin.rest.adapter.JerseyContainerCommandService$3.service(JerseyContainerCommandService.java:173) ~[na:na] at org.glassfish.admin.rest.adapter.RestAdapter.service(RestAdapter.java:179) ~[na:na] at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459) ~[kernel.jar:na] at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167) ~[kernel.jar:na] at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:201) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:175) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.portunif.PUFilter.handleRead(PUFilter.java:231) ~[na:na] at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.portunif.PUFilter.handleRead(PUFilter.java:231) ~[na:na] at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:561) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:565) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545) ~[nucleus-grizzly-all.jar:na] at java.lang.Thread.run(Thread.java:724) ~[na:1.7.0_25] Caused by: java.io.IOException: java.util.concurrent.TimeoutException at org.glassfish.grizzly.nio.transport.TCPNIOTransportFilter.handleRead(TCPNIOTransportFilter.java:90) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.filterchain.TransportFilter.handleRead(TransportFilter.java:173) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.filterchain.DefaultFilterChain.read(DefaultFilterChain.java:351) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.filterchain.FilterChainContext.read(FilterChainContext.java:695) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.portunif.BackChannelFilter.handleRead(BackChannelFilter.java:80) ~[na:na] at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.filterchain.DefaultFilterChain.read(DefaultFilterChain.java:351) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.filterchain.FilterChainContext.read(FilterChainContext.java:695) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.portunif.BackChannelFilter.handleRead(BackChannelFilter.java:80) ~[na:na] at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.filterchain.DefaultFilterChain.read(DefaultFilterChain.java:351) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.filterchain.FilterChainContext.read(FilterChainContext.java:695) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.http.io.InputBuffer.blockingRead(InputBuffer.java:1119) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.http.server.io.ServerInputBuffer.blockingRead(ServerInputBuffer.java:95) ~[na:na] at org.glassfish.grizzly.http.io.InputBuffer.fill(InputBuffer.java:1143) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.http.io.InputBuffer.read(InputBuffer.java:353) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.http.server.NIOInputStreamImpl.read(NIOInputStreamImpl.java:83) ~[nucleus-grizzly-all.jar:na] at org.glassfish.jersey.message.internal.EntityInputStream.read(EntityInputStream.java:101) ~[na:na] at org.jvnet.mimepull.MIMEParser.fillBuf(MIMEParser.java:440) ~[na:na] ... 71 common frames omitted Caused by: java.util.concurrent.TimeoutException: null at org.glassfish.grizzly.nio.tmpselectors.TemporarySelectorReader.read(TemporarySelectorReader.java:126) ~[na:na] at org.glassfish.grizzly.nio.tmpselectors.TemporarySelectorReader.read(TemporarySelectorReader.java:75) ~[na:na] at org.glassfish.grizzly.AbstractReader.read(AbstractReader.java:72) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.nio.transport.TCPNIOTransportFilter.handleRead(TCPNIOTransportFilter.java:77) ~[nucleus-grizzly-all.jar:na] ... 96 common frames omitted [2014-09-02 15:02:16,296] [admin-listener(4)] [WARN] [javax.enterprise.system.core]: Internal Server error: /command/deploy java.lang.RuntimeException: java.lang.IllegalStateException: Illegal attempt to call getOutputStream() after getWriter() has already been called. at org.glassfish.admin.rest.adapter.RestAdapter.reportError(RestAdapter.java:346) ~[na:na] at org.glassfish.admin.rest.adapter.RestAdapter.service(RestAdapter.java:209) ~[na:na] at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459) ~[kernel.jar:na] at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167) ~[kernel.jar:na] at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:201) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:175) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.portunif.PUFilter.handleRead(PUFilter.java:231) ~[na:na] at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.portunif.PUFilter.handleRead(PUFilter.java:231) ~[na:na] at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:561) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:565) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545) ~[nucleus-grizzly-all.jar:na] at java.lang.Thread.run(Thread.java:724) ~[na:1.7.0_25] Caused by: java.lang.IllegalStateException: Illegal attempt to call getOutputStream() after getWriter() has already been called. at org.glassfish.grizzly.http.server.Response.getNIOOutputStream(Response.java:624) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.http.server.Response.getOutputStream(Response.java:649) ~[nucleus-grizzly-all.jar:na] at org.glassfish.admin.rest.adapter.RestAdapter.reportError(RestAdapter.java:342) ~[na:na] ... 34 common frames omitted {code} There are no issues with deployment over admin gui or via localhost, timeouts are left at default values. From another client, we see different behaviour when launching deploy - admin thread hangs around this stacktrace. {code} "admin-listener(4)" daemon prio=6 tid=0x000000000d276000 nid=0x21dc runnable [0x000000001056d000] java.lang.Thread.State: RUNNABLE at org.glassfish.grizzly.ssl.SSLBaseFilter.doHandshakeStep(SSLBaseFilter.java:571) at org.glassfish.grizzly.ssl.SSLBaseFilter.doHandshakeSync(SSLBaseFilter.java:538) at org.glassfish.grizzly.ssl.SSLBaseFilter.rehandshake(SSLBaseFilter.java:751) at org.glassfish.grizzly.ssl.SSLBaseFilter.renegotiate(SSLBaseFilter.java:736) at org.glassfish.grizzly.ssl.SSLBaseFilter.getPeerCertificateChain(SSLBaseFilter.java:793) at org.glassfish.grizzly.ssl.SSLBaseFilter.handleEvent(SSLBaseFilter.java:243) at org.glassfish.grizzly.filterchain.ExecutorResolver$6.execute(ExecutorResolver.java:94) at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284) at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201) at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133) at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112) at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77) at org.glassfish.grizzly.filterchain.FilterChainContext.notifyDownstream(FilterChainContext.java:907) at org.glassfish.grizzly.filterchain.FilterChainContext.notifyDownstream(FilterChainContext.java:890) at org.glassfish.grizzly.portunif.BackChannelFilter.handleEvent(BackChannelFilter.java:131) at org.glassfish.grizzly.filterchain.ExecutorResolver$6.execute(ExecutorResolver.java:94) at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284) at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201) at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133) at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112) at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77) at org.glassfish.grizzly.filterchain.FilterChainContext.notifyDownstream(FilterChainContext.java:907) at org.glassfish.grizzly.filterchain.FilterChainContext.notifyDownstream(FilterChainContext.java:890) at org.glassfish.grizzly.http.server.util.RequestUtils.populateCertificateAttribute(RequestUtils.java:75) at org.glassfish.grizzly.http.server.Request.getAttribute(Request.java:873) at org.glassfish.grizzly.http.server.Request.getUserPrincipal(Request.java:1859) at com.sun.enterprise.admin.util.AdminCallbackHandler.<init>(AdminCallbackHandler.java:110) at com.sun.enterprise.admin.util.GenericAdminAuthenticator.authenticate(GenericAdminAuthenticator.java:254) at com.sun.enterprise.admin.util.GenericAdminAuthenticator.loginAsAdmin(GenericAdminAuthenticator.java:219) at com.sun.enterprise.admin.util.GenericAdminAuthenticator.loginAsAdmin(GenericAdminAuthenticator.java:202) at org.glassfish.admin.rest.adapter.RestAdapter.service(RestAdapter.java:168) at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459) {code}

    Java.net JIRA | 2 years ago | pdudits
    java.lang.RuntimeException: java.lang.IllegalStateException: Illegal attempt to call getOutputStream() after getWriter() has already been called.
  2. 0

    remote deploy over asadmin fails with error {code} remote failure: Request failed. {code} Server logs the following (we redirect j.u.l to logback, therefore different formatting): {code} [2014-09-02 15:02:16,280] [admin-listener(4)] [INFO] [javax.enterprise.admin.rest]: An error occurred while processing the request. Please see the server logs for details. org.jvnet.mimepull.MIMEParsingException: java.io.IOException: java.util.concurrent.TimeoutException at org.jvnet.mimepull.MIMEParser.fillBuf(MIMEParser.java:442) ~[na:na] at org.jvnet.mimepull.MIMEParser.skipPreamble(MIMEParser.java:307) ~[na:na] at org.jvnet.mimepull.MIMEParser.access$300(MIMEParser.java:68) ~[na:na] at org.jvnet.mimepull.MIMEParser$MIMEEventIterator.next(MIMEParser.java:149) ~[na:na] at org.jvnet.mimepull.MIMEParser$MIMEEventIterator.next(MIMEParser.java:132) ~[na:na] at org.jvnet.mimepull.MIMEMessage.makeProgress(MIMEMessage.java:198) ~[na:na] at org.jvnet.mimepull.MIMEMessage.parseAll(MIMEMessage.java:181) ~[na:na] at org.jvnet.mimepull.MIMEMessage.getAttachments(MIMEMessage.java:106) ~[na:na] at com.sun.enterprise.admin.remote.reader.MultipartProprietaryReader.readFrom(MultipartProprietaryReader.java:98) ~[na:na] at org.glassfish.admin.rest.readers.MultipartFDPayloadReader.readFrom(MultipartFDPayloadReader.java:72) ~[na:na] at org.glassfish.admin.rest.readers.MultipartFDPayloadReader.readFrom(MultipartFDPayloadReader.java:59) ~[na:na] at org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$TerminalReaderInterceptor.invokeReadFrom(ReaderInterceptorExecutor.java:251) ~[na:na] at org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$TerminalReaderInterceptor.aroundReadFrom(ReaderInterceptorExecutor.java:229) ~[na:na] at org.glassfish.jersey.message.internal.ReaderInterceptorExecutor.proceed(ReaderInterceptorExecutor.java:149) ~[na:na] at org.glassfish.jersey.server.internal.MappableExceptionWrapperInterceptor.aroundReadFrom(MappableExceptionWrapperInterceptor.java:73) ~[na:na] at org.glassfish.jersey.message.internal.ReaderInterceptorExecutor.proceed(ReaderInterceptorExecutor.java:149) ~[na:na] at org.glassfish.jersey.message.internal.MessageBodyFactory.readFrom(MessageBodyFactory.java:1124) ~[na:na] at org.glassfish.jersey.message.internal.InboundMessageContext.readEntity(InboundMessageContext.java:851) ~[na:na] at org.glassfish.jersey.server.ContainerRequest.readEntity(ContainerRequest.java:270) ~[na:na] at org.glassfish.jersey.server.internal.inject.EntityParamValueFactoryProvider$EntityValueFactory.provide(EntityParamValueFactoryProvider.java:96) ~[na:na] at org.glassfish.jersey.server.spi.internal.ParameterValueHelper.getParameterValues(ParameterValueHelper.java:81) ~[na:na] at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$AbstractMethodParamInvoker.getParamValues(JavaResourceMethodDispatcherProvider.java:121) ~[na:na] at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:152) ~[na:na] at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:104) ~[na:na] at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:387) ~[na:na] at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:331) ~[na:na] at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:103) ~[na:na] at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:271) ~[na:na] at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) ~[na:na] at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) ~[na:na] at org.glassfish.jersey.internal.Errors.process(Errors.java:315) ~[na:na] at org.glassfish.jersey.internal.Errors.process(Errors.java:297) ~[na:na] at org.glassfish.jersey.internal.Errors.process(Errors.java:267) ~[na:na] at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:297) ~[na:na] at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:254) ~[na:na] at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1028) ~[na:na] at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:365) ~[na:na] at org.glassfish.admin.rest.adapter.JerseyContainerCommandService$3.service(JerseyContainerCommandService.java:173) ~[na:na] at org.glassfish.admin.rest.adapter.RestAdapter.service(RestAdapter.java:179) ~[na:na] at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459) ~[kernel.jar:na] at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167) ~[kernel.jar:na] at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:201) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:175) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.portunif.PUFilter.handleRead(PUFilter.java:231) ~[na:na] at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.portunif.PUFilter.handleRead(PUFilter.java:231) ~[na:na] at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:561) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:565) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545) ~[nucleus-grizzly-all.jar:na] at java.lang.Thread.run(Thread.java:724) ~[na:1.7.0_25] Caused by: java.io.IOException: java.util.concurrent.TimeoutException at org.glassfish.grizzly.nio.transport.TCPNIOTransportFilter.handleRead(TCPNIOTransportFilter.java:90) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.filterchain.TransportFilter.handleRead(TransportFilter.java:173) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.filterchain.DefaultFilterChain.read(DefaultFilterChain.java:351) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.filterchain.FilterChainContext.read(FilterChainContext.java:695) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.portunif.BackChannelFilter.handleRead(BackChannelFilter.java:80) ~[na:na] at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.filterchain.DefaultFilterChain.read(DefaultFilterChain.java:351) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.filterchain.FilterChainContext.read(FilterChainContext.java:695) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.portunif.BackChannelFilter.handleRead(BackChannelFilter.java:80) ~[na:na] at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.filterchain.DefaultFilterChain.read(DefaultFilterChain.java:351) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.filterchain.FilterChainContext.read(FilterChainContext.java:695) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.http.io.InputBuffer.blockingRead(InputBuffer.java:1119) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.http.server.io.ServerInputBuffer.blockingRead(ServerInputBuffer.java:95) ~[na:na] at org.glassfish.grizzly.http.io.InputBuffer.fill(InputBuffer.java:1143) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.http.io.InputBuffer.read(InputBuffer.java:353) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.http.server.NIOInputStreamImpl.read(NIOInputStreamImpl.java:83) ~[nucleus-grizzly-all.jar:na] at org.glassfish.jersey.message.internal.EntityInputStream.read(EntityInputStream.java:101) ~[na:na] at org.jvnet.mimepull.MIMEParser.fillBuf(MIMEParser.java:440) ~[na:na] ... 71 common frames omitted Caused by: java.util.concurrent.TimeoutException: null at org.glassfish.grizzly.nio.tmpselectors.TemporarySelectorReader.read(TemporarySelectorReader.java:126) ~[na:na] at org.glassfish.grizzly.nio.tmpselectors.TemporarySelectorReader.read(TemporarySelectorReader.java:75) ~[na:na] at org.glassfish.grizzly.AbstractReader.read(AbstractReader.java:72) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.nio.transport.TCPNIOTransportFilter.handleRead(TCPNIOTransportFilter.java:77) ~[nucleus-grizzly-all.jar:na] ... 96 common frames omitted [2014-09-02 15:02:16,296] [admin-listener(4)] [WARN] [javax.enterprise.system.core]: Internal Server error: /command/deploy java.lang.RuntimeException: java.lang.IllegalStateException: Illegal attempt to call getOutputStream() after getWriter() has already been called. at org.glassfish.admin.rest.adapter.RestAdapter.reportError(RestAdapter.java:346) ~[na:na] at org.glassfish.admin.rest.adapter.RestAdapter.service(RestAdapter.java:209) ~[na:na] at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459) ~[kernel.jar:na] at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167) ~[kernel.jar:na] at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:201) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:175) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.portunif.PUFilter.handleRead(PUFilter.java:231) ~[na:na] at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.portunif.PUFilter.handleRead(PUFilter.java:231) ~[na:na] at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:561) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:565) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545) ~[nucleus-grizzly-all.jar:na] at java.lang.Thread.run(Thread.java:724) ~[na:1.7.0_25] Caused by: java.lang.IllegalStateException: Illegal attempt to call getOutputStream() after getWriter() has already been called. at org.glassfish.grizzly.http.server.Response.getNIOOutputStream(Response.java:624) ~[nucleus-grizzly-all.jar:na] at org.glassfish.grizzly.http.server.Response.getOutputStream(Response.java:649) ~[nucleus-grizzly-all.jar:na] at org.glassfish.admin.rest.adapter.RestAdapter.reportError(RestAdapter.java:342) ~[na:na] ... 34 common frames omitted {code} There are no issues with deployment over admin gui or via localhost, timeouts are left at default values. From another client, we see different behaviour when launching deploy - admin thread hangs around this stacktrace. {code} "admin-listener(4)" daemon prio=6 tid=0x000000000d276000 nid=0x21dc runnable [0x000000001056d000] java.lang.Thread.State: RUNNABLE at org.glassfish.grizzly.ssl.SSLBaseFilter.doHandshakeStep(SSLBaseFilter.java:571) at org.glassfish.grizzly.ssl.SSLBaseFilter.doHandshakeSync(SSLBaseFilter.java:538) at org.glassfish.grizzly.ssl.SSLBaseFilter.rehandshake(SSLBaseFilter.java:751) at org.glassfish.grizzly.ssl.SSLBaseFilter.renegotiate(SSLBaseFilter.java:736) at org.glassfish.grizzly.ssl.SSLBaseFilter.getPeerCertificateChain(SSLBaseFilter.java:793) at org.glassfish.grizzly.ssl.SSLBaseFilter.handleEvent(SSLBaseFilter.java:243) at org.glassfish.grizzly.filterchain.ExecutorResolver$6.execute(ExecutorResolver.java:94) at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284) at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201) at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133) at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112) at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77) at org.glassfish.grizzly.filterchain.FilterChainContext.notifyDownstream(FilterChainContext.java:907) at org.glassfish.grizzly.filterchain.FilterChainContext.notifyDownstream(FilterChainContext.java:890) at org.glassfish.grizzly.portunif.BackChannelFilter.handleEvent(BackChannelFilter.java:131) at org.glassfish.grizzly.filterchain.ExecutorResolver$6.execute(ExecutorResolver.java:94) at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284) at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201) at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133) at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112) at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77) at org.glassfish.grizzly.filterchain.FilterChainContext.notifyDownstream(FilterChainContext.java:907) at org.glassfish.grizzly.filterchain.FilterChainContext.notifyDownstream(FilterChainContext.java:890) at org.glassfish.grizzly.http.server.util.RequestUtils.populateCertificateAttribute(RequestUtils.java:75) at org.glassfish.grizzly.http.server.Request.getAttribute(Request.java:873) at org.glassfish.grizzly.http.server.Request.getUserPrincipal(Request.java:1859) at com.sun.enterprise.admin.util.AdminCallbackHandler.<init>(AdminCallbackHandler.java:110) at com.sun.enterprise.admin.util.GenericAdminAuthenticator.authenticate(GenericAdminAuthenticator.java:254) at com.sun.enterprise.admin.util.GenericAdminAuthenticator.loginAsAdmin(GenericAdminAuthenticator.java:219) at com.sun.enterprise.admin.util.GenericAdminAuthenticator.loginAsAdmin(GenericAdminAuthenticator.java:202) at org.glassfish.admin.rest.adapter.RestAdapter.service(RestAdapter.java:168) at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459) {code}

    Java.net JIRA | 2 years ago | pdudits
    java.lang.RuntimeException: java.lang.IllegalStateException: Illegal attempt to call getOutputStream() after getWriter() has already been called.
  3. 0

    TimeoutException on remote Glassfish v4.1 deployment

    Stack Overflow | 2 years ago | Radzikowski
    java.lang.RuntimeException: java.lang.IllegalStateException: Illegal attempt to call getOutputStream() after getWriter() has already been called.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    'Illegal attempt to call getOutputStream() after getWriter() has already been called' during Jersey test

    Stack Overflow | 1 year ago | Casey
    java.lang.IllegalStateException: Illegal attempt to call getOutputStream() after getWriter() has already been called.
  6. 0

    I created a single XForm using the instructions at: https://www.google.com/url?q=https%3A%2F%2Fwiki.openmrs.org%2Fdisplay%2Fdocs%2FXForms%2BModule%2BUser%2BGuide&sa=D&sntz=1&usg=AFQjCNG4evG909u1w0dhuic01Qvq7MqgPQ I confirmed the form was working by using the Form Entry UI. I then visited URL: http://localhost:8081/openmrs-standalone/moduleServlet/xforms/xformDownload?target=xforms&uname=admin&pw=Admin123 as described in the external client help documentation at https://wiki.openmrs.org/display/docs/XForms+Module+External+Applications+Guide (Downloading Forms) The page gives the error: java.lang.IllegalStateException: getWriter() has already been called! at org.openmrs.web.filter.GZIPResponseWrapper.getOutputStream(GZIPResponseWrapper.java:74) at org.openmrs.module.xforms.web.XformDownloadServlet.doGet(XformDownloadServlet.java:103) at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.openmrs.module.web.ModuleServlet.service(ModuleServlet.java:72) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.openmrs.module.web.filter.ForcePasswordChangeFilter.doFilter(ForcePasswordChangeFilter.java:65) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.openmrs.module.web.filter.ModuleFilterChain.doFilter(ModuleFilterChain.java:76) at org.openmrs.module.xforms.web.XformsFilter.doFilter(XformsFilter.java:53) at org.openmrs.module.web.filter.ModuleFilterChain.doFilter(ModuleFilterChain.java:74) at org.openmrs.module.web.filter.ModuleFilter.doFilter(ModuleFilter.java:58) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.openmrs.web.filter.OpenmrsFilter.doFilterInternal(OpenmrsFilter.java:111) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:109) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:109) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:109) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Thread.java:745)

    JIRA | 2 years ago | Nick Fortescue
    java.lang.IllegalStateException: getWriter() has already been called!

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.IllegalStateException

      Illegal attempt to call getOutputStream() after getWriter() has already been called.

      at org.glassfish.grizzly.http.server.Response.getNIOOutputStream()
    2. Grizzly Server
      Response.getOutputStream
      1. org.glassfish.grizzly.http.server.Response.getNIOOutputStream(Response.java:624)[nucleus-grizzly-all.jar:na]
      2. org.glassfish.grizzly.http.server.Response.getOutputStream(Response.java:649)[nucleus-grizzly-all.jar:na]
      2 frames
    3. GlassFish Admin
      RestAdapter.service
      1. org.glassfish.admin.rest.adapter.RestAdapter.reportError(RestAdapter.java:342)[na:na]
      2. org.glassfish.admin.rest.adapter.RestAdapter.service(RestAdapter.java:209)[na:na]
      2 frames
    4. Kernel Classes
      ContainerMapper.service
      1. com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459)[kernel.jar:na]
      2. com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167)[kernel.jar:na]
      2 frames
    5. Grizzly Server
      HttpServerFilter.handleRead
      1. org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:201)[nucleus-grizzly-all.jar:na]
      2. org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:175)[nucleus-grizzly-all.jar:na]
      3. org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235)[nucleus-grizzly-all.jar:na]
      3 frames
    6. Grizzly
      ProcessorExecutor.execute
      1. org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)[nucleus-grizzly-all.jar:na]
      2. org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284)[nucleus-grizzly-all.jar:na]
      3. org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)[nucleus-grizzly-all.jar:na]
      4. org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133)[nucleus-grizzly-all.jar:na]
      5. org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)[nucleus-grizzly-all.jar:na]
      6. org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)[nucleus-grizzly-all.jar:na]
      6 frames
    7. Nucleus Grizzly jars Combining
      PUFilter.handleRead
      1. org.glassfish.grizzly.portunif.PUFilter.handleRead(PUFilter.java:231)[na:na]
      1 frame
    8. Grizzly
      ProcessorExecutor.execute
      1. org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)[nucleus-grizzly-all.jar:na]
      2. org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284)[nucleus-grizzly-all.jar:na]
      3. org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)[nucleus-grizzly-all.jar:na]
      4. org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133)[nucleus-grizzly-all.jar:na]
      5. org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)[nucleus-grizzly-all.jar:na]
      6. org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)[nucleus-grizzly-all.jar:na]
      6 frames
    9. Nucleus Grizzly jars Combining
      PUFilter.handleRead
      1. org.glassfish.grizzly.portunif.PUFilter.handleRead(PUFilter.java:231)[na:na]
      1 frame
    10. Grizzly
      AbstractThreadPool$Worker.run
      1. org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)[nucleus-grizzly-all.jar:na]
      2. org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284)[nucleus-grizzly-all.jar:na]
      3. org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)[nucleus-grizzly-all.jar:na]
      4. org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133)[nucleus-grizzly-all.jar:na]
      5. org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)[nucleus-grizzly-all.jar:na]
      6. org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)[nucleus-grizzly-all.jar:na]
      7. org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:561)[nucleus-grizzly-all.jar:na]
      8. org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)[nucleus-grizzly-all.jar:na]
      9. org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)[nucleus-grizzly-all.jar:na]
      10. org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)[nucleus-grizzly-all.jar:na]
      11. org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)[nucleus-grizzly-all.jar:na]
      12. org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:565)[nucleus-grizzly-all.jar:na]
      13. org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545)[nucleus-grizzly-all.jar:na]
      13 frames
    11. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:724)[na:1.7.0_25]
      1 frame