Bug 404331 - s-s-java is unable to deal with a broken java path
s-s-java is unable to deal with a broken java path
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: system-switch-java (Show other bugs)
5.1
noarch Linux
urgent Severity urgent
: rc
: ---
Assigned To: Rodney Russ
: ZStream
Depends On:
Blocks: 442465
  Show dependency treegraph
 
Reported: 2007-11-29 07:46 EST by Radek Bíba
Modified: 2013-10-02 08:02 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-10-02 08:02:01 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Radek Bíba 2007-11-29 07:46:01 EST
Description of problem:
I noticed my java configuration was broken - /usr/bin/java was pointing to 
/etc/alternatives/java but that was a broken symlink (to
/usr/lib/jvm/jre-1.5.0-ibm.x86_64/bin/java, but this file didn't exist). So I
ran system-switch-java with a hope that it would help me fix the setup, but it
failed:

# system-switch-java
Traceback (most recent call last):
  File "/usr/sbin/system-switch-java", line 89, in ?
    main()
  File "/usr/sbin/system-switch-java", line 70, in main
    default_java_command = JAVA[best_alternative]
KeyError: '1.5.0-ibm.x86_64'

Version-Release number of selected component (if applicable):
system-switch-java-1.1.0-2.el5

How reproducible:
Always

Steps to Reproduce:
1. install a JVM which uses the alternatives system
2. break the path to the java executable
3. run system-switch-java
  
Actual results:
It fails to launch.

Expected results:
It at least detects the error and either says displays a helpful error message,
skipping the broken JVM.
Comment 1 Radek Bíba 2007-11-29 07:48:57 EST
s/either says // - I thought I would list two options but then I couldn't think
of anything else and forgot to fix the sentence. Sorry about any confusion.
Comment 2 Thomas Fitzsimmons 2008-04-14 17:46:32 EDT
This is fixed in system-switch-java 1.1.2.  It will be fixed when 1.1.2 is
backported to RHEL-5.  See:

https://bugzilla.redhat.com/show_bug.cgi?id=442399
Comment 6 Thomas Fitzsimmons 2008-04-15 14:03:41 EDT
system-switch-java-1.1.2-1.el5_1 built in RHEL-5.1-Z-candidate.

Note You need to log in before you can comment on or make changes to this bug.