mardi 3 mai 2011

Getting Soapui working with Ubuntu 11.04 with libgthread-2.0 !

Hi all!

If you tried runnning soapui 3.6.1 for linux under Ubuntu 11.04, the UI might freeze with the following error:

 [XpcMessageLoop] DEBUG com.jniwrapper.DefaultLibraryLoader - Finding library in JARs...
Exception in thread "XpcMessageLoop" java.lang.RuntimeException: java.io.FileNotFoundException: Library libgthread-2.0 not found at any known locations !
    at com.jniwrapper.linux.utils.LinuxLibraryLoader.(LinuxLibraryLoader.java:90)
    at com.jniwrapper.gdk.GdkMultithreading.(GdkMultithreading.java:48)
    at com.jniwrapper.gdk.GdkMultithreading.getInstance(GdkMultithreading.java:35)
    at com.jniwrapper.gtk.GTK.initialize(GTK.java:97)
    at com.teamdev.xpcom.a.a.a.a.(Unknown Source)
    at com.teamdev.xpcom.XpcMessageLoop.(Unknown Source)
    at com.teamdev.xpcom.XpcMessageLoop.getInstance(Unknown Source)
    at com.teamdev.xpcom.b$b.run(Unknown Source)
Caused by: java.io.FileNotFoundException: Library libgthread-2.0 not found at any known locations !
    ... 8 more


Under Ubuntu 11.04 libgthread-2.0 doesn't seems to be present anymore, but libgthread-3.0 is supposed to replace it.
Unfortunalty, soapui doesn't have yet been updated to be used under this last ubuntu version and its last graphical libraries.

To by pass this issue one dirty solution would be:
  1. Dowload libgthread-2.0 debian package used under Ubuntu 10.10 at:  http://91.189.94.219/natty/i386/libglib2.0-0/download
  2. The package installer would not allow you to install it because a more recent version is available on your distro. To resolve this, extract the deb archive and copy theses 2 files with root priviledges under /usr/lib/ :
     - libglib2.0-0_2.28.6-0ubuntu1_i386/usr/lib/i386-linux-gnu/libgthread-2.0.so.0
      - libglib2.0-0_2.28.6-0ubuntu1_i386/usr/lib/i386-linux-gnu/libgthread-2.0.so.0.2800.6 
 
If necessary you'll have to do update your database:
sudo updatedb

Then soapui 3.6.1 should start without freezing at all and wihtout the boggus error message above.
Of course, if you have better suggestion, please let me know!
Cheers!

14 commentaires:

Thiago a dit…

Hey Hiro! Thanks for your tip, I had the same problem over here and it worked, but know when I try to import a soapUI XML project the window closes and this error is shown: Caused by: java.io.FileNotFoundException: Library libgobject-2.0 not found at any known locations !
... 16 more
The program '' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadWindow (invalid Window parameter)'.
(Details: serial 2288 error_code 3 request_code 20 minor_code 0)
(Note to programmers: normally, X errors are reported asynchronously;
that is, you will receive the error a while after causing it.
To debug your program, run it with the --sync command line
option to change this behavior. You can then get a meaningful
backtrace from your debugger if you break on the gdk_x_error() function.)

Does this functionality work for you?

Thanks!

Hironori a dit…

Hi Thiago,

I tried importing an XML project but it works fine for me...(with the ones given in the Tutorials folder)
Are you sure you are using an official java jdk to run soapUI?(1.6 in my case)
By default, sometime it uses the openjdk in Ubuntu and this might result in error with soapUI.
You can chek your java version with this command: java -version

To point your soapUI script (bin/sopaui.sh)to your jdk 1.6, edit it and change the last line.

$JAVA $JAVA_OPTS -cp $SOAPUI_CLASSPATH com.eviware.soapui.SoapUI "$@"

where $JAVA points to your official JRE or JDK binairie.

Regards,

Thiago a dit…

Hello Hiro,

I was able to fix the issue. All I did was copy some extra files to /usr/lib directory from libglib-2.0 debian package. Besides the files you described in your post I had to do the same for these ones:
- libglib2.0-0_2.28.6-0ubuntu1_i386/usr/lib/i386-linux-gnu/libgmodule-2.0.so.0
- libglib2.0-0_2.28.6-0ubuntu1_i386/usr/lib/i386-linux-gnu/libgmodule-2.0.so.0.2800.6
- libglib2.0-0_2.28.6-0ubuntu1_i386/usr/lib/i386-linux-gnu/libgobject-2.0.so.0
- libglib2.0-0_2.28.6-0ubuntu1_i386/usr/lib/i386-linux-gnu/libgobject-2.0.so.0.2800.6

Maybe you just already had these files in your /usr/lib directory due to another thing you did. Anyway, the problem was solved! Although if I find a not so dirty solution to this problem I'll let you know.
Thanks, Hiro! Your little tutorial was very helpful!

Regards.

Anonyme a dit…

Open the soapui-pro.sh script and removed the commented out line for this line: " JAVA_OPTS="$JAVA_OPTS -Dsoapui.jxbrowser.disable=true"

You should be fine now.

Anonyme a dit…

Remove comment from that line works!

Hironori a dit…

Indeed, removing in bin/sopaui.sh the "#" on line JAVA_OPTS="$JAVA_OPTS -Dsoapui.jxbrowser.disable=true" seems to work perfectly!

Then maybe it is not necessary to install libgthread-2.0 libraries into /usr/lib like I described before.

Can someone confirm?

Thanks for your help guys!
Cheers!

Anonyme a dit…

Hi, I can confirm that
modifying bin/sopaui.sh works without copying libgthread files.

Nice!
/david

Anonyme a dit…

In my case I found all necessary libraries in the system:

/usr/lib/i386-linux-gnu/libX11.so.6.3.0
/usr/lib/i386-linux-gnu/libgobject-2.0.so.0.2800.6
/usr/lib/i386-linux-gnu/libgthread-2.0.so.0.2800.6
/usr/lib/i386-linux-gnu/libgmodule-2.0.so.0.2800.6

So placing symbolic links in /usr/lib/ of these libraries helped SoapUI to start without issues.

Anonyme a dit…

very useful..nice.it works fine

Anonyme a dit…

Thanks for sharing your findings which lead us toward a sustainable fix ;)

Anonyme a dit…

Fix confirmed: removing the '#' on the line mentioned above solves the issue.
Thanks a million!

JN Testing a dit…

Hi all,

thanks a lot for your comments, in my case after including the libraries in the /usr/lib did work but not completely, because I was having problems opening steps. In the end after uncommenting the JAVA_OPTS="$JAVA_OPTS -Dsoapui.jxbrowser.disable=true" it worked perfectly.

Regards,
Jonathan.

Anonyme a dit…

Thank you for the helpful post. I tried using the libglib-2.0 suggestion, but it still didn't work. Uncommenting the browser component line fixed it for me as well.

Anonyme a dit…

simple

inside
soapui.sh

put
-Dsoapui.jxbrowser.disable=true

in
JAVA_OPTS