Bug 392671

Summary: jstat tool is broken
Product: [Fedora] Fedora Reporter: Mary Ellen Foster <mefoster>
Component: java-1.7.0-icedteaAssignee: Lillian Angel <langel>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 8   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-11-22 14:52:29 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Mary Ellen Foster 2007-11-20 16:06:27 UTC
Description of problem:
Java provides a process-monitoring tool called "jstat" which seems to be broken
with IcedTea on Fedora 8. Just running jstat works, but if I try to use any
options, it produces a backtrace. Here's an example:

jstat -options
Exception in thread "main" java.lang.NullPointerException
        at sun.tools.jstat.OptionLister.print(OptionLister.java:61)
        at sun.tools.jstat.Jstat.main(Jstat.java:63)


Version-Release number of selected component (if applicable):
java-1.7.0-icedtea-1.7.0.0-0.19.b21.snapshot.fc8

How reproducible:
Every time

Steps to Reproduce:
1. jstat -options
  
Actual results:
Backtrace

Expected results:
List of options

Comment 1 Mary Ellen Foster 2007-11-20 16:50:28 UTC
p.s. -- I did a bit of poking around, and it looks like the problem is actually
in sun.tools.jstat.Arguments.optionsSources() -- I suspect that maybe the second
value being put into that array is actually null (despite the assert check about
it). What happens to this.getClass().getResource(whatever) when you compile
something to an executable? It's trying to get a resource out of a jar file but
it's not being run from a jar file ...

Comment 2 Lillian Angel 2007-11-22 14:52:29 UTC
This is fixed in b23, which is now in rawhide:

Name   : java-1.7.0-icedtea
Arch   : i586
Version: 1.7.0.0
Release: 0.20.b23.snapshot.fc9
Repo   : development

jstat -options
-class
-compiler
-gc
-gccapacity
-gccause
-gcnew
-gcnewcapacity
-gcold
-gcoldcapacity
-gcpermcapacity
-gcutil
-printcompilation

Closing bug report.