Bug #2517

RCP: 0.7.9, give useful information in the console when "disk full" error occurs during import modules

Added by Serge Heiden 5 months ago.

Status:New Start date:03/13/2019
Priority:Normal Due date:
Assignee:- % Done:

0%

Category:Import Spent time: -
Target version:TXM 0.8.1

Description

Currently, a "disk full" error breaks import modules with a big stacktrace like the following:


-- Building XML-TXM (3 files)
003 .Unexpected error while parsing file file:/home/sheiden/TXM-0.8.0/corpora/HOBBESV8LI/tokenized/03leviathan.xml : javax.xml.stream.XMLStreamException: java.io.IOException: Aucun espace disponible sur le périphérique
Location line: 473280 character: 9
javax.xml.stream.XMLStreamException: java.io.IOException: Aucun espace disponible sur le périphérique
    at com.sun.xml.internal.stream.writers.XMLStreamWriterImpl.writeAttribute(XMLStreamWriterImpl.java:553)
    at org.txm.importer.scripts.xmltxm.Xml2Ana.processEndElement(Xml2Ana.groovy:310)
    at org.txm.importer.StaxIdentityParser.process(StaxIdentityParser.java:161)
    at org.txm.importer.StaxIdentityParser.process(StaxIdentityParser.java:119)
    at org.txm.importer.StaxIdentityParser$process.call(Unknown Source)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:128)
    at org.txm.scripts.importer.xtz.XTZImporter.doToXMLTXMStep(XTZImporter.groovy:457)
    at org.txm.scripts.importer.xtz.XTZImporter.process(XTZImporter.groovy:127)
    at org.txm.importer.xtz.ImportModule.start(ImportModule.java:113)
    at org.txm.scripts.importer.xtz.XTZImport.super$2$start(XTZImport.groovy)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:104)
    at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:326)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1235)
    at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:146)
    at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuper0(ScriptBytecodeAdapter.java:166)
    at org.txm.scripts.importer.xtz.XTZImport.start(XTZImport.groovy:86)
    at org.txm.importer.xtz.ImportModule.process(ImportModule.java:242)
    at org.txm.importer.xtz.ImportModule$process$2.call(Unknown Source)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:120)
    at org.txm.scripts.importer.xtz.xtzLoader.run(xtzLoader.groovy:58)
    at groovy.util.GroovyScriptEngine.run(GroovyScriptEngine.java:599)
    at org.txm.groovy.core.GroovyScriptedImportEngine._build(GroovyScriptedImportEngine.java:123)
    at org.txm.core.engines.ScriptedImportEngine.build(ScriptedImportEngine.java:56)
    at org.txm.objects.Project._compute(Project.java:299)
    at org.txm.core.results.TXMResult.compute(TXMResult.java:2190)
    at org.txm.core.results.TXMResult.compute(TXMResult.java:2114)
    at org.txm.rcp.handlers.scripts.ExecuteImportScript$2.run(ExecuteImportScript.java:145)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)
Caused by: java.io.IOException: Aucun espace disponible sur le périphérique
    at java.io.FileOutputStream.writeBytes(Native Method)
    at java.io.FileOutputStream.write(FileOutputStream.java:326)
    at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
    at java.io.BufferedOutputStream.write(BufferedOutputStream.java:95)
    at com.sun.xml.internal.stream.writers.UTF8OutputStreamWriter.write(UTF8OutputStreamWriter.java:92)
    at com.sun.xml.internal.stream.writers.UTF8OutputStreamWriter.write(UTF8OutputStreamWriter.java:133)
    at com.sun.xml.internal.stream.writers.XMLStreamWriterImpl.writeXMLContent(XMLStreamWriterImpl.java:1504)
    at com.sun.xml.internal.stream.writers.XMLStreamWriterImpl.writeAttribute(XMLStreamWriterImpl.java:547)
    ... 35 more
javax.xml.stream.XMLStreamException: java.io.IOException: Aucun espace disponible sur le périphérique
    at com.sun.xml.internal.stream.writers.XMLStreamWriterImpl.close(XMLStreamWriterImpl.java:378)
    at org.txm.importer.StaxIdentityParser.process(StaxIdentityParser.java:189)
    at org.txm.importer.StaxIdentityParser.process(StaxIdentityParser.java:119)
    at org.txm.importer.StaxIdentityParser$process.call(Unknown Source)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:128)
    at org.txm.scripts.importer.xtz.XTZImporter.doToXMLTXMStep(XTZImporter.groovy:457)
    at org.txm.scripts.importer.xtz.XTZImporter.process(XTZImporter.groovy:127)
    at org.txm.importer.xtz.ImportModule.start(ImportModule.java:113)
    at org.txm.scripts.importer.xtz.XTZImport.super$2$start(XTZImport.groovy)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:104)
    at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:326)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1235)
    at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:146)
    at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuper0(ScriptBytecodeAdapter.java:166)
    at org.txm.scripts.importer.xtz.XTZImport.start(XTZImport.groovy:86)
    at org.txm.importer.xtz.ImportModule.process(ImportModule.java:242)
    at org.txm.importer.xtz.ImportModule$process$2.call(Unknown Source)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:120)
    at org.txm.scripts.importer.xtz.xtzLoader.run(xtzLoader.groovy:58)
    at groovy.util.GroovyScriptEngine.run(GroovyScriptEngine.java:599)
    at org.txm.groovy.core.GroovyScriptedImportEngine._build(GroovyScriptedImportEngine.java:123)
    at org.txm.core.engines.ScriptedImportEngine.build(ScriptedImportEngine.java:56)
    at org.txm.objects.Project._compute(Project.java:299)
    at org.txm.core.results.TXMResult.compute(TXMResult.java:2190)
    at org.txm.core.results.TXMResult.compute(TXMResult.java:2114)
    at org.txm.rcp.handlers.scripts.ExecuteImportScript$2.run(ExecuteImportScript.java:145)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)
Caused by: java.io.IOException: Aucun espace disponible sur le périphérique
    at java.io.FileOutputStream.writeBytes(Native Method)
    at java.io.FileOutputStream.write(FileOutputStream.java:326)
    at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
    at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
    at com.sun.xml.internal.stream.writers.UTF8OutputStreamWriter.flush(UTF8OutputStreamWriter.java:138)
    at com.sun.xml.internal.stream.writers.XMLStreamWriterImpl.close(XMLStreamWriterImpl.java:376)
    ... 34 more

The useful information here is "Aucun espace disponible sur le périphérique".

Solution

  • don't display the stacktrace, or only a short version of it
  • display the "Aucun espace disponible sur le périphérique" error message
  • display that it is an error condition, and that the module aborts its execution

Related issues

related to Task #419: TBX: x.x, "out of space" i/o error during import management New 10/16/2013

Also available in: Atom PDF