users@javaserverfaces.java.net

RE: JSF Mojarra v2.1.28 Resource loading problems when under load.

From: <Mikael.Johansson_at_bmw.de>
Date: Tue, 14 Apr 2015 01:28:55 +0000

Hi,

Thanks for the information, I have now read the jira and yes it sounds quite similar from a symptom perspective.
I see however that the reported JSF version we are using is older than the 2.2.7 version that is reported having the problem.

From the application logs I see the following.

Application starts reporting problems with loading jsf resources: (here a js file)
Server error: Method=GET URL=http://theapplicationurl.com/application/javax.faces.resource/jsf.js.xhtml?ln=javax.faces Status=500 Times=Me:6/Total:6

Then the logs show the following error message downstream from the above (seems to be coupled to the above) (sorry for the ugly stack trace!):
<![CDATA[java.lang.RuntimeException: java.lang.RuntimeException: org.apache.catalina.connector.ClientAbortException: java.io.IOException: The output channel is closed at org.atmosphere.handler.ReflectorServletProcessor.onRequest(ReflectorServletProcessor.java:163) at org.atmosphere.cpr.AsynchronousProcessor.action(AsynchronousProcessor.java:206) at org.atmosphere.cpr.AsynchronousProcessor.suspended(AsynchronousProcessor.java:105) at org.atmosphere.container.GrizzlyCometSupport.service(GrizzlyCometSupport.java:79) at org.atmosphere.container.GlassFishWebSocketSupport.service(GlassFishWebSocketSupport.java:65) at org.atmosphere.cpr.AtmosphereFramework.doCometSupport(AtmosphereFramework.java:2076) at org.atmosphere.cpr.AtmosphereServlet.doPost(AtmosphereServlet.java:211) at org.atmosphere.cpr.AtmosphereServlet.doGet(AtmosphereServlet.java:197) at javax.servlet.http.HttpServlet.service(HttpServlet.java:668) at javax.servlet.http.HttpServlet.service(HttpServlet.java:770) at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1554) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:339) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at com.bmw.b2v.commons.logging.LoggingFilterHTTP.doFilter(LoggingFilterHTTP.java:148) at com.bmw.b2v.ccc.common.logging.LoggingFilter.doFilter(LoggingFilter.java:56) at com.bmw.b2v.commons.logging.LoggingFilterHTTP.doFilter(LoggingFilterHTTP.java:86) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at com.bmw.b2v.ccc.jsf.component.MultipartFilter.doFilter(MultipartFilter.java:90) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:278) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595) at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:329) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231) at com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:311) at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:189) at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:850) at com.sun.grizzly.comet.CometEngine.executeServlet(CometEngine.java:464) at com.sun.grizzly.comet.CometEngine.handle(CometEngine.java:318) at com.sun.grizzly.comet.CometAsyncFilter.doFilter(CometAsyncFilter.java:87) at com.sun.grizzly.arp.DefaultAsyncExecutor.invokeFilters(DefaultAsyncExecutor.java:171) at com.sun.grizzly.arp.DefaultAsyncExecutor.interrupt(DefaultAsyncExecutor.java:143) at com.sun.grizzly.arp.AsyncProcessorTask.doTask(AsyncProcessorTask.java:102) at com.sun.grizzly.http.TaskBase.run(TaskBase.java:193) at com.sun.grizzly.http.TaskBase.execute(TaskBase.java:175) at com.sun.grizzly.arp.DefaultAsyncHandler.handle(DefaultAsyncHandler.java:145) at com.sun.grizzly.arp.AsyncProtocolFilter.execute(AsyncProtocolFilter.java:210) at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90) at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79) at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54) at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59) at com.sun.grizzly.ContextTask.run(ContextTask.java:71) at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532) at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.RuntimeException: org.apache.catalina.connector.ClientAbortException: java.io.IOException: The output channel is closed at org.atmosphere.cpr.AtmosphereResponse.write(AtmosphereResponse.java:1011) at org.atmosphere.interceptor.PaddingAtmosphereInterceptor.writePadding(PaddingAtmosphereInterceptor.java:79) at org.atmosphere.interceptor.PaddingAtmosphereInterceptor.access$000(PaddingAtmosphereInterceptor.java:44) at org.atmosphere.interceptor.PaddingAtmosphereInterceptor$ForcePreSuspend.onPreSuspend(PaddingAtmosphereInterceptor.java:150) at org.atmosphere.cpr.AtmosphereResourceImpl.onPreSuspend(AtmosphereResourceImpl.java:700) at org.atmosphere.cpr.AtmosphereResourceImpl.suspend(AtmosphereResourceImpl.java:351) at org.atmosphere.cpr.AtmosphereResourceImpl.suspend(AtmosphereResourceImpl.java:331) at org.atmosphere.cpr.Meteor.suspend(Meteor.java:195) at com.bmw.b2v.ccc.presentation.comms.AgentPubSubServlet.doGet(AgentPubSubServlet.java:102) at javax.servlet.http.HttpServlet.service(HttpServlet.java:668) at javax.servlet.http.HttpServlet.service(HttpServlet.java:770) at org.atmosphere.util.AtmosphereFilterChain.doFilter(AtmosphereFilterChain.java:135) at org.atmosphere.util.AtmosphereFilterChain.invokeFilterChain(AtmosphereFilterChain.java:96) at org.atmosphere.handler.ReflectorServletProcessor$FilterChainServletWrapper.service(ReflectorServletProcessor.java:317) at org.atmosphere.handler.ReflectorServletProcessor.onRequest(ReflectorServletProcessor.java:160) ... 52 more Caused by: org.apache.catalina.connector.ClientAbortException: java.io.IOException: The output channel is closed at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:430) at com.sun.grizzly.util.buf.ByteChunk.flushBuffer(ByteChunk.java:458) at org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:461) at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:442) at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:160) at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:148) at org.atmosphere.cpr.AtmosphereResponse.write(AtmosphereResponse.java:1002) ... 66 more Caused by: java.io.IOException: The output channel is closed at com.sun.grizzly.http.SocketChannelOutputBuffer.flushChannel(SocketChannelOutputBuffer.java:418) at com.sun.grizzly.http.SocketChannelOutputBuffer.flushBuffer(SocketChannelOutputBuffer.java:510) at com.sun.grizzly.http.SocketChannelOutputBuffer.realWriteBytes0(SocketChannelOutputBuffer.java:385) at com.sun.grizzly.http.SocketChannelOutputBuffer.realWriteBytes(SocketChannelOutputBuffer.java:367) at com.sun.grizzly.tcp.http11.InternalOutputBuffer$OutputStreamOutputBuffer.doWrite(InternalOutputBuffer.java:894) at com.sun.grizzly.tcp.http11.filters.ChunkedOutputFilter.doWrite(ChunkedOutputFilter.java:167) at com.sun.grizzly.tcp.http11.InternalOutputBuffer.doWrite(InternalOutputBuffer.java:661) at com.sun.grizzly.tcp.Response.doWrite(Response.java:685) at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:425) ... 72 more ]]>

Best regards

Mikael Johansson

From: manfred riem [mailto:manfred.riem_at_oracle.com]
Sent: Montag, 13. April 2015 16:09
To: users_at_javaserverfaces.java.net
Cc: Johansson Mikael, FG-712
Subject: Re: JSF Mojarra v2.1.28 Resource loading problems when under load.

Hi Mikael,

Can you review if this is an occurrence of issue https://java.net/jira/browse/JAVASERVERFACES-3330 ?

Thanks!
Manfred

On 4/13/15, 8:28 AM, Mikael.Johansson_at_bmw.de<mailto:Mikael.Johansson_at_bmw.de> wrote:
Hi,

I have a very strange behavior using Glassfish 3.1.2.2 and JSF Mojarra 2.1.28.
Under load all of the sudden our application stops being able to serve standard
resources.

I.e. js, css, png files etc all of a sudden are not served and the glassfish server reports a 500 error
in our interceptor.

have any one any idea what could be the cause of this malfunction?

At the moment we are considering to stop using this feature of JSF and instead load the resources
without it.

Br

Mikael Johansson