AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.generalException
faultSubcode:
faultString: java.lang.OutOfMemoryError: Java heap space; nested exception is:
java.lang.OutOfMemoryError: Java heap space
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}hostname:ph28amlde020
java.lang.OutOfMemoryError: Java heap space; nested exception is:
java.lang.OutOfMemoryError: Java heap space
at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)
at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(Unknown Source)
at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at org.alfresco.webservice.content.ContentServiceSoapBindingStub.write(ContentServiceSoapBindingStub.java:467)
at es.yell.anexos.ACPimport.WSImportarDiario.uploadACP(WSImportarDiario.java:153)
at es.yell.anexos.ACPimport.WSImportarDiario.iniciarImportacion(WSImportarDiario.java:89)
at es.yell.anexos.ACPimport.WSImportarDiario.main(WSImportarDiario.java:40)
Error subiendo a Alfresco el fichero 2007_09_17.acp:
java.lang.OutOfMemoryError: Java heap space; nested exception is:
java.lang.OutOfMemoryError: Java heap space
private Reference uploadACP(String nombreFichero, ParentReference rutaDestinoACPS) throws Exception {
String rutaFichero = RUTA_ACPS + "/" + nombreFichero;
rutaDestinoACPS.setChildName("cm:" + nombreFichero);
NamedValue[] contentProps = new NamedValue[1];
contentProps[0] = Utils.createNamedValue(Constants.PROP_NAME, nombreFichero);
CMLCreate create = new CMLCreate(String.valueOf(Calendar.getInstance().getTimeInMillis()), rutaDestinoACPS,
null, null, null, Constants.TYPE_CONTENT, contentProps);
// Construct CML Block
CML cml = new CML();
cml.setCreate(new CMLCreate[] { create });
UpdateResult[] result;
Reference content = null;
try {
result = WebServiceFactory.getRepositoryService().update(cml);
content = result[0].getDestination();
} catch (Exception e) {
e.printStackTrace();
throw e;
}
ContentServiceSoapBindingStub contentService = WebServiceFactory.getContentService();
contentService.setTimeout(1000000);
ContentFormat contentFormat = new ContentFormat(MIMETYPE_ACP, "UTF-8");
try {
contentService.write(content, Constants.PROP_CONTENT, Utiles.getBytesFromFile(rutaFichero), contentFormat);
} catch (Exception e) {
deleteContent(content);
e.printStackTrace();
throw e;
}
return content;
}
public static byte[] getBytesFromFile(String filePath) throws IOException {
File file = new File(filePath);
InputStream is = new FileInputStream(file);
// Get the size of the file
long length = file.length();
if (length > Integer.MAX_VALUE) {
// File is too large
}
// Create the byte array to hold the data
byte[] bytes = new byte[(int) length];
// Read in the bytes
int offset = 0;
int numRead = 0;
while (offset < bytes.length && (numRead = is.read(bytes, offset, bytes.length - offset)) >= 0) {
offset += numRead;
}
// Ensure all the bytes have been read in
if (offset < bytes.length) {
throw new IOException("Could not completely read file " + file.getName());
}
// Close the input stream and return bytes
is.close();
return bytes;
}
Content from pre 2016 and from language groups that have been closed.
Content is read-only.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.