Java broken in openoffice hardy upgrades

Bug #222803 reported by Youssef
26
Affects Status Importance Assigned to Milestone
openoffice.org (Ubuntu)
Fix Released
High
Unassigned
Hardy
Fix Released
Undecided
Chris Cheney

Bug Description

Binary package hint: openoffice.org

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.

Revision history for this message
Youssef (that-y-guy) wrote :
description: updated
Revision history for this message
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.

Revision history for this message
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

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

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

Thanks,

Chris

Changed in openoffice.org:
status: New → Incomplete
Revision history for this message
Youssef (that-y-guy) wrote :

well i have openoffice.org-java-common 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.

Revision history for this message
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

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

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

Chris

Revision history for this message
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

Revision history for this message
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 openoffice.org:
status: Incomplete → New
Revision history for this message
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 ( 1.6.0.3 on the old one, 1.6.0.6 on the correct one that is attached )

Revision history for this message
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.

Revision history for this message
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 Openoffice.org and going to "Tools - Options - Openoffice.org - 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.

Revision history for this message
Rolf Leggewie (r0lf) wrote :
Changed in openoffice.org:
importance: Undecided → High
status: New → Triaged
Revision history for this message
AleksanderAdamowski (aadamowski) wrote :

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:

"OpenOffice.org 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 -
OpenOffice.org - Java.
Please install the openoffice.org-java-common package for this
functionality."

Revision history for this message
AleksanderAdamowski (aadamowski) wrote :

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.

Revision history for this message
AleksanderAdamowski (aadamowski) wrote :

Related forum thread:
http://ubuntuforums.org/showthread.php?t=678751&page=3

They advise installing openoffice.org-java-common over there, and that fixed the problem for those guys.

However, in our case, openoffice.org-java-common apparently doesn't do its job.

Revision history for this message
Jørgen Kristoffersen (jorgekri) wrote :

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.

Revision history for this message
Dylan Hunter (dylan-dylanhunter) wrote :

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 openoffice.org-java-common 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.

Revision history for this message
bronto (mmarongiu) wrote :

Hello

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 openoffice.org-java-common.

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 openoffice.org-java-common: 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]sunjavaplugin.so could not load Java runtime library:
file:///usr/lib/jvm/java-6-sun-1.6.0.03/jre/lib/i386/client/libjvm.so.
bronto@lotus:~$

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

root@lotus:/usr/lib/jvm# ln -s java-6-sun-1.6.0.06 java-6-sun-1.6.0.03
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-1.5.0.15
drwxr-xr-x 6 root root 4096 2008-06-01 11:59 java-1.5.0-sun-1.5.0.15
lrwxrwxrwx 1 root root 19 2008-06-01 12:50 java-6-sun -> java-6-sun-1.6.0.06
lrwxrwxrwx 1 root root 19 2008-06-01 12:58 java-6-sun-1.6.0.03 -> java-6-sun-1.6.0.06
drwxr-xr-x 6 root root 4096 2008-06-01 12:50 java-6-sun-1.6.0.06

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

I hope this helps.

Ciao
--bronto

Revision history for this message
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?

Thanks,

Chris Cheney

Changed in openoffice.org:
status: Triaged → Incomplete
Revision history for this message
Emanuel Goscinski (emu--deactivatedaccount) wrote :

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

Revision history for this message
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->OpenOffice.org->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 openoffice.org:
assignee: nobody → ccheney
status: New → Fix Committed
Revision history for this message
Martin Pitt (pitti) wrote :

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

Changed in openoffice.org:
status: Incomplete → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote :

Copied to hardy-updates.

Changed in openoffice.org:
status: Fix Committed → Fix Released
Revision history for this message
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.

Revision history for this message
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 openoffice.org-java-common, then restarting OpenOffice, OpenOffice now has JRE.

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

Revision history for this message
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 openoffice.org-java-common
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.

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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