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

Bug #322225 reported by Oszkar Ambrus on 2009-01-28
This bug affects 10 people
Affects Status Importance Assigned to Milestone (Ubuntu)
Chris Cheney
Nominated for Karmic by Mathieu Comandon

Bug Description

Binary package hint:

I'm using Kubuntu 8.10 and te Oo package is: 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: 1:3.0.1~rc1-2ubuntu2~intrepid1
Uname: Linux 2.6.27-11-generic i686
UnreportableReason: This is not a genuine Ubuntu package

Oszkar Ambrus (aoszkar) wrote :
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.


Changed in
importance: Undecided → Medium
milestone: none → jaunty-alpha-5
status: New → Triaged
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

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

Chris Cheney (ccheney) wrote :

This also affects saving to Office 2003 XML format.

Changed in
milestone: jaunty-alpha-5 → jaunty-alpha-6
bamyasi (iadzhubey) wrote :

Same problem here: Ubuntu 8.10, 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.

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...

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.

bamyasi (iadzhubey) wrote :


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:

(see 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:

(home page:, WARNING it is in Cyrillics)

5. Created subdirectory /usr/lib/openoffice/basis3.0/share/xslt/wiki/math/ and unpacked contents of 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.

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) on 2009-03-03
Changed in
assignee: nobody → ccheney
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.



Changed in
milestone: jaunty-alpha-6 → ubuntu-9.04-beta
status: Triaged → Fix Released
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 1:3.0.1-9ubuntu3 full-featured office productivity suite -- s
ii 1:3.0.1-9ubuntu3 full-featured office productivity suite -- s
ii 1:3.0.1-9ubuntu3 full-featured office productivity suite -- a
ii 1:3.0.1-9ubuntu3 full-featured office productivity suite -- a
ii 1:3.0.1-9ubuntu3 full-featured office productivity suite -- d
ii 1:3.0.1-9ubuntu3 full-featured office productivity suite -- e
ii 1:3.0.1-9ubuntu2 full-featured office productivity suite -- E
ii 1:3.0.1-9ubuntu2 full-featured office productivity suite -- E
ii 0.3 Hyphenation patterns for
ii 2.4-2ubuntu1 US English hyphenation patterns for OpenOffi
ii 1:3.0.1-9ubuntu3 full-featured office productivity suite -- p
ii 1:3.0.1-9ubuntu3 full-featured office productivity suite -- K
ii 1:3.0.1-9ubuntu2 common files for language and
ii 1:3.0.1-9ubuntu2 full-featured office productivity suite -- E
ii 1:3.0.1-9ubuntu2 full-featured office productivity suite -- E
ii 1:3.0.1-9ubuntu3 full-featured office productivity suite -- e
ii 1:3.0.1-9ubuntu3 full-featured office productivity suite -- C
ii 2.1-3.1 Australian English Thesaurus for OpenOffice.
ii 1:3.0.1-8ubuntu1 English Thesaurus for
ii 1:3.0.1-9ubuntu3 full-featured office productivity suite -- w

Joshua Kugler (jkugler) wrote :

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

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.

Joshua Kugler (jkugler) wrote :

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

Mathieu Comandon (strycore) wrote :

Upgrading to Open office 3.1 fixed the problem

Packages can be found on this PPA :

Mathieu Comandon (strycore) wrote :

This bug should be reopened as I had the same problem on Karmic. does not depend on 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 by default with
 - 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 (Ubuntu):
status: Fix Released → Confirmed
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 (Ubuntu):
status: Confirmed → Fix Released
Chris Cheney (ccheney) wrote :

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

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 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 everything was working correctly and it's true, isn't needed (I thought so because it had resolved the missing dependency of

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

Chris Cheney (ccheney) wrote : 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.

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

Mathieu Comandon (strycore) wrote :

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

pumba (anatrof) wrote :

I've read, but main error was "soffice.bin[2488]: segfault at 48 ip 00007f1fc6df7b40 sp 00007fff0d1e97e8 error 4 in[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 or java with pdf, but when i did advise number 2 in #17 the problem was solved and both exports now are working well.

justin212k (justinak) wrote :

I ran into this error exporting mediawiki. sudo apt-get install fixed it.

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

Ivan (ivan-zderadicka) wrote :

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

bamyasi (iadzhubey) wrote :

Comments #17-26 refer to a completely different issue (missing 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 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

bamyasi (iadzhubey) wrote :


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  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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