MQ Explorer - Could not load SWT library
Asked Answered
Z

2

1

Installed IBM MQ 8.0.0.4 developer instance in Linux VM (Centos).

When launching MQ explorer, using command strmqcfg (getting the following error).

!ENTRY org.eclipse.osgi 4 0 2016-01-14 13:33:43.226
!MESSAGE Application error
!STACK 1
java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons:
        /home/mqm/.eclipse/com.ibm.mq.explorer.ui.rcp.RcpApplication_8.0.0.201510171407_1624510073_linux_gtk_x86_64/configuration/org.eclipse.osgi/bundles/500/1/.cp/libswt-pi-gtk-4333.so (libgtk-x11-2.0.so.0: cannot open shared object file: No such file or directory)
        swt-pi-gtk (Not found in java.library.path)
        /home/mqm/.swt/lib/linux/x86_64/libswt-pi-gtk-4333.so (libgtk-x11-2.0.so.0: cannot open shared object file: No such file or directory)
        /home/mqm/.swt/lib/linux/x86_64/libswt-pi-gtk.so (/home/mqm/.swt/lib/linux/x86_64/liblibswt-pi-gtk.so.so: cannot open shared object file: No such file or directory)

        at org.eclipse.swt.internal.Library.loadLibrary(Library.java:331)
        at org.eclipse.swt.internal.Library.loadLibrary(Library.java:240)
        at org.eclipse.swt.internal.gtk.OS.<clinit>(OS.java:31)
        at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:63)
        at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:54)
        at org.eclipse.swt.widgets.Display.<clinit>(Display.java:133)
        at org.eclipse.ui.internal.Workbench.createDisplay(Workbench.java:675)
        at org.eclipse.ui.PlatformUI.createDisplay(PlatformUI.java:162)
        at com.ibm.mq.explorer.ui.rcp.internal.base.RcpApplication.start(RcpApplication.java:88)
        at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:354)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:56)
        at java.lang.reflect.Method.invoke(Method.java:620)
        at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
        at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
        at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
        at org.eclipse.equinox.launcher.Main.main(Main.java:1426)

I see online that there is download of SWT libraries for AIX. http://www-01.ibm.com/support/docview.wss?uid=swg21631478

Is there a similar download for Linux CentOS. Appreciate any help. Is the resolution different for CentOS.

Here is machine info: java -version

java version "1.6.0_34"
OpenJDK Runtime Environment (IcedTea6 1.13.6) (rhel-1.13.6.1.el6_6-x86_64)
OpenJDK 64-Bit Server VM (build 23.25-b01, mixed mode)

dspmqver

Name:        WebSphere MQ
Version:     8.0.0.4
Level:       p800-004-151017
BuildType:   IKAP - (Production)
Platform:    WebSphere MQ for Linux (x86-64 platform)
Mode:        64-bit
O/S:         Linux 2.6.32-504.8.1.el6.x86_64
InstName:    Installation1
InstDesc:
Primary:     Yes
InstPath:    /opt/IBM/mqm
DataPath:    /var/mqm
MaxCmdLevel: 802
LicenseType: Developer
Zurkow answered 14/1, 2016 at 22:1 Comment(0)
S
4

Use yum to install these packages:

gtk2 libXtst xorg-x11-fonts-Type1

Some graphical pieces of WebSphere Application Server have the same SWT dependencies -- the way the prereqs are documented for RHEL7 is here:

http://www-01.ibm.com/support/knowledgecenter/SS7K4U_8.5.5/com.ibm.websphere.installation.nd.doc/ae/tins_linuxsetup_rhel7.html?cp=SSAW57_8.5.5&lang=en

Sunset answered 14/1, 2016 at 22:38 Comment(4)
hi, can't use yum because of restricted environment. Is there official source of download for these RPMs. Product installed is Websphere MQ (not websphere app server).Zurkow
The RPM's are available from centos.org. You'll have to resolve the dependencies manually by trial and error if you can't use the higher level tools provided with the OS.Sunset
It still doesn't load after installing the libraries following the link.Zurkow
rg.eclipse.swt.SWTError: No more handles [gtk_init_check() failed],Zurkow
C
2

Excellent answer.

I know this is an old post....but just wanted to add that the solution is still relevant today in case anyone has a similar issue. Installing gtk2 libXtst is exactly and precisely what I needed to resolve an issue with not being able to launch IIB10 Toolkit on Manjaro (kernel 5.9). For reference, the error I got prior to installing these 2 packages was:

JRE 1.8.0 Linux amd64-64-Bit Compressed References 20200724_452227 (JIT enabled, AOT enabled)
OpenJ9   - 4ce4b9d
OMR      - 08b0594
IBM      - 70917a2
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Framework arguments:  -showlocation -product com.ibm.etools.msgbroker.tooling.ide
Command-line arguments:  -os linux -ws gtk -arch x86_64 -showlocation -product com.ibm.etools.msgbroker.tooling.ide

!ENTRY org.eclipse.osgi 4 0 2021-01-10 14:21:08.900
!MESSAGE Application error
!STACK 1
java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons: 
        /home/user1/IBM/IIBT10-config/10.0.0.22/configuration/org.eclipse.osgi/1177/0/.cp/libswt-pi-gtk-4430.so (libgtk-x11-2.0.so.0: cannot open shared object file: No
 such file or directory)
        swt-pi-gtk (Not found in java.library.path)
        /home/user1/.swt/lib/linux/x86_64/libswt-pi-gtk-4430.so (libgtk-x11-2.0.so.0: cannot open shared object file: No such file or directory)
        /home/user1/.swt/lib/linux/x86_64/libswt-pi-gtk.so (/home/user1/.swt/lib/linux/x86_64/liblibswt-pi-gtk.so.so: cannot open shared object file: No such file or dir
ectory)

        at org.eclipse.swt.internal.Library.loadLibrary(Library.java:327)
        at org.eclipse.swt.internal.Library.loadLibrary(Library.java:236)
        at org.eclipse.swt.internal.gtk.OS.<clinit>(OS.java:39)
        at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:63)
        at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:54)
        at org.eclipse.swt.widgets.Display.<clinit>(Display.java:135)
        at org.eclipse.ui.internal.Workbench.createDisplay(Workbench.java:757)
        at org.eclipse.ui.PlatformUI.createDisplay(PlatformUI.java:162)
        at org.eclipse.ui.internal.ide.application.IDEApplication.createDisplay(IDEApplication.java:165)
        at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:107)
        at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:90)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
        at java.lang.reflect.Method.invoke(Method.java:508)
Croat answered 12/1, 2021 at 19:44 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.