Prezados, alguém já precisou realizar um envio de um arquivo 800mb via serviço ECMDocumentService?
Tenho uma aplicação que transfere vários arquivos para o GED, mas, quando o arquivo é grande da a seguinte mensagem: "java.lang.OutOfMemoryError: Java heap space".
Alterei a memoria no start da aplicação:
-Xms5120m
-Xmx8192m
mas, sem sucesso. o problema ocorre na hora em que chamo o método createSimpleDocument.
Mensagem completa do erro:
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOf(Unknown Source)
at java.io.ByteArrayOutputStream.grow(Unknown Source)
at java.io.ByteArrayOutputStream.ensureCapacity(Unknown Source)
at java.io.ByteArrayOutputStream.write(Unknown Source)
at sun.net.www.http.PosterOutputStream.write(Unknown Source)
at com.sun.xml.internal.stream.writers.UTF8OutputStreamWriter.write(Unknown Source)
at com.sun.xml.internal.stream.writers.UTF8OutputStreamWriter.write(Unknown Source)
at com.sun.xml.internal.stream.writers.XMLStreamWriterImpl.writeXMLContent(Unknown Source)
at com.sun.xml.internal.stream.writers.XMLStreamWriterImpl.writeXMLContent(Unknown Source)
at com.sun.xml.internal.stream.writers.XMLStreamWriterImpl.writeCharacters(Unknown Source)
at com.sun.xml.internal.ws.util.xml.XMLStreamWriterFilter.writeCharacters(Unknown Source)
at com.sun.xml.internal.bind.v2.runtime.output.XMLStreamWriterOutput.text(Unknown Source)
at com.sun.xml.internal.bind.v2.runtime.XMLSerializer.leafElement(Unknown Source)
at com.sun.xml.internal.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl$PcdataImpl.writeLeafElement(Unknown Source)
at com.sun.xml.internal.bind.v2.runtime.reflect.TransducedAccessor$CompositeTransducedAccessorImpl.writeLeafElement(Unknown Source)
at com.sun.xml.internal.bind.v2.runtime.property.SingleElementLeafProperty.serializeBody(Unknown Source)
at com.sun.xml.internal.bind.v2.runtime.ClassBeanInfoImpl.serializeBody(Unknown Source)
at com.sun.xml.internal.bind.v2.runtime.XMLSerializer.childAsXsiType(Unknown Source)
at com.sun.xml.internal.bind.v2.runtime.property.ArrayElementNodeProperty.serializeItem(Unknown Source)
at com.sun.xml.internal.bind.v2.runtime.property.ArrayElementProperty.serializeListBody(Unknown Source)
at com.sun.xml.internal.bind.v2.runtime.property.ArrayERProperty.serializeBody(Unknown Source)
at com.sun.xml.internal.bind.v2.runtime.ClassBeanInfoImpl.serializeBody(Unknown Source)
at com.sun.xml.internal.bind.v2.runtime.XMLSerializer.childAsXsiType(Unknown Source)
at com.sun.xml.internal.bind.v2.runtime.BridgeImpl.marshal(Unknown Source)
at com.sun.xml.internal.bind.v2.runtime.CompositeStructureBeanInfo.serializeBody(Unknown Source)
at com.sun.xml.internal.bind.v2.runtime.CompositeStructureBeanInfo.serializeBody(Unknown Source)
at com.sun.xml.internal.bind.v2.runtime.XMLSerializer.childAsXsiType(Unknown Source)
at com.sun.xml.internal.bind.v2.runtime.MarshallerImpl.write(Unknown Source)
at com.sun.xml.internal.bind.v2.runtime.BridgeImpl.marshal(Unknown Source)
at com.sun.xml.internal.bind.api.Bridge.marshal(Unknown Source)
at com.sun.xml.internal.ws.db.glassfish.WrapperBridge.marshal(Unknown Source)
at com.sun.xml.internal.ws.message.jaxb.JAXBMessage.writePayloadTo(Unknown Source)
Alguém teria alguma sugestão?
Olá Otto, a recomendação para arquivos maiores que 5mb é utilizar o FTP do fluig para fazer o upload: Utilização de Webservices
— Diogo Boegershausen 02 de Oct de 2018