Bug #3405
CQP Annotation, segment-category-value, can't delete some annotations
Statut: | Closed | Début: | 19/06/2023 | |
---|---|---|---|---|
Priorité: | Normal | Echéance: | ||
Assigné à: | - | % réalisé: | 100% |
|
Catégorie: | Annotation | Temps passé: | - | |
Version cible: | TXM 0.8.3 |
Description
The write annotations step seems to fail when there are some superposed annotations (of different type)
Error log:
Enregistrement de 1 annotations... [test2[198-199]=#del] [] Unexpected error while parsing file file:/home/xyz/runtime-rcpapplication.product/corpora/VOEUX/txm/VOEUX/0001.xml : javax.xml.stream.XMLStreamException: No element was found to write: java.lang.ArrayIndexOutOfBoundsException: Index -1 out of bounds for length 10 Location line: 643 character: 31 javax.xml.stream.XMLStreamException: No element was found to write: java.lang.ArrayIndexOutOfBoundsException: Index -1 out of bounds for length 10 at java.xml/com.sun.xml.internal.stream.writers.XMLStreamWriterImpl.writeEndElement(XMLStreamWriterImpl.java:962) at org.txm.importer.StaxIdentityParser.processEndElement(StaxIdentityParser.java:487) at org.txm.annotation.kr.core.AnnotationInjector.processEndElement(AnnotationInjector.java:529) at org.txm.importer.StaxIdentityParser.process(StaxIdentityParser.java:257) at org.txm.importer.StaxIdentityParser.process(StaxIdentityParser.java:151) at org.txm.importer.StaxIdentityParser.process(StaxIdentityParser.java:144) at org.txm.annotation.kr.core.AnnotationWriter.writeAnnotationsInFile(AnnotationWriter.java:295) at org.txm.annotation.kr.core.AnnotationWriter.writeAnnotations(AnnotationWriter.java:260) at org.txm.annotation.kr.core.AnnotationManager.saveAnnotations(AnnotationManager.java:82) at org.txm.annotation.kr.rcp.commands.SaveAnnotations$1.run(SaveAnnotations.java:72) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63) Caused by: java.lang.ArrayIndexOutOfBoundsException: Index -1 out of bounds for length 10 at java.xml/com.sun.xml.internal.stream.writers.XMLStreamWriterImpl$ElementStack.pop(XMLStreamWriterImpl.java:2027) at java.xml/com.sun.xml.internal.stream.writers.XMLStreamWriterImpl.writeEndElement(XMLStreamWriterImpl.java:935) ... 10 more
Solution¶
Fix the AnnotationsWriter & AnnotationInjection class implementing the solution of https://groupes.renater.fr/wiki/txm-info/public/annotation/specs_manual_annotation/specs_store_annotation#sauvegarde_definitive "Encodage XML des annotations" section
Historique
#1 Mis à jour par Matthieu Decorde il y a plus de 2 ans
- % réalisé changé de 0 à 80
XML fixed but more fixes to do later
#2 Mis à jour par Matthieu Decorde il y a plus de 2 ans
- Description mis à jour (diff)
#3 Mis à jour par Matthieu Decorde il y a plus de 2 ans
- Description mis à jour (diff)
#4 Mis à jour par Sebastien Jacquot il y a plus d'un an
- % réalisé changé de 80 à 100
#5 Mis à jour par Sebastien Jacquot il y a plus d'un an
- Statut changé de New à Closed