You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@jmeter.apache.org by bu...@apache.org on 2017/09/04 11:07:12 UTC

[Bug 61486] New: Unnecessary AWT dependency of JSR223 scripting

https://bz.apache.org/bugzilla/show_bug.cgi?id=61486

            Bug ID: 61486
           Summary: Unnecessary AWT dependency of JSR223 scripting
           Product: JMeter
           Version: 3.2
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Main
          Assignee: issues@jmeter.apache.org
          Reporter: duanyao@ustc.edu
  Target Milestone: ---

When I ran a JMeter test with JSR223 scripts on a Linux server without X (and
Xlib), it failed:

2017-09-04 13:01:56,654 ERROR o.a.j.JMeter: Uncaught exception: 
java.lang.UnsatisfiedLinkError: /jdk/lib/libawt_xawt.so: Error loading shared
library libXext.so.6: No such file or directory (needed by
/jdk/lib/libawt_xawt.so)
        at java.lang.ClassLoader$NativeLibrary.load(Native Method) ~[?:?]
        at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:2614) ~[?:?]
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:2499) ~[?:?]
        at java.lang.Runtime.load0(Runtime.java:812) ~[?:?]
        at java.lang.System.load(System.java:1821) ~[?:?]
        at java.lang.ClassLoader$NativeLibrary.load(Native Method) ~[?:?]
        at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:2614) ~[?:?]
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:2520) ~[?:?]
        at java.lang.Runtime.loadLibrary0(Runtime.java:873) ~[?:?]
        at java.lang.System.loadLibrary(System.java:1857) ~[?:?]
        at java.awt.Toolkit$3.run(Toolkit.java:1358) ~[?:?]
        at java.awt.Toolkit$3.run(Toolkit.java:1356) ~[?:?]
        at java.security.AccessController.doPrivileged(Native Method) ~[?:?]
        at java.awt.Toolkit.loadLibraries(Toolkit.java:1355) ~[?:?]
        at java.awt.Toolkit.<clinit>(Toolkit.java:1388) ~[?:?]
        at java.awt.Component.<clinit>(Component.java:590) ~[?:?]
        at
org.apache.jmeter.testbeans.BeanInfoSupport.createPropertyGroup(BeanInfoSupport.java:255)
~[ApacheJMeter_core.jar:3.2 r1790748]
        at
org.apache.jmeter.util.ScriptingBeanInfoSupport.<init>(ScriptingBeanInfoSupport.java:64)
~[ApacheJMeter_core.jar:3.2 r1790748]
        at
org.apache.jmeter.util.JSR223BeanInfoSupport.<init>(JSR223BeanInfoSupport.java:87)
~[ApacheJMeter_core.jar:3.2 r1790748]
        at
org.apache.jmeter.assertions.JSR223AssertionBeanInfo.<init>(JSR223AssertionBeanInfo.java:26)
~[ApacheJMeter_components.jar:3.2 r1790748]
        at
jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
~[?:?]
        at
jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
~[?:?]
        at
jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
~[?:?]
        at java.lang.reflect.Constructor.newInstance(Constructor.java:488)
~[?:?]
        at java.lang.Class.newInstance(Class.java:558) ~[?:?]
        at
com.sun.beans.finder.InstanceFinder.instantiate(InstanceFinder.java:98) ~[?:?]
        at com.sun.beans.finder.InstanceFinder.find(InstanceFinder.java:66)
~[?:?]
        at java.beans.Introspector.findExplicitBeanInfo(Introspector.java:484)
~[?:?]
        at java.beans.Introspector.<init>(Introspector.java:434) ~[?:?]
        at java.beans.Introspector.getBeanInfo(Introspector.java:205) ~[?:?]
        at
org.apache.jmeter.testbeans.TestBeanHelper.prepare(TestBeanHelper.java:66)
~[ApacheJMeter_core.jar:3.2 r1790748]
        at
org.apache.jmeter.engine.StandardJMeterEngine.notifyTestListenersOfStart(StandardJMeterEngine.java:215)
~[ApacheJMeter_core.jar:3.2 r1790748]
        at
org.apache.jmeter.engine.StandardJMeterEngine.run(StandardJMeterEngine.java:388)
~[ApacheJMeter_core.jar:3.2 r1790748]
        at java.lang.Thread.run(Thread.java:844) [?:?]

I think scripting should not depend on AWT and Xlib.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 61486] Make jmeter-server and non GUI mode run headless

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61486

Philippe Mouawad <p....@ubik-ingenierie.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
                 CC|                            |p.mouawad@ubik-ingenierie.c
                   |                            |om
             Status|NEW                         |RESOLVED

--- Comment #9 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
Author: pmouawad
Date: Sun Jan  6 14:47:32 2019
New Revision: 1850562

URL: http://svn.apache.org/viewvc?rev=1850562&view=rev
Log:
Bug 61486 - Make jmeter-server and non GUI mode run headless
Bugzilla Id: 61486

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/JMeter.java
    jmeter/trunk/src/core/org/apache/jmeter/NewDriver.java
    jmeter/trunk/xdocs/changes.xml

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 61486] Unnecessary AWT dependency of JSR223 scripting

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61486

Duan, Yao <du...@ustc.edu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |NEW

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 61486] Make jmeter-server and non GUI mode run headless

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61486

Philippe Mouawad <p....@ubik-ingenierie.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|3.2                         |2.13
           Keywords|                            |FixedInTrunk
   Target Milestone|---                         |JMETER_5.1

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 61486] Unnecessary AWT dependency of JSR223 scripting

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61486

--- Comment #4 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
Hi team,
Any Linux user could validate this ?

Thanks

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 61486] Make jmeter-server and non GUI mode run headless

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61486

--- Comment #11 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
Author: pmouawad
Date: Sun Jan  6 18:25:51 2019
New Revision: 1850583

URL: http://svn.apache.org/viewvc?rev=1850583&view=rev
Log:
Bug 61486 - Make jmeter-server and non GUI mode run headless
-g is non gui mode also
Bugzilla Id: 61486

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/NewDriver.java

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 61486] Unnecessary AWT dependency of JSR223 scripting

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61486

Philippe Mouawad <p....@ubik-ingenierie.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO

--- Comment #3 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
Did you try running JMeter by adding this option :
-Djava.awt.headless=true

Thanks

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 61486] Unnecessary AWT dependency of JSR223 scripting

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61486

--- Comment #5 from Milamber <mi...@apache.org> ---

I don't have this issue on a Debian 9 without libxext packages. JMeter in
non-gui mode works fine.

root@vm-test2:~/apache-jmeter-3.2/bin# java -version
java version "1.8.0_144"
[...]

root@vm-test2:~/apache-jmeter-3.2/bin# ./jmeter -n -t
./examples/PerformanceTestPlanMemoryThread.jmx 
Creating summariser <summary>
Created the tree successfully using
./examples/PerformanceTestPlanMemoryThread.jmx
Starting the test @ Sat Sep 16 12:50:43 WEST 2017 (1505562643751)
[...]


Can you indicate the Linux distro ? version ?
Java version too ?

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 61486] Make jmeter-server and non GUI mode run headless

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61486

Philippe Mouawad <p....@ubik-ingenierie.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |macaleese.1@gmail.com

--- Comment #12 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
*** Bug 63091 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 61486] Unnecessary AWT dependency of JSR223 scripting

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61486

--- Comment #7 from Milamber <mi...@apache.org> ---

My Java version is :
$ java -version
java version "1.8.0_144"
Java(TM) SE Runtime Environment (build 1.8.0_144-b01)
Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode)

Directly downloaded from Oracle.com



Currently JMeter <=3.3 was not officially supported. Please use Java 8 from
Oracle.


add headless=true when we use the -n option (or jmeter-server) seems a good
idea, Philippe.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 61486] Make jmeter-server and non GUI mode run headless

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61486

Philippe Mouawad <p....@ubik-ingenierie.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Unnecessary AWT dependency  |Make jmeter-server and non
                   |of JSR223 scripting         |GUI mode run headless
                 OS|Linux                       |All
           Severity|normal                      |enhancement

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 61486] Unnecessary AWT dependency of JSR223 scripting

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61486

--- Comment #2 from Duan, Yao <du...@ustc.edu> ---
libXext provides an X Window System client interface to several extensions to
the X protocol. See https://packages.debian.org/stretch/libxext6

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 61486] Unnecessary AWT dependency of JSR223 scripting

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61486

--- Comment #8 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
(In reply to Milamber from comment #7)
> My Java version is :
> $ java -version
> java version "1.8.0_144"
> Java(TM) SE Runtime Environment (build 1.8.0_144-b01)
> Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode)
> 
> Directly downloaded from Oracle.com
> 
> 
> 
> Currently JMeter <=3.3 was not officially supported. Please use Java 8 from
> Oracle.
> 
> 
> add headless=true when we use the -n option (or jmeter-server) seems a good
> idea, Philippe.

Yes feasible for jmeter-server but for jmeter with -n, it can only be in
documentation.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 61486] Make jmeter-server and non GUI mode run headless

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61486

Philippe Mouawad <p....@ubik-ingenierie.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Hardware|PC                          |All

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 61486] Make jmeter-server and non GUI mode run headless

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61486

--- Comment #10 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
Hello,
Anybody in the problematic configuration could test nightly build or last build
after r1850562

Thanks
Regards

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 61486] Unnecessary AWT dependency of JSR223 scripting

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61486

Duan, Yao <du...@ustc.edu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |NEW

--- Comment #6 from Duan, Yao <du...@ustc.edu> ---
Hi Philippe Mouawad,
I just tried -Djava.awt.headless=true , and it did the trick. Thanks!
Maybe it's better to set java.awt.headless=true automatically when -n argument
is passed to jmeter?

Hi Milamber,
My Linux distro is Alpine Linux 3.6.2 x86_64, and Java version is
serverjre-9-ea+181, which can be downloaded from:

http://jdk.java.net/9/
http://download.java.net/java/jdk9-alpine/archive/181/binaries/serverjre-9-ea+181_linux-x64-musl_bin.tar.gz

I guess your Java package on Debian is "openjdk-xxx-headless"? It seems it run
in headless mode automatically.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 61486] Unnecessary AWT dependency of JSR223 scripting

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61486

Philippe Mouawad <p....@ubik-ingenierie.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |p.mouawad@ubik-ingenierie.c
                   |                            |om
             Status|NEW                         |NEEDINFO

--- Comment #1 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
Can you check those links, I am not sure it's related to X :
https://askubuntu.com/questions/674579/libawt-xawt-so-libxext-so-6-cannot-open-shared-object-file-no-such-file-or-di
https://stackoverflow.com/questions/17355863/cant-find-install-libxtst-so-6

-- 
You are receiving this mail because:
You are the assignee for the bug.