OOo: Error exporting the document Untitled1: Write Error. The file could no be written

Bug #322225 reported by Oszkar Ambrus
50
This bug affects 10 people
Affects Status Importance Assigned to Milestone
openoffice.org (Ubuntu)
Fix Released
Medium
Chris Cheney
Nominated for Karmic by Mathieu Comandon

Bug Description

Binary package hint: openoffice.org

I'm using Kubuntu 8.10 and te Oo package is: openoffice.org-core 1:3.0.1rc1-2ubuntu2intrepid1.

Can't export MediaWiki or XHTML format. It says "Error exporting the document Untitled1: Write Error. The file could no be written".

I've found many threads on this, all of them saying this is a java problem, but I couldn't get around it, and I suspected it had been solved, but returned in Oo 3.

ProblemType: Bug
Architecture: i386
DistroRelease: Ubuntu 8.10
NonfreeKernelModules: fglrx
Package: openoffice.org-core 1:3.0.1~rc1-2ubuntu2~intrepid1
ProcEnviron:
 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
 LANG=en_IE.UTF-8
 SHELL=/bin/bash
SourcePackage: openoffice.org
Uname: Linux 2.6.27-11-generic i686
UnreportableReason: This is not a genuine Ubuntu package

Tags: apport-bug
Revision history for this message
Oszkar Ambrus (aoszkar) wrote :
Revision history for this message
Chris Cheney (ccheney) wrote :

This does not happen on official 3.0.1 so this is either a Debian/Ubuntu issue or an ooo-build issue.

Chris

Changed in openoffice.org:
importance: Undecided → Medium
milestone: none → jaunty-alpha-5
status: New → Triaged
Revision history for this message
Chris Cheney (ccheney) wrote :

16:34 <@calc> kohei_: does xhtml or mediawiki export work for you on 3.0.1?
16:34 <@calc> kohei_: it works for me with sun build but not the ubuntu build
16:34 <@kohei_> calc: don't know, never used them. let me check.
16:34 <@calc> ok
16:37 <@kohei_> calc: xhtml export seems to work.
16:39 <@kohei_> calc: and mediawiki does too. but I used a very minimalistic
                test document.
16:39 <@calc> ok i guess it must be a problem with debian/ubuntu packaging

Revision history for this message
Chris Cheney (ccheney) wrote :

16:40 <@kohei_> it must be
16:40 <@calc> ok
16:40 <@kohei_> so, what doesn't work? does the filter not get loaded, or ... ?
16:41 <@kohei_> both filters are xslt filters.
16:44 <@calc> it gives me an error
16:44 <@calc> lets see what it says
16:44 <@kohei_> calc: ah wait. the suse packaged version has those filters
                broken. but the latest build from svn has them working.
16:45 <@kohei_> so, it must be a packaging issue in general.
16:45 <@calc> It says Error saving the document Untitled1: Write Error. The
              file could not be written.
16:45 <@kohei_> yup, the same problem.
16:45 <@calc> so it was something fixed in ooo-build or somewhere else?
16:46 <@kohei_> not sure. either it was fixed recently, or it could be a
                packaging issue...
16:47 <@calc> i'll pull a diff of ooo-build to see if it looks like anything
              important is there
16:47 <@calc> my checkout was 15230
16:48 <@kohei_> mine is 15281

Revision history for this message
Chris Cheney (ccheney) wrote :

This also affects saving to Office 2003 XML format.

Changed in openoffice.org:
milestone: jaunty-alpha-5 → jaunty-alpha-6
Revision history for this message
bamyasi (iadzhubey) wrote :

Same problem here: Ubuntu 8.10, openoffice.org-core 1:3.0.1-1ubuntu1~intrepid1. Cannot export anything. Switching between Sun JRE 1.6.0_10 and gcj 1.5.0 makes no difference, the error persists. Very annoying.

Revision history for this message
Oszkar Ambrus (aoszkar) wrote :

Some say it's causes by access restrictions on the tmp folder, and changing the paths solve this.
I tried that, but it didn't work.

What worked for me was starting oowriter in root mode, but I guess you can't always do that.
But in great need it is a solution...

Revision history for this message
bamyasi (iadzhubey) wrote :

After I tried to change a few Java options (including installing some gcj packages) it starts crashing with a different error:

ERROR: 'file:///usr/lib/openoffice/basis3.0/share/xslt/wiki/odt2mediawiki.xsl: line 44: Circular variable/parameter reference in '[param(CODE_TAB_REPLACEMENT), param(CODE_STYLES)]'.'
FATAL ERROR: 'Could not compile stylesheet'

I removed everything Java-related from the system, reinstalled all OOO packages and made sure default Sun Java JRE is selected but this did not help. Obviously, the whole thing is bothched.

Revision history for this message
bamyasi (iadzhubey) wrote :

SOLVED!

I have no idea which of my tweaks did it but export now works perfectly. Here's the procedure, would love to see this fix incorporated into OOo package.

1. Uninstalled everything related to GCJ/OpenJDK and made sure Sun JRE is selected in OOo.

2. Downloaded odt2mediawiki.xsl file patched to workaround a bug in XALAN xslt parser in Ubuntu from here:

http://www.openoffice.org/nonav/issues/showattachment.cgi/60534/odt2mediawiki.xsl

(see http://www.openoffice.org/issues/show_bug.cgi?id=96279 for full bug report and discussion)

3. Copied downloaded odt2mediawiki.xsl file to /usr/lib/openoffice/basis3.0/share/xslt/wiki/ on my system replacig the original one

4. Downloaded MathML xslt support files from here:

http://prdownloads.sourceforge.net/xsltml/xsltml_2.0.zip

(home page: http://www.raleigh.ru/MathML/mmltex/, WARNING it is in Cyrillics)

5. Created subdirectory /usr/lib/openoffice/basis3.0/share/xslt/wiki/math/ and unpacked contents of xsltml_2.0.zip archive into it

6. Restarted OOo

It works now! No more error messages regarding circular variable references, no complaints about being unable to save a file, even warnings about running XSLT 1.0 stylesheet with XSLT 2.0 parser are gone (yes, I've always had them before). Produces perfectly wiki-formatted files.

Revision history for this message
Chris Cheney (ccheney) wrote :

Thanks for pointing out those bug reports. I also found what appears to be a fix for the word 2003 xml format save failure. Maybe we can get a fix for the xalan bug so we won't have to keep fixing broken files as we find them. :-)

Chris Cheney (ccheney)
Changed in openoffice.org:
assignee: nobody → ccheney
Revision history for this message
Chris Cheney (ccheney) wrote :

This was caused by what appears to be a combination of issues, the xsl files were written to xslt 1.0 spec and saxon v9 is xslt 2.0 parser. It seems the system saxon v9 did not work properly but switching back to OOo internal saxon v9 fixed the problem. We are looking at potentially upgrading the system saxon v9 to a newer version if this corrects the problem so that we can go back to using the system version. But for the time being we are using the OOo internal one for Jaunty Beta since that works.

Thanks,

Chris

Changed in openoffice.org:
milestone: jaunty-alpha-6 → ubuntu-9.04-beta
status: Triaged → Fix Released
Revision history for this message
Joshua Kugler (jkugler) wrote :

I am seeing this problem again in Jaunty/9.04 with the standard Ubuntu OO packages. I installed Sun Java 6, and am getting the "Could not write file" error.

ii openoffice.org-base-core 1:3.0.1-9ubuntu3 full-featured office productivity suite -- s
ii openoffice.org-calc 1:3.0.1-9ubuntu3 full-featured office productivity suite -- s
ii openoffice.org-common 1:3.0.1-9ubuntu3 full-featured office productivity suite -- a
ii openoffice.org-core 1:3.0.1-9ubuntu3 full-featured office productivity suite -- a
ii openoffice.org-draw 1:3.0.1-9ubuntu3 full-featured office productivity suite -- d
ii openoffice.org-emailmerge 1:3.0.1-9ubuntu3 full-featured office productivity suite -- e
ii openoffice.org-help-en-gb 1:3.0.1-9ubuntu2 full-featured office productivity suite -- E
ii openoffice.org-help-en-us 1:3.0.1-9ubuntu2 full-featured office productivity suite -- E
ii openoffice.org-hyphenation 0.3 Hyphenation patterns for OpenOffice.org
ii openoffice.org-hyphenation-en-us 2.4-2ubuntu1 US English hyphenation patterns for OpenOffi
ii openoffice.org-impress 1:3.0.1-9ubuntu3 full-featured office productivity suite -- p
ii openoffice.org-kde 1:3.0.1-9ubuntu3 full-featured office productivity suite -- K
ii openoffice.org-l10n-common 1:3.0.1-9ubuntu2 common files for OpenOffice.org language and
ii openoffice.org-l10n-en-gb 1:3.0.1-9ubuntu2 full-featured office productivity suite -- E
ii openoffice.org-l10n-en-za 1:3.0.1-9ubuntu2 full-featured office productivity suite -- E
ii openoffice.org-math 1:3.0.1-9ubuntu3 full-featured office productivity suite -- e
ii openoffice.org-style-crystal 1:3.0.1-9ubuntu3 full-featured office productivity suite -- C
ii openoffice.org-thesaurus-en-au 2.1-3.1 Australian English Thesaurus for OpenOffice.
ii openoffice.org-thesaurus-en-us 1:3.0.1-8ubuntu1 English Thesaurus for OpenOffice.org
ii openoffice.org-writer 1:3.0.1-9ubuntu3 full-featured office productivity suite -- w

Revision history for this message
Joshua Kugler (jkugler) wrote :

Sorry, forgot to mention that this is when trying to export to HTML/XHTML.

Revision history for this message
bamyasi (iadzhubey) wrote :

I do not see this error here. I have the same versions of OOo packages installed. Tried exporting to Wiki and HTML formats, both worked. Are you sure you have Java configured? Check Tools->Options->Java, for some reason OOo *always* keeps forgetting previous setting after the upgrade. Wait for a list of available JRE versions to appear in the selection window (may take a few seconds while it scans the hard drive) and check one of the radio buttons, e.g. "Sun Microsystems 1.6.0_13" is what I have selected here.

Revision history for this message
Joshua Kugler (jkugler) wrote :

Still failing on both txt and xhtml. I have selected the JRE (see attached screen shot).

Revision history for this message
Mathieu Comandon (strycore) wrote :

Upgrading to Open office 3.1 fixed the problem

Packages can be found on this PPA : https://launchpad.net/~openoffice-pkgs/+archive/ppa

Revision history for this message
Mathieu Comandon (strycore) wrote :

This bug should be reopened as I had the same problem on Karmic.
OpenOffice.org does not depend on openoffice.org-wiki-publisher to be installed and the wiki-publisher package isn't installed by default on Ubuntu.
Nevertheless, the export function is still present when using OOo Writer and users believe they can use that functionality, only to receive an error message.

Possible solutions :
 - Install openoffice.org-wiki-publisher by default with openoffice.org
 - Hide mediawiki and xhtml export function if the package isn't installed
 - Warn the user that the functionnality he is about to use isn't installed yet and give him the option to install it right away.

The simplest is of course the first method, just add wiki-publisher in the dependencies and that's it.

Changed in openoffice.org (Ubuntu):
status: Fix Released → Confirmed
Revision history for this message
Chris Cheney (ccheney) wrote :

You don't need wiki-publisher installed to save to those formats... you need openjdk-6-jre installed to do so.

Changed in openoffice.org (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Chris Cheney (ccheney) wrote :

Oh and probably openoffice.org-java-common as well, which is already warned in several places that it should be installed for much use of OOo.

Revision history for this message
Mathieu Comandon (strycore) wrote :

I found this weird because I never had openjdk-6-jre installed had managed to get the export functions working, so I tried to figure out this bug on a fresh install in VirtualBox.

On a fresh install, when exporting, OpenOffice complains that there is no JRE installed and suggest installing openoffice.org-java-common. At first I only installed the jre I'm used to : sun-java6-jre.
Then OpenOffice doesn't show the missing jre message but only the "Write error" message which is something you usually get when the hard drive is full or when the disk is read only.
When I installed openoffice.org-java-common everything was working correctly and it's true, openoffice.org-wiki-publisher isn't needed (I thought so because it had resolved the missing dependency of openoffice.org-java-common)

So the real issue is with Sun's JRE Open Office skips a useful error message, so this bug doesn't really concern Ubuntu.

Revision history for this message
Chris Cheney (ccheney) wrote :

openoffice.org doesn't require openjdk-6-jre perse its more that there have been known problems getting it to work with sun-java6-jre and it is also non-free so isn't recommended to be used. openjdk-6-jre is an open source project run by Sun themselves so is likely to be at least as good as sun-java6-jre and liable to be less buggy since it is open source which means bugs can be fixed easier. There has been discussion in the past to remove sun-java6 from Ubuntu entirely since it is essentially redundant now, but it is still in Karmic for now.

Revision history for this message
pumba (anatrof) wrote :

Ubuntu 9.10 openoffice 3.1.1 the bug about export to wikimedia has been disappeared when I've installed manually package openoffice.org-wiki-publisher

Revision history for this message
Mathieu Comandon (strycore) wrote :

@pumba , please read the comments from #17 to yours

Revision history for this message
pumba (anatrof) wrote :

I've read, but main error was "soffice.bin[2488]: segfault at 48 ip 00007f1fc6df7b40 sp 00007fff0d1e97e8 error 4 in libsvtlx.so[7f1fc6af8000+44d000]" it has been repeated when i've been trying to export to wiki or pdf.
I had no idea how it can be mixed one of openoffice.org-wiki-publisher or java with pdf, but when i did advise number 2 in #17 the problem was solved and both exports now are working well.

Revision history for this message
justin212k (justinak) wrote :

I ran into this error exporting mediawiki. sudo apt-get install openoffice.org-wiki-publisher fixed it.

ubuntu 9.10, java: openjdk, java version "1.6.0_0"

Revision history for this message
Ivan (ivan-zderadicka) wrote :

Same problem on Karmic (with sun-java).
installation of openoffice.org-wiki-publisher fixed it (also for XHTML export), looks like there is an dependency issue in openoffice package - openoffice.org-wiki-publisher install add also following packages:
libcommons-codec-java libcommons-httpclient-java libcommons-lang-java libcommons-logging-java
openoffice.org-java-common

Revision history for this message
bamyasi (iadzhubey) wrote :

Comments #17-26 refer to a completely different issue (missing openoffice.org-wiki-publishe dependency) and should be moved to another bug report.

The original issue (saxon v9 xslt 2.0 parser incompatibility with the wiki-publisher XSLT) is still here in Ubuntu 12.04 LTS:

I/O warning : failed to load external entity "file:///usr/lib/libreoffice/share/extensions/wiki-publisher/filter/math/mmltex.xsl"
compilation error: file file:///usr/lib/libreoffice/program/../share/extensions/wiki-publisher/filter/odt2mediawiki.xsl line 802 element include
xsl:include : unable to load file:///usr/lib/libreoffice/share/extensions/wiki-publisher/filter/math/mmltex.xsl

Packages installed:

libreoffice 1:3.5.3-0ubuntu1
libreoffice-wiki-publisher 1.1.1+LibO3.5.3-0ubuntu1
openoffice.org-wiki-publisher 1:3.3.0-7ubuntu7
libreoffice-java-common 1:3.5.3-0ubuntu1
default-jre 1:1.6-43ubuntu2
default-jre-headless 1:1.6-43ubuntu2
openjdk-6-jre 6b24-1.11.3-1ubuntu0.12.04.1
openjdk-6-jre-headless 6b24-1.11.3-1ubuntu0.12.04.1

Revision history for this message
bamyasi (iadzhubey) wrote :

FYI

I have just tested and can confirm that the issue has been fixed in LibreOffice 3.5.5-rc3:

libreoffice 1:3.5.5~rc3-0ubuntu1~ppa1
libreoffice-wiki-publisher 1.1.1+LibO3.5.5~rc3-0ubuntu1~ppa1

I was able to use wiki-publisher extension without errors after installing 3.5.5-rc3 packages from the LibreOffice PPA.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.