2 Replies Latest reply on Apr 5, 2010 2:54 PM by Fer Gia

    rich:mediaoutput  Connection reset in Internet Explorer

    Fer Gia Newbie

      Hi All!

       

      Im using the <rich:mediaoutput> tag in my application and works ok showing a PDF file

      But in the console i see an error only opening the page with Internet Explorer.

      I have:

       

      ClientAbortException:  java.net.SocketException: Connection reset

       

      In Firefox that does not appears.

       

      This is my tag...

       

      <a4j:mediaOutput style="width:100%;height:300px" element="embed"
                      cacheable="false" session="false"
                      createContent="#{myBean.generate}" uriAttribute="src"
                      value="#{myBean.id}" mimeType="application/pdf" />

       

      The method in bean:

       

      public void generate(OutputStream out, Object o) throws IOException {
              IOUtils.copy(service.getFile((Long) o, "PDF"), out);
              out.flush();
      }

       

      Any ideas??

       

      Thanx!

        • 1. Re: rich:mediaoutput  Connection reset in Internet Explorer
          Ilya Shaikovsky Master

          check in the debugger in where it's thrown. I can't get it in my test sample.

          • 2. Re: rich:mediaoutput  Connection reset in Internet Explorer
            Fer Gia Newbie

            This is the trace....

             

            GRAVE: Servlet.service() para servlet Faces Servlet lanz� excepci�njavax.el.ELException: /pages/gest/revision.xhtml @23,72 createContent="#{revisionBean.generateFile}": ClientAbortException:  java.net.SocketException: Software caused connection abort: socket write error
            at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:74)
            at org.ajax4jsf.resource.UserResource.send(UserResource.java:110)
            at org.ajax4jsf.resource.ResourceLifecycle.sendResource(ResourceLifecycle.java:215)
            at org.ajax4jsf.resource.ResourceLifecycle.send(ResourceLifecycle.java:144)
            at org.ajax4jsf.resource.InternetResourceService.serviceResource(InternetResourceService.java:226)
            at org.ajax4jsf.resource.InternetResourceService.serviceResource(InternetResourceService.java:141)
            at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:488)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at com.most.web.SessionTimeoutFilter.doFilter(SessionTimeoutFilter.java:48)
            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.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
            at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
            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.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
            at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
            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:619)
            Caused by: ClientAbortException:  java.net.SocketException: Software caused connection abort: socket write error
            at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:319)
            at org.apache.catalina.connector.OutputBuffer.flush(OutputBuffer.java:288)
            at org.apache.catalina.connector.CoyoteOutputStream.flush(CoyoteOutputStream.java:98)
            at com.gasnatural.beans.gestion.bandejaentrada.RevisionCebtBean.generateCebt(RevisionCebtBean.java:29)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:325)
            at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:338)
            at org.jboss.el.parser.AstPropertySuffix.invoke(AstPropertySuffix.java:58)
            at org.jboss.el.parser.AstValue.invoke(AstValue.java:96)
            at org.jboss.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
            at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)
            ... 26 more
            Caused by: java.net.SocketException: Software caused connection abort: socket write error
            at java.net.SocketOutputStream.socketWrite0(Native Method)
            at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
            at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
            at org.apache.coyote.http11.InternalOutputBuffer.realWriteBytes(InternalOutputBuffer.java:740)
            at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:434)
            at org.apache.coyote.http11.InternalOutputBuffer.flush(InternalOutputBuffer.java:299)
            at org.apache.coyote.http11.Http11Processor.action(Http11Processor.java:964)
            at org.apache.coyote.Response.action(Response.java:183)
            at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:314) ... 39 more