1 Reply Latest reply on Oct 10, 2013 10:15 AM by nikolovmiroslav

    large attachments - IllegalStateException cannot create a session after the response has been committed

    nikolovmiroslav

      My server is JBossWS-CXF-stack version 3.4.1

      I have two services, for uploading and downloading files with attachments in WS.

      I test them with soapUI(4.5.2 and 4.6.0)

      On upload everything is ok, even for a file with size 1.09GB.

      But, on download, in sopaUI i receive "Error getting response; null"

      On server side, I have a message from SpringSecurity: "[org.springframework.security.web.context.HttpSessionSecurityContextRepository] Failed to create a session, as response has been committed. Unable to store SecurityContext."

      It is caused from "java.lang.IllegalStateException cannot create a session after the response has been committed"

      I do not know, why original session is lost and it fails to get a new one>

      It is very strange why upload is working, but download not?

       

      Regards


        • 1. Re: large attachments - IllegalStateException cannot create a session after the response has been committed
          nikolovmiroslav

          Hi again,


          The fault in soapUI was OutOfMemoryError: java heap space, now I'm using soapUI-4.6.0-64bit with -Xmx4096m.

          So, downloading a large attachment(1.09GB) don't crash, but it is extremely slowly.

           

          Why uploading of large attachment is fast and works with soapUI-32bit-normal memory settings, but there are difference on downloading the same large attachment?

          Downloading of small attachment work perfectly.

          I'm using @MTOM anotation on my web service. In the WSDL file content elements have type "swaRef".

          Downloaded attachments has Content type="application/octet-stream" and Type="XOP".

          Where can be the reason for slowly speed in soapUI(some configuration issue) or in JBoss-CXF?

           

          DataHandler.writeTo(OutputStream) line: 308
          AttachmentSerializer.writeAttachments() line: 234
          AttachmentOutInterceptor$AttachmentOutEndingInterceptor.handleMessage(Message) line: 96
          PhaseInterceptorChain.doIntercept(Message) line: 255
          OutgoingChainInterceptor.handleMessage(Message) line: 77
          PhaseInterceptorChain.doIntercept(Message) line: 255
          ChainInitiationObserver.onMessage(Message) line: 113
          ServletDestination.invoke(ServletConfig, ServletContext, HttpServletRequest, HttpServletResponse) line: 97
          ServletControllerExt(ServletController).invokeDestination(HttpServletRequest, HttpServletResponse, ServletDestination) line: 461
          ServletControllerExt.invoke(HttpServletRequest, HttpServletResponse, Endpoint) line: 172
          RequestHandlerImpl.handleHttpRequest(Endpoint, HttpServletRequest, HttpServletResponse, ServletContext) line: 57
          ServletHelper.callRequestHandler(HttpServletRequest, HttpServletResponse, ServletContext, Bus, Endpoint) line: 156
          CXFNonSpringServletExt.invoke(HttpServletRequest, HttpServletResponse) line: 90
          CXFNonSpringServletExt(AbstractHTTPServlet).handleRequest(HttpServletRequest, HttpServletResponse) line: 179
          CXFNonSpringServletExt(AbstractHTTPServlet).doPost(HttpServletRequest, HttpServletResponse) line: 103
          CXFNonSpringServletExt(HttpServlet).service(HttpServletRequest, HttpServletResponse) line: 754
          CXFNonSpringServletExt(AbstractHTTPServlet).service(ServletRequest, ServletResponse) line: 159

           

          Regards