Uploaded image for project: 'Chemistry (Retired)'
  1. Chemistry (Retired)
  2. CMIS-463

Document.checkIn(...) using WebServices gets OutOfMemoryError

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • OpenCMIS 0.6.0
    • None
    • None

    Description

      We have a project were we use OpenCMIS 0.5.0 to communicate to Alfresco using WebServices.
      When checking in a new version of a Document using Document.checkIn(...) we get an OutOfMemoryError indicating it is loading the whole file into memory (see below).

      Is the there any proper solution to this issue?

      Our workaround is to checkIn a dummy document and to use Document.setContentStream(...) to append the file to the document. This is obviously not a good solution because the checkIn is not atomic.

      --------------------------

      java.lang.OutOfMemoryError: Java heap space
      at java.util.Arrays.copyOf(Unknown Source) ~[na:1.6.0_26]
      at java.io.ByteArrayOutputStream.write(Unknown Source) ~[na:1.6.0_26]
      at sun.net.www.http.PosterOutputStream.write(Unknown Source) ~[na:1.6.0_26]
      at javax.activation.DataHandler.writeTo(Unknown Source) ~[na:1.6.0_26]
      at com.sun.xml.ws.encoding.MtomCodec$ByteArrayBuffer.write(MtomCodec.java:200) ~[jaxws-rt-2.1.7.jar:2.1.7]
      at com.sun.xml.ws.encoding.MtomCodec.encode(MtomCodec.java:167) ~[jaxws-rt-2.1.7.jar:2.1.7]
      at com.sun.xml.ws.encoding.SOAPBindingCodec.encode(SOAPBindingCodec.java:284) ~[jaxws-rt-2.1.7.jar:2.1.7]
      at com.sun.xml.ws.transport.http.client.HttpTransportPipe.process(HttpTransportPipe.java:155) ~[jaxws-rt-2.1.7.jar:2.1.7]
      at com.sun.xml.ws.transport.http.client.HttpTransportPipe.processRequest(HttpTransportPipe.java:94) ~[jaxws-rt-2.1.7.jar:2.1.7]
      at com.sun.xml.ws.transport.DeferredTransportPipe.processRequest(DeferredTransportPipe.java:116) ~[jaxws-rt-2.1.7.jar:2.1.7]
      at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:598) ~[jaxws-rt-2.1.7.jar:2.1.7]
      at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:557) ~[jaxws-rt-2.1.7.jar:2.1.7]
      at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:542) ~[jaxws-rt-2.1.7.jar:2.1.7]
      at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:439) ~[jaxws-rt-2.1.7.jar:2.1.7]
      at com.sun.xml.ws.client.Stub.process(Stub.java:222) ~[jaxws-rt-2.1.7.jar:2.1.7]
      at com.sun.xml.ws.client.sei.SEIStub.doProcess(SEIStub.java:135) ~[jaxws-rt-2.1.7.jar:2.1.7]
      at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:109) ~[jaxws-rt-2.1.7.jar:2.1.7]
      at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:89) ~[jaxws-rt-2.1.7.jar:2.1.7]
      at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:118) ~[jaxws-rt-2.1.7.jar:2.1.7]
      at $Proxy1096.checkIn(Unknown Source) ~[na:na]
      at org.apache.chemistry.opencmis.client.bindings.spi.webservices.VersioningServiceImpl.checkIn(VersioningServiceImpl.java:111) ~[chemistry-opencmis-client-bindings-0.5.0.jar:0.5.0]
      at org.apache.chemistry.opencmis.client.runtime.DocumentImpl.checkIn(DocumentImpl.java:201) ~[chemistry-opencmis-client-impl-0.5.0.jar:0.5.0]
      at org.apache.chemistry.opencmis.client.runtime.DocumentImpl.checkIn(DocumentImpl.java:411) ~[chemistry-opencmis-client-impl-0.5.0.jar:0.5.0]

      Attachments

        Activity

          People

            fmui Florian Müller
            nkopcsek Norbert Kopcsek
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: