[SAXException] No input source

Help with installation and general system troubleshooting questions concerning the office suite LibreOffice.

[SAXException] No input source

Postby borafael » Sat Jun 15, 2019 7:16 am

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
borafael
 
Posts: 2
Joined: Sat Jun 15, 2019 7:01 am

Re: [SAXException] No input source

Postby robleyd » Sat Jun 15, 2019 8:49 am

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
Apache OpenOffice Developer Build 4.2.0 9820 - Slackware 14.2 - 64 bit
LibreOffice 6.0.7.3 - Slackware 14.2 - 64 bit
Apache OpenOffice 4.1.4 - Windows 7 Virtual machine
User avatar
robleyd
Moderator
 
Posts: 2809
Joined: Mon Aug 19, 2013 3:47 am
Location: Murbko, Australia

Re: [SAXException] No input source

Postby RoryOF » Sat Jun 15, 2019 9:59 am

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.6 on Xubuntu 18.04.2 (mostly 64 bit version) and very infrequently on Win2K/XP
User avatar
RoryOF
Moderator
 
Posts: 29053
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: [SAXException] No input source

Postby John_Ha » Sat Jun 15, 2019 1:08 pm

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.
AOO 4.1.6, Windows 7 Home 64 bit

See the Writer Manual, the Writer FAQ, the Writer Tutorials and the Writer guide.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
John_Ha
Volunteer
 
Posts: 6649
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: [SAXException] No input source

Postby borafael » Sat Jun 15, 2019 7:41 pm

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
borafael
 
Posts: 2
Joined: Sat Jun 15, 2019 7:01 am

Re: [SAXException] No input source

Postby RoryOF » Sat Jun 15, 2019 7:48 pm

From memory, the error you report is not one I have seen before.
Apache OpenOffice 4.1.6 on Xubuntu 18.04.2 (mostly 64 bit version) and very infrequently on Win2K/XP
User avatar
RoryOF
Moderator
 
Posts: 29053
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: [SAXException] No input source

Postby robleyd » Sun Jun 16, 2019 2:21 am

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
Apache OpenOffice Developer Build 4.2.0 9820 - Slackware 14.2 - 64 bit
LibreOffice 6.0.7.3 - Slackware 14.2 - 64 bit
Apache OpenOffice 4.1.4 - Windows 7 Virtual machine
User avatar
robleyd
Moderator
 
Posts: 2809
Joined: Mon Aug 19, 2013 3:47 am
Location: Murbko, Australia

Re: [SAXException] No input source

Postby John_Ha » Sun Jun 16, 2019 11:19 pm

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?
AOO 4.1.6, Windows 7 Home 64 bit

See the Writer Manual, the Writer FAQ, the Writer Tutorials and the Writer guide.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
John_Ha
Volunteer
 
Posts: 6649
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: [SAXException] No input source

Postby RoryOF » Sun Jun 16, 2019 11:23 pm

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.6 on Xubuntu 18.04.2 (mostly 64 bit version) and very infrequently on Win2K/XP
User avatar
RoryOF
Moderator
 
Posts: 29053
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland


Return to LibreOffice

Who is online

Users browsing this forum: No registered users and 1 guest