OpenXML filter failed with String value {n} exceeds range of unsigned int

Created by: Aleksei Bogdanovich

Okapi openxml filter failed with a processing of a file (attached one example)

The reason is a file word/_rels/document.xml.rels can contain a relationship tag with id attribute that could not be converted to numeric value with a larger int type.

<Relationship Id="R922b713c7fd246ad" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" Target="media/image1.png"/>

Stacktrace:
java.lang.NumberFormatException: String value 9227137246 exceeds range of unsigned int. at java.base/java.lang.Integer.parseUnsignedInt(Integer.java:839) at java.base/java.lang.Integer.parseUnsignedInt(Integer.java:928) at net.sf.okapi.filters.openxml.RelationshipIdGeneration$Default.refineLastIndexWith(RelationshipIdGeneration.java:42) at net.sf.okapi.filters.openxml.Relationships$Default.readWith(Relationships.java:134) at net.sf.okapi.filters.openxml.Document$General.relationshipsFor(Document.java:445) at net.sf.okapi.filters.openxml.Document$General.open(Document.java:147) at net.sf.okapi.filters.openxml.OpenXMLFilter.openDocument(OpenXMLFilter.java:423) at net.sf.okapi.filters.openxml.OpenXMLFilter.next(OpenXMLFilter.java:250) at net.sf.okapi.steps.common.RawDocumentToFilterEventsStep.handleEvent(RawDocumentToFilterEventsStep.java:135) at net.sf.okapi.common.pipeline.Pipeline.execute(Pipeline.java:117) at net.sf.okapi.common.pipeline.Pipeline.process(Pipeline.java:227) at net.sf.okapi.common.pipeline.Pipeline.process(Pipeline.java:199) at net.sf.okapi.common.pipelinedriver.PipelineDriver.processBatch(PipelineDriver.java:182)

‌

Assignee Loading
Time tracking Loading