Java broken in openoffice hardy upgrades

Bug #222803 reported by Youssef on 2008-04-26
Affects Status Importance Assigned to Milestone (Ubuntu)
Chris Cheney

Bug Description

Binary package hint:

it seems that after an upgrade to hardy, the oopenoffice java configuration file becomes obsolete and doesn't get renewed ($HOME/.openoffice.org2/user/config/javasettings_Linux_x86.xml). That leaves java non-working by default in the openoffice shipped with hardy. A sure fix is to delete the file, openoffice recreates it upon restart. But it would be great if you guys made an update to hardy and patched the file (acutally the problem seems that the file still refers to java jre 1.6.03). This is a 100% sure fix it has been tested and confirmed by almost all of the people who suffered from the error. I urge you canonical to take action by issuing the required update, especially seeing this is an enterprise release. I attached the re-created correct file on my machine for you to examine and compare with the old one.

Youssef (that-y-guy) wrote :
description: updated
Chris Cheney (ccheney) wrote :

Changing what is in the file to the new version of Sun java would not fix it for everyone not using that version of java. There are several versions of java in Ubuntu.

Chris Cheney (ccheney) wrote :

Thanks for attaching the broken file though, I am going to investigate why it isn't getting updated. When I copied that file into my .openoffice.org2 directory it properly updated, so I think it is an issue of a package needing to be installed to make it work correctly.


Chris Cheney (ccheney) wrote :

The only way I managed to make it not work was to not have installed. It would automatically select the correct JRE without me having to do anything otherwise. Do you have installed? If not install it and restart and see if that fixes the problem.



Changed in
status: New → Incomplete
Youssef (that-y-guy) wrote :

well i have installed, it has been since i was on gutsy. But it seems the upgrade just let it sit there without any update, you are right to fix the problem we need to figure out why it's not upgrading the file.

Youssef (that-y-guy) wrote :

btw i think you didn't have the problem because it happens only on upgrades and not on fresh installs

Chris Cheney (ccheney) wrote :

So you are saying that did not get upgraded and is still at version 1:2.3.0-1ubuntu5.3 ?


Youssef (that-y-guy) wrote :

no i just checked actually and it's the latest version (1:2.4.0-3ubuntu6), so it did get upgraded, but somehow that specific file still points to the older java even after the upgrade

Chris Cheney (ccheney) wrote :

Oh, I am not sure what is happening then, I copied the file you attached that points to an invalid java (I don't have it installed either), and it automatically updated it to the right one for me. :-\

Changed in
status: Incomplete → New
Youssef (that-y-guy) wrote :

no you seem to have got me wrong. The file i attached in the file that points to the right java version, the other obsolete file is deleted ( that was how i fixed the problem ), i remember the only difference between them being the version number ( on the old one, on the correct one that is attached )

Chris Cheney (ccheney) wrote :

Well I don't have that version of java installed (I have gcj/gij) and it does detect the correct java and update it for me, so unless the old file had other problems than just pointing to the wrong java I am not sure what happened.

Rolf Leggewie (r0lf) wrote :

I can verify this problem. I am also upgrading from gutsy and had an old $HOME/.openoffice.org2/user/config/javasettings_Linux_x86.xml file. Starting and going to "Tools - Options - - Java" did indeed find the newer Java. But the file remained unchanged. The solution was as Youssef described to delete said file. After visiting the preferences entry for Java and confirming the new JRE everything is fine now.

Rolf Leggewie (r0lf) wrote :
Changed in
importance: Undecided → High
status: New → Triaged

For completeness, here's the error message text that is presented when the user tries to run any Java-based add-on while the path to JRE is stale:

" requires a Java runtime environment (JRE) to perform
this task. The selected JRE is defective. Please select another version
or install a new JRE and select it under Tools - Options - - Java.
Please install the package for this

Also, during OpenOffice startup there's a single error message on standard output (or standard error - I didn't check that) when the path in $HOME/.openoffice.org2/user/config/javasettings_Linux_x86.xml is wrong:

javaldx failed!

After removing $HOME/.openoffice.org2/user/config/javasettings_Linux_x86.xml all the problems go away and the file gets recreated with new path to JRE on next OpenOffice startup.

Related forum thread:

They advise installing over there, and that fixed the problem for those guys.

However, in our case, apparently doesn't do its job.

I can confirm this problem. I reinstalled Hardy from scratch, but kept my home-partition with settings from gutsy. When trying to start any java-based function i got the message as printed by AleksanderAdomowski.

In the java-settings windows none of the JRE-environments where selected. Selecting one of them did not change anything. After closing and reopening the settings window, the setting was just as before (no JRE selected).

Deleting javasettings_Linux_x86.xml fixed the problem.

Just hit this issue as a result of a repo update yesterday / day before, (5/28, 5/29). The OO update notification was triggering a Partial Upgrade, but if you tried to perform, it would just err out. Packages other than OO could be updated around the issue without problem.

Tried the install from Aleksander's forum point before having to manually delete the file, and worked for me. My original install on this laptop, I believe, was Hardy beta 5, so whatever the issue is wrt the .xml file not updating, apparently it existed from as recently as that, and there's a decent chance that that recent repo update will be causing problems for those of us who upgraded from betas, rather than doing a fresh install of 8.04 final.

bronto (mmarongiu) wrote :


I can't tell if I hit an upgrade bug, since it is the first time I use the wizards, anyway here we go.

When I tried to use the Fax wizard, I got a warning dialog. The dialog recommended to configure a JRE in the settings, and to install

The package was already in place.

Configured OO to use the JRE 1.6 I had already installed. No way.
I removed JRE 1.6, installed JRE 1.5 and reconfigured OO to use it: no way. Starting OO from the command line returned a "javaldx failed" error, and nothing more.
I reinstalled no way
I installed both JRE 1.6 and 1.5 and configured it to use 1.6: no way.

At that point I tried again to run from the command line. After trying to use the fax wizard I got this error:

bronto@lotus:~$ oowriter
javaldx failed!
bronto@lotus:~$ [Java framework] could not load Java runtime library:

I didn't have any java-6-sun-, I have java-6-sun- instead.

root@lotus:/usr/lib/jvm# ln -s java-6-sun- java-6-sun-
root@lotus:/usr/lib/jvm# ls -l
total 8
lrwxrwxrwx 1 root root 23 2008-06-01 11:59 java-1.5.0-sun -> java-1.5.0-sun-
drwxr-xr-x 6 root root 4096 2008-06-01 11:59 java-1.5.0-sun-
lrwxrwxrwx 1 root root 19 2008-06-01 12:50 java-6-sun -> java-6-sun-
lrwxrwxrwx 1 root root 19 2008-06-01 12:58 java-6-sun- -> java-6-sun-
drwxr-xr-x 6 root root 4096 2008-06-01 12:50 java-6-sun-

Now it works. So, either the wrong path is hardcoded somewhere, or a setting is not being updated.

I hope this helps.


Chris Cheney (ccheney) wrote :

I believe that this bug may be corrected in hardy-proposed. Can you please try that version and see if it corrects your problem?


Chris Cheney

Changed in
status: Triaged → Incomplete

The Issue is still there after Installing the Updates from hardy-proposed. As I can see nothing has changed.

Chris Cheney (ccheney) wrote :

Well it doesn't automatically switch the java jre but it allows you to pick and will properly save the change now. If you go to Tools->Options->>Java and select the JRE you want to use then press 'OK' it will update the file. In the past even doing this would not update the file.

Changed in
assignee: nobody → ccheney
status: New → Fix Committed
Martin Pitt (pitti) wrote :

The hardy-proposed SRU was copied to intrepid some time ago.

Changed in
status: Incomplete → Fix Released
Martin Pitt (pitti) wrote :

Copied to hardy-updates.

Changed in
status: Fix Committed → Fix Released
peridot (peridot-faceted) wrote :

This just bit me. I have upgraded to hardy (via gutsy etc.) an install that was originally a Dapper Drake. I have the openoffice-java-common installed, and it is up-to-date (as are all my openoffice and Sun JRE packages). I had to delete this file to make it work. In fact, although I could select between two different JRE versions (Sun and OpenJRE) neither worked until I deleted the file.

Wayne H (wha05499) wrote :

To sum up for a fresh 8.04.1 install:
After fresh 8.04.1 install, installed ubuntu-restricted-extras which among others installed packages java-common, sun-jave6-bin, sun-java6-jre, sun-java6-plugin. Upon checking, OpenOffice has no JRE installed (Tools-options-Java), even though the box is ticked.

After installing, then restarting OpenOffice, OpenOffice now has JRE.

I think for fresh installs, the package should be added among the packages in ubuntu-restricted-extras.

Cruncher (ubuntu-wkresse) wrote :

Just had the same problem in Intrepid (incrementally upgraded regularly since Edgy),
Tools->Options->Java showed an empty box (although it might be I didn't wait long enough - apparently it takes a few seconds to show entries)
So I tried:
sudo dpkg --reconfigure
Same error message on startup. This time, after a few seconds, Tools->Options->Java showed two entries, but none of them was selected. I selected Sun Java6, restarted, and the problem was gone. 1:2.4.1-11ubuntu2.1
sun-java6-jre 6-10-0ubuntu2
sun-java5-jre 1.5.0-16-3
java-gcj-compat-headless 1.0.78-2

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

Duplicates of this bug

Other bug subscribers