[SRU] VisualVM does not start with openjdk 7

Bug #937710 reported by Martin Weißhaupt
20
This bug affects 2 people
Affects Status Importance Assigned to Milestone
visualvm (Ubuntu)
Fix Released
Undecided
Aditya V
Precise
Fix Released
Undecided
Unassigned

Bug Description

SRU Request for precise

#### SRU Justification ###

[Impact]
jvisualvm is currently unable to start in Precise when using OpenJDK 7.

[Development Fix]
Fixed in lp:~kroq-gar78/ubuntu/precise/visualvm/fix-start revno 16 (http://bazaar.launchpad.net/~kroq-gar78/ubuntu/precise/visualvm/fix-start/revision/16) along with bug 1004370 (they are _very_ similar in nature) by adding a 'java-7-openjdk-$ARCH' path, where $ARCH=`dpkg --print-architecture`. Because I fixed it in conjunction with bug 1004370, I also added "-$ARCH" to the end of the 'java-6-openjdk' path.

[Stable Fix]
To do this after the package has been installed, edit the file /usr/bin/jvisualvm and include the same fix, following this diff:

@@ -8,9 +8,10 @@
 progdir=/usr/bin
 APPNAME=visualvm
 BASEDIR=/usr/lib/visualvm
+ARCH=`dpkg --print-architecture`

 jdkhome=
-for j in /usr/lib/jvm/java-6-openjdk /usr/lib/jvm/java-6-sun; do
+for j in /usr/lib/jvm/java-6-openjdk /usr/lib/jvm/java-6-sun /usr/lib/jvm/java-7-openjdk-$ARCH; do
     if [ -x $j/bin/javac ]; then
  jdkhome=$j
  break

Since /usr/bin/jvisualvm is the same file as debian/jvisualvm in the package source, the file can be edited exactly as it was edited in the Bazaar branch above.

[Test Case]
1) Install the package 'visualvm'
2) Make sure openjdk-6-jre nor openjdk-6-jdk are installed
3) Run 'jvisualvm' from a terminal

With the version in Precise, it will error out with:
No jdkhome found.

[Regression Potential]
The potential for regression is extremely low because running the program isn't currently possible with OpenJDK 7.

#######

visualvm 1.3.2-0ubuntu2 running on Ubuntu 12.04 LTS.

Related branches

Revision history for this message
Martin Weißhaupt (mweisshaupt) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in visualvm (Ubuntu):
status: New → Confirmed
Revision history for this message
Aditya V (kroq-gar78) wrote :

I'll fix this along with bug 1004370. However, I have one question - should it default to openjdk 6 or 7? For now, I'll set it to default to openjdk 6.

Changed in visualvm (Ubuntu):
assignee: nobody → kroq-gar78 (kroq-gar78)
status: Confirmed → In Progress
Aditya V (kroq-gar78)
summary: - VisualVM does not start with openjdk 7
+ [SRU] VisualVM does not start with openjdk 7
description: updated
Aditya V (kroq-gar78)
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package visualvm - 1.3.2-0ubuntu3

---------------
visualvm (1.3.2-0ubuntu3) quantal; urgency=low

  * debian/jvisualvm.sh:
    - look for OpenJDK 7 files also (LP: #937710)
    - use multiarch-friendly paths for OpenJDK (LP: #1004370)
 -- Aditya Vaidya <email address hidden> Sun, 27 May 2012 00:02:57 -0500

Changed in visualvm (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Aditya V (kroq-gar78) wrote :

Agh now it looks like this bug was fixed. It's not in Precise! Can someone please nominate this bug for Precise? Thanks.

Revision history for this message
Stefano Rivera (stefanor) wrote :

Uploaded to precise-proposed, pending SRU team review

Changed in visualvm (Ubuntu Precise):
status: New → Fix Committed
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Martin, or anyone else affected,

Accepted visualvm into precise-proposed. The package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

tags: added: verification-needed
Revision history for this message
Martin Weißhaupt (mweisshaupt) wrote :

Hello Brian,

sorry, the notification mail must have been caught by my spam guard :D

I just testet visualvm on Ubuntu 12.04 and after this fix it does work again.

Thank you.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Scott Kitterman (kitterman) wrote :

Copied to -updates.

Changed in visualvm (Ubuntu Precise):
status: Fix Committed → Fix Released
Revision history for this message
Paul Dumais (paul-unstate) wrote :

I have enabled proposed and I still only get 1.3.2-0ubuntu2.1. Has it been removed from proposed? I see it in Quantal. Is there a backport for this?

Revision history for this message
Scott Kitterman (kitterman) wrote :

visualvm | 1.3.2-0ubuntu2.1 | precise-updates/universe | source, amd64, armel, armhf, i386, powerpc

0ubuntu2.1 is the version with the fix. It was already copied to updates.

Revision history for this message
Paul Dumais (paul-unstate) wrote :

Well, I still get the bug. It's odd. jdkhome is being set correctly, however I still get a pop-up saying:

Error Starting VisualVM

You are running VisualVM using Java Runtime Environment (JRE).

Please use...
...
Location /usr/lib/java-6-openjdk-amd64/jre

Revision history for this message
Paul Dumais (paul-unstate) wrote :

Ok, here's the source my bug:
. "$BASEDIR/etc/$APPNAME".conf

This conf file sets jdkhome to the my java-6-openjdk-amd64/jre. When does this conf file get created? Is this a bug? Anyway, probably the package installer should have promted me to replace this old conf file with a new one.

Revision history for this message
Stefano Rivera (stefanor) wrote :

What is "this conf file" ?

Revision history for this message
Paul Dumais (paul-unstate) wrote :

It's the one references in the jvisualvm bash shell script. Does your version not refer to it? See the line:

. "$BASEDIR/etc/$APPNAME".conf as I previously mentioned. Which resolves to /usr/lib/visualvm/etc/visualvm.conf.
It's line 25 of my /usr/bin/jvisualvm.

The offending line in the conf file is line 11:
jdkhome="/usr/lib/jvm/java-6-openjdk-amd64"

This of course overrides the previous setting of jdkhome in the jvisualvm shell script.

I wonder why my systems seem different than everyone else's? I have two computers running ubuntu 12.04 and they both have this problem. I just installed visualvm for the first time on the second computer only seconds ago.

java version "1.7.0_03"
OpenJDK Runtime Environment (IcedTea7 2.1.1pre) (7~u3-2.1.1~pre1-1ubuntu3)
OpenJDK 64-Bit Server VM (build 22.0-b10, mixed mode)

Cheers,

Paul

Revision history for this message
Shelby Cain (alyandon) wrote :

Same problem as Paul here. Clean install with the openjdk-7-jdk and visualvm packages and the jdkhome setting is overridden by the package installed /etc/visualvm/visualvm.conf to:
jdkhome="/usr/lib/jvm/java-6-openjdk-amd64"

Commenting out the offending line fixes the problem.

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

Other bug subscribers

Remote bug watches

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