Saturday, December 01, 2012

Getting the GlassFish 3.1.2 updatetool to work on Ubuntu/Mint 64-bit

I wrestled with the GlassFish updatetool monster for a couple of hours, and I decided to spare someone else the trouble of going through this all over again.

If you're using GlassFish 3.1.2 on a 64-bit OS, you're likely to run into a couple of bugs related to the GlassFish update tool. More likely so, if you've installed GlassFish off the ZIP bundles available at - extracting these archives do not install the updatetool utility.

The JVM crash

I ran into a segfault when running the updatetool from the commandline. Portions of the reported fault are listed below:

Proxy: Using system proxy settings.
Install image: /opt/glassfish-
Installing pkg packages.
Downloading 2 packages.
Downloading pkg (511 files, 6,237,937 bytes).
thread 140690402031360 also had an error]
# A fatal error has been detected by the Java Runtime Environment:
# SIGSEGV (0xb) at pc=0x00007ff50b573920, pid=25590, tid=140690403084032
# JRE version: 7.0_09-b05
# Java VM: Java HotSpot(TM) 64-Bit Server VM (23.5-b02 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C [] dbus_watch_handle+0x1b20
# Core dump written. Default location: /opt/glassfish- or core.25590
# An error report file with more information is saved as:
# /opt/glassfish-

Opening the pid error log showed the actual cause:

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
v ~StubRoutines::call_stub
j com.sun.pkg.client.Image.checkRepositoryConnection(Ljava/net/HttpURLConnection;)V+1
j java.util.concurrent.FutureTask$Sync.innerRun()V+29
j java.util.concurrent.ThreadPoolExecutor.runWorker(Ljava/util/concurrent/ThreadPoolExecutor$Worker;)V+46
j java.util.concurrent.ThreadPoolExecutor$
v ~StubRoutines::call_stub

This turned out to be GLASSFISH-18360. Applying the workaround listed in that report was sufficient to bypass the problem - you'll merely need to update the updatetool script to set the value of "proxy.use.system" to false. Of course, this works if you're not using a proxy.

Now, you should be able to install the updatetool utility.

The 32-bit libraries

That wasn't good enough though. Running updatetool after installation, resulted in this message:

Locale could not be determined. Attempting to use English locale.
WX import error. Verify the WX widgets are in the PYTHONPATH.
The following can be reported to GlassFish Update Tool 2.3.5 Development Team <>.

Traceback (innermost last):
File "/opt/glassfish-", line 283, in init_app_locale
import wx
File "wx/", line 45, in ?
File "wx/", line 4, in ?
ImportError: cannot open shared object file: No such file or directory

There was an error running


The weird bit about this was that the ia32-libs package required by updatetool was already installed. The problem turned out to be the use of the 64-bit version of libjpeg:

$ locate

On 64-bit Mint or Ubuntu, you'll need to explicitly install the i386 version:

sudo apt-get install libjpeg62:i386

That should do be sufficient:

$ locate

Running updatetool now should bring up the GUI.