Jmeter failed to run from unit tests
Closed this issue · 4 comments
GoogleCodeExporter commented
When I run a JMeter instance on a unit test I get theses errors and Jmeter fail
to run.
I execute JMeter using this commend line, theses options are the default JMeter
options
{{{
java -XX:+HeapDumpOnOutOfMemoryError -Xms512m -Xmx512m -XX:NewSize=128m
-XX:MaxNewSize=128m -XX:MaxTenuringThreshold=2 -XX:PermSize=64m
-Dsun.rmi.dgc.client.gcInterval=600000 -Dsun.rmi.dgc.server.gcInterval=600000
-server -XX:MaxPermSize=128m -jar
/tmp/ut_JmeterTest/lib/jmeter/bin/ApacheJMeter.jar --nongui --testfile
sample.jmx -Ljmeter=WARN -Ljmeter.junit=WARN -Ljmeter.testbeans=INFO
-Ljmeter.testelement=WARN -Ljmeter.jorphan=WARN
-Ljmeter.util.BeanShellTestElement=INFO
-Ljmeter.modifiers.BeanShellPreProcessor=WARN
-Ljmeter.extractor.BeanShellPostProcessor=WARN -Ljmeter.util.SSLManager=ERROR
-JCookieManager.allow_variable_cookies=true -JCookieManager.save.cookies=true
-JCookieManager.name.prefix= -JCookieManager.check.cookies=false
-Jbeanshell.sampler.init=base.bshrc -Jbeanshell.function.init=base.bshrc
-Jbeanshell.assertion.init=base.bshrc -Jbeanshell.listener.init=base.bshrc
-Jbeanshell.postprocessor.init=base.bshrc
-Jbeanshell.preprocessor.init=base.bshrc -Jbeanshell.timer.init=base.bshrc
-Jhost.url=localhost -Jhost.protocol=http -Jhost.port=80
-Jconnection.timeout=5000 -Jresponse.timeout=5000 -Jhost.username=admin
-Jhost.password=password
-Jsample.actions.file=../../configuration/jmeter-collectables/sample_actions.csv
-Jsample.user.file=../../configuration/jmeter-collectables/sample_user.csv
}}}
{{{
Picked up JAVA_TOOL_OPTIONS: -javaagent:/usr/share/java/jayatanaag.jar
java.lang.Throwable: Could not access /tmp/ut_JmeterTest/preparation/lib
at org.apache.jmeter.NewDriver.<clinit>(NewDriver.java:99)
java.lang.Throwable: Could not access /tmp/ut_JmeterTest/preparation/lib/ext
at org.apache.jmeter.NewDriver.<clinit>(NewDriver.java:99)
java.lang.Throwable: Could not access /tmp/ut_JmeterTest/preparation/lib/junit
at org.apache.jmeter.NewDriver.<clinit>(NewDriver.java:99)
java.lang.ClassNotFoundException: org.apache.jmeter.JMeter
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at org.apache.jmeter.NewDriver.main(NewDriver.java:214)
JMeter home directory was detected as: /tmp/ut_JmeterTest/preparation
}}}
* Jayatana version 2.6.1-1
* Ubuntu 14.04
$ java -version
Picked up JAVA_TOOL_OPTIONS: -javaagent:/usr/share/java/jayatanaag.jar
java version "1.7.0_55"
Java(TM) SE Runtime Environment (build 1.7.0_55-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.55-b03 mixed mode)
I don't know if theses informations will be enough to understand/reproduce the
bug.
If necessary I can give more informations.
Thanks again for your work !
Original issue reported on code.google.com by ghislain...@gmail.com
on 5 May 2014 at 9:48
GoogleCodeExporter commented
Can you send me a example of this issue? I can not reproduce it
Original comment by danjaredg
on 25 Sep 2014 at 6:12
GoogleCodeExporter commented
In the zip, a mini project with jmeter execution how fail.
The project simply print the execution stderr and stdout to the console.
I expect no error and got the described error on stderr :
{{{
--- exec-maven-plugin:1.2.1:exec (default-cli) @ jayatana39 ---
Picked up JAVA_TOOL_OPTIONS: -javaagent:/usr/share/java/jayatanaag.jar
[stderr] Picked up JAVA_TOOL_OPTIONS: -javaagent:/usr/share/java/jayatanaag.jar
[stderr] java.lang.Throwable: Could not access
/home/skyghis/Desktop/jayatana39/src/main/lib
[stderr] at org.apache.jmeter.NewDriver.<clinit>(NewDriver.java:99)
[stderr] java.lang.Throwable: Could not access
/home/skyghis/Desktop/jayatana39/src/main/lib/ext
[stderr] at org.apache.jmeter.NewDriver.<clinit>(NewDriver.java:99)
[stderr] java.lang.Throwable: Could not access
/home/skyghis/Desktop/jayatana39/src/main/lib/junit
[stderr] at org.apache.jmeter.NewDriver.<clinit>(NewDriver.java:99)
[stderr] java.lang.ClassNotFoundException: org.apache.jmeter.JMeter
[stderr] at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
[stderr] at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
[stderr] at java.security.AccessController.doPrivileged(Native Method)
[stderr] at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
[stderr] at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
[stderr] at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
[stderr] at org.apache.jmeter.NewDriver.main(NewDriver.java:255)
[stderr] JMeter home directory was detected as:
/home/skyghis/Desktop/jayatana39/src/main
------------------------------------------------------------------------
BUILD SUCCESS
------------------------------------------------------------------------
Total time: 0.666s
Finished at: Thu Oct 09 23:47:17 CEST 2014
Final Memory: 6M/239M
------------------------------------------------------------------------
}}}
Original comment by ghislain...@gmail.com
on 9 Oct 2014 at 9:48
Attachments:
GoogleCodeExporter commented
I found the error, JMETER loads jars in run time, and JMETER searches our jars
in the classpath when it have only one jar, but jayatana append its own jar.
So, JMETER searches its jars in jmeter.home or user.dir.
The fix is very easy, you need include a VM argument: -Djmeter.home
Original comment by danjaredg
on 9 Dec 2014 at 5:10
- Changed state: Invalid
GoogleCodeExporter commented
Thanks, the fix kind of work.
I still got an output on stderr
{{{
[stderr] Picked up JAVA_TOOL_OPTIONS: -javaagent:/usr/share/java/jayatanaag.jar
at XXX
at XXX
}}}
But I suppose than Jayatana can't fix jmeter writing on wrong output.
Thanks for the "fix"
Original comment by ghislain...@gmail.com
on 10 Dec 2014 at 9:32