Bug #2517

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

Added by Serge Heiden over 4 years ago. Updated over 2 years ago.

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

20%

Category:Import Spent time: -
Target version:TXM 0.8.4 Estimated time:30.00 hours

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.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 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

This error could occur almost at any time during the import process -> the exception should bubble to the import Job and be managed as a warning (import continues) or as an error (import stops)


Related issues

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

History

#1 Updated by Matthieu Decorde over 2 years ago

  • Description updated (diff)
  • Target version changed from TXM 0.8.2 to TXM 0.8.4
  • % Done changed from 0 to 20
  • Estimated time set to 30.00

The stacktrace is only shown when the user activate stacktraces in preferences.

#2 Updated by Serge Heiden over 2 years ago

  • Description updated (diff)

Also available in: Atom PDF