OpenXML filter for OmegaT gives error when opening Excel file with embedded HTML

Issue #1020 new
Manuel Souto Pico created an issue

I have an OmegaT project to translate an Excel file containing some HTML content and I have tried to use the Okapi OpenXML filter to open it.

When I enable the Okapi OpenXML filter and reload the project, I get an error and the project is closed. If I try to open it again, I get the same error again and the project closes again. In other words, the project is now unusable. The only way I can fix it is to disable the Okapi OpenXML filter editing the `filters.xml` file manually.

This is the error OmegaT gives me before the project is closed: 

This is the log: 

17318: Info: Omtv= 4.2.0 flag2_5=true flag3_plus=true
17318: Info: Loading: 'C:\Users\Valentina\Downloads\JLFW_Test3\source\br.xlsx' with okf_openxml
17318: Error: Failed to load specified project! (TF_LOAD_ERROR)
17318: Error: java.io.IOException: C:/Users/Valentina/Downloads/JLFW_Test3/source/br.xlsx
17318: Error: java.lang.ClassCastException: com.sun.xml.internal.stream.events.CharacterEvent cannot be cast to javax.xml.stream.events.EndElement
17318: Error: at org.omegat.filters2.master.FilterMaster.loadFile(FilterMaster.java:206)
17318: Error: at org.omegat.core.data.RealProject.loadSourceFiles(RealProject.java:1150)
17318: Error: at org.omegat.core.data.RealProject.loadProject(RealProject.java:369)
17318: Error: at org.omegat.core.data.ProjectFactory.loadProject(ProjectFactory.java:72)
17318: Error: at org.omegat.gui.main.ProjectUICommands$6.lambda$doInBackground$0(ProjectUICommands.java:523)
17318: Error: at org.omegat.core.Core.executeExclusively(Core.java:379)
17318: Error: at org.omegat.gui.main.ProjectUICommands$6.doInBackground(ProjectUICommands.java:523)
17318: Error: at org.omegat.gui.main.ProjectUICommands$6.doInBackground(ProjectUICommands.java:442)
17318: Error: at javax.swing.SwingWorker$1.call(SwingWorker.java:295)
17318: Error: at java.util.concurrent.FutureTask.run(FutureTask.java:266)
17318: Error: at javax.swing.SwingWorker.run(SwingWorker.java:334)
17318: Error: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
17318: Error: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
17318: Error: at java.lang.Thread.run(Thread.java:748)
17318: Error: Caused by: java.lang.ClassCastException: com.sun.xml.internal.stream.events.CharacterEvent cannot be cast to javax.xml.stream.events.EndElement
17318: Error: at com.sun.xml.internal.stream.events.DummyEvent.asEndElement(DummyEvent.java:122)
17318: Error: at net.sf.okapi.filters.openxml.StringItemParser.processText(StringItemParser.java:128)
17318: Error: at net.sf.okapi.filters.openxml.StringItemParser.parse(StringItemParser.java:78)
17318: Error: at net.sf.okapi.filters.openxml.SharedStringsPart.process(SharedStringsPart.java:113)
17318: Error: at net.sf.okapi.filters.openxml.SharedStringsPart.open(SharedStringsPart.java:91)
17318: Error: at net.sf.okapi.filters.openxml.OpenXMLFilter.nextInDocument(OpenXMLFilter.java:446)
17318: Error: at net.sf.okapi.filters.openxml.OpenXMLFilter.next(OpenXMLFilter.java:256)
17318: Error: at net.sf.okapi.filters.openxml.OpenXMLFilter.next(OpenXMLFilter.java:265)
17318: Error: at net.sf.okapi.lib.omegat.AbstractOkapiFilter.processFile(AbstractOkapiFilter.java:374)
17318: Error: at net.sf.okapi.lib.omegat.AbstractOkapiFilter.parseFile(AbstractOkapiFilter.java:209)
17318: Error: at net.sf.okapi.lib.omegat.OpenXMLFilter.parseFile(OpenXMLFilter.java:21)
17318: Error: at org.omegat.filters2.master.FilterMaster.loadFile(FilterMaster.java:204)
17318: Error: ... 13 more
17318: Info: Project loading end (LOG_DATAENGINE_LOAD_END)

The sample OmegaT project is attached, including a source sample file, also attached separately.

I am using:

  • OmegaT 4.2.0
  • okapiFiltersForOmegaT-1.8-1.40.0-dist.zip
  • Windows 10

Comments (8)

  1. Chase Tingley

    This file doesn’t produce an error when being extracted through just Okapi (tikal) on the dev branch. It’s possible this is something that’s been fixed (the reported plugin version is 1.40) or whether it’s something related to the plugin.

  2. Manuel Souto Pico reporter

    @Chase Tingley I think this ticket should be moved to the Okapi-plugin list of tickets, could you please do that in the backend? Or do I need to create a new one?

  3. Chase Tingley

    @Manuel Souto Pico I don’t think it’s possible to move tickets from one repo to another in Bitbucket issues, unfortunately. (@YvesS unless you know a way…)

  4. Log in to comment