Forum Discussion

mkelderm's avatar
mkelderm
Occasional Contributor
13 years ago

Linux: LoadUI 2.5.4, JavaFX 2.1.0 required (3 questions)

I have installed LoadUI 2.5.4 on our linux server. I am I have a few questions:

1) When I start the loadUI-cmd.sh script it need to connect to a X11 display. Why? Can I start this awt-headless?

2) When I set the Display variable (to my latop with XMing), it shows a window with the message "JavaFX 2.1.0 is required to view this content but JavaFX. Get the JavaFX runtime from java.com/javafx and run the installer. Then restart the application." Note: this was started with JDK 1.6.0_46

3) When I use the default jre/bin/java from the Loadui installation I get, the message:

Prism ES2 Error - nInitialize: glXChooseFBConfig failed
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.javafx.main.Main.launchApp(Main.java:502)
at com.javafx.main.Main.main(Main.java:638)
Caused by: java.lang.RuntimeException: java.lang.UnsatisfiedLinkError: /opt/loadUI-2.5.4/jre/lib/i386/libglass.so: libgio-2.0.so.0: cannot open shared object file: No such file or directory
at com.sun.javafx.tk.quantum.QuantumToolkit.startup(QuantumToolkit.java:281)
at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:124)
at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:163)
at com.sun.javafx.application.LauncherImpl.access$000(LauncherImpl.java:47)
at com.sun.javafx.application.LauncherImpl$1.run(LauncherImpl.java:115)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.UnsatisfiedLinkError: /opt/loadUI-2.5.4/jre/lib/i386/libglass.so: libgio-2.0.so.0: cannot open shared object file: No such file or directory

3 Replies

  • mkelderm's avatar
    mkelderm
    Occasional Contributor
    Another try; java.awt.headless=true and unset DISPLAY variable:

    $ sh -x ./loadUI-cmd.sh  -p /misc/tact/users/mk01232/MKELoadTest.xml -nofx -l -F PDF -s -r /tmp
    ++ dirname ./loadUI-cmd.sh
    + DIRNAME=.
    + cygwin=false
    + case "`uname`" in
    ++ uname
    + '[' x = x ']'
    ++ cd ./
    ++ pwd
    + LOADUI_HOME=/opt/loadUI-2.5.4
    + export LOADUI_HOME
    + LOADUI_CLASSPATH='/opt/loadUI-2.5.4:/opt/loadUI-2.5.4/lib/*'
    + false
    + JAVA=/opt/jdk1.6.0_43/bin/java
    + unset DISPLAY
    + JAVA_OPTS='-Xms128m -Xmx768m -XX:MaxPermSize=128m -Djava.awt.headless=true'
    + /opt/jdk1.6.0_43/bin/java -Xms128m -Xmx768m -XX:MaxPermSize=128m -Djava.awt.headless=true -cp '/opt/loadUI-2.5.4:/opt/loadUI-2.5.4/lib/*' com.javafx.main.Main --cmd=true --nofx=true -nofx -Dlog4j.configuration=log4j_headless.xml -p /misc/tact/users/mk01232/MKELoadTest.xml -nofx -l -F PDF -s -r /tmp
    Exception in thread "AWT-EventQueue-0" java.awt.HeadlessException
    at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:159)
    at java.awt.Window.<init>(Window.java:433)
    at java.awt.Frame.<init>(Frame.java:403)
    at javax.swing.JFrame.<init>(JFrame.java:202)
    at com.javafx.main.Main$1.run(Main.java:648)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:672)
    at java.awt.EventQueue.access$400(EventQueue.java:81)
    at java.awt.EventQueue$2.run(EventQueue.java:633)
    at java.awt.EventQueue$2.run(EventQueue.java:631)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:642)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)


    What is wrong?
  • It's like this, JavaFX2 is suboptimal when it comes to Linux today. Hopefully it will get better with time and Java8 in [Insert Oracle Releasedate here]

    1. JavaFX does not like to run well in a headless environment yet, even though it is through command-line.
    It seems that it performs checks with the OS long before even thinking of starting a Stage whether there is a screen to render it on.
    Oracle has a ticket for it somewhere in their javafx-jira and i remember they had already fixed the problem but are awaiting to release it until Java8.
    Nobody wants to wait until then, so you can circumvent the problem by installing Xvfb with Friends similarly to how you need to launch LoadUI Agents today.
    http://www.soapui.org/forum/viewtopic.php?f=22&t=18878

    2. Either use the jre that is bundled with LoadUI or the systems jre as long as it is more recent than 1.7_12. Below that version strange things seem to start happening. 1.6 does not even come bundled with JavaFX2, so you will have to install it manually.

    3. libgio is another problem, this one depends on what distro you are running and how old it is. Install the below and it should bring libgio-2.0.so along with it.
    In debian: apt-get install libglib2.0-dev
    In RHEL/Fedora/Centos: yum install glib2-devel

    It should be pretty straightforward, but if you run into problems just ask here and i'll try to answer when there is time.

    Best regards,
    Mikael
    LoadUI Team
  • Hello,

    3. libgio is another problem, this one depends on what distro you are running and how old it is. Install the below and it should bring libgio-2.0.so along with it.
    In debian: apt-get install libglib2.0-dev
    In RHEL/Fedora/Centos: yum install glib2-devel


    I try to launch loadUI-agent.sh on RHEL 5.5 64
    I get the libgio-2.0.so error, saw this topic and installed glib2-devel 2.12.3

    But I still get this error :


    [root@pro-int-web01 LoadUI-Agent-2.5.4]# ./loadUI-agent.sh
    Prism ES2 Error - nInitialize: glXChooseFBConfig failed
    java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at com.javafx.main.Main.launchApp(Main.java:502)
    at com.javafx.main.Main.main(Main.java:638)
    Caused by: java.lang.RuntimeException: java.lang.UnsatisfiedLinkError: /appli/home/logica/SmartBear/LoadUI-Agent-2.5.4/jre/lib/amd64/libglass.so: libgio-2.0.so.0: cannot open shared object file: No such file or directory


    What can I do ?