[SAXException] No input source

Help with installation and general system troubleshooting questions concerning the office suite LibreOffice.
Post Reply
borafael
Posts: 2
Joined: Sat Jun 15, 2019 7:01 am

[SAXException] No input source

Post by borafael »

Hello!

I accidentally saved a file in docx format using LibreOffice and now when i try to open it i get the following error:
An error occurred during opening the file. This may be caused by incorrect file contents.
The error details are:
SAXException: No input source
Proceeding with import may cause data loss or corruption, and application may become unstable or crash.

Do you want to ignore the error and attempt to continue loading the file?
If i click "no" i get a little more information:
File format error found at
SAXParseException: "No input source"
SAXParseException: '[word/footnotes.xml line 2]: unknown error', Stream 'word/footnotes.xml', Line 2, Column 30482
SAXParseException: '[word/document.xml line 2]: unknown error', Stream 'word/document.xml', Line 2, Column 56720(row,col).
I have tried the solutions mentioned in the other similar threads (look for unmatching xml tags, dupicated attributes, etc but all seems to be ok, i checked using a xml validator) but without success.

I also tried to convert the file to odt using an automated tool but all fail (zamzar fails for example)

If i to go to exactly the line and column of the crampled up xml files i end up in the following places:

footnotes.xml ->
<w:spacing w:lineRule="auto" w:line="360"/>
(particularly, the opening quote on "auto")
document.xml ->
<w:rFonts w:cs="Arial" w:ascii="Garamond" w:hAnsi="Garamond"/>
(particularly, the : before hAnsi)

Maybe its another problem in disguise? Maybe something else is failing while the XML is being parsed and i should be looking elsewhere.

Anyway, any help/ideas/suggestions would be greatly appreciated!
OpenOffice 4 on Mac Os Sierra
User avatar
robleyd
Moderator
Posts: 5081
Joined: Mon Aug 19, 2013 3:47 am
Location: Murbko, Australia

Re: [SAXException] No input source

Post by robleyd »

Can you make the file available for someone to try and repair?

[Forum] How to attach a document here Note maximum file size is 128K. If your file is larger, use a file sharing site such as Mediafire and post the link here.
Cheers
David
OS - Slackware 15 64 bit
Apache OpenOffice 4.1.15
LibreOffice 24.2.2.2; SlackBuild for 24.2.2 by Eric Hameleers
User avatar
RoryOF
Moderator
Posts: 34612
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: [SAXException] No input source

Post by RoryOF »

A quick - and dirty - possibility: try using AbiWord to open the file. If it opens, even partially, ctrl A, Ctrl C, and then Paste into a blank OO document. Pending us getting hands-on of the actual file, this may (only may - a very small "may") recover some of the file content for you.

Under any circumstances do not Save over the existing damaged file until all recovery attempts have been tried.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
John_Ha
Volunteer
Posts: 9584
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: [SAXException] No input source

Post by John_Ha »

borafael wrote:any help/ideas/suggestions would be greatly appreciated!
See first post in the forum where Item 4 will allow you to extract all the text from the file by unzipping the .docx file and extracting \word\document.xml. Open it with Notepad++ and delete all the XML tags and save as a .txt file. Copy the text into LO - you will need to reformat the text.

Or upload the file so someone can look at it and attempt a repair. Use the Upload attachment tab below where you type (128 kB max); or use a file share site, Dropbox or Google Drive for a larger file.
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
borafael
Posts: 2
Joined: Sat Jun 15, 2019 7:01 am

Re: [SAXException] No input source

Post by borafael »

Thanks for all the replies to begin with!

I am aware of the ways to retrieve the information, actually, if i choose "yes" when i'm given the option to load anyway after the error i can access the text and i could try to work from there (seems to be complete though all over the place). In this case i am trying to see if the original document can be recovered, i mean, along all the footnotes, formats, etc...

What baffles me is that in other cases the error was "Sax Parse Exception: redefined attributes" or something like that, which allowed you to go manually and correct it, in this case the "unknown error" is really making me feel helpless.

Also, thanks for offering to fix it, the file is not only mine so i'll check with the author before i upload it.
OpenOffice 4 on Mac Os Sierra
User avatar
RoryOF
Moderator
Posts: 34612
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: [SAXException] No input source

Post by RoryOF »

From memory, the error you report is not one I have seen before.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
User avatar
robleyd
Moderator
Posts: 5081
Joined: Mon Aug 19, 2013 3:47 am
Location: Murbko, Australia

Re: [SAXException] No input source

Post by robleyd »

Likewise. From a quick look at the source code (LO) it seems this error is produced at Parser-startup initializations; more than that I'll need to dig further in the source to determine. Assuming I can understand the source sufficiently!

It might be that you prefer to provide the file directly to one of us; I would be happy to look at it for you; I''m sure others would offer the same.
Cheers
David
OS - Slackware 15 64 bit
Apache OpenOffice 4.1.15
LibreOffice 24.2.2.2; SlackBuild for 24.2.2 by Eric Hameleers
John_Ha
Volunteer
Posts: 9584
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: [SAXException] No input source

Post by John_Ha »

File format error found at
SAXParseException: "No input source"
SAXParseException: '[word/footnotes.xml line 2]: unknown error', Stream 'word/footnotes.xml', Line 2, Column 30482
SAXParseException: '[word/document.xml line 2]: unknown error', Stream 'word/document.xml', Line 2, Column 56720(row,col).
It looks like there are errors in two files. Check at row 2, column 30,482 in footnotes.xml and at row 2, column 56,720 in document.xml. Is the parameter at the precise location repeated earlier in the file?
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
User avatar
RoryOF
Moderator
Posts: 34612
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: [SAXException] No input source

Post by RoryOF »

The "no input source" worries me: that suggests that perhaps one of the internal files that makes up the document archive is missing or drastically truncated. I haven't seen that error before in connection with a damaged .docx file.
.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
Post Reply