通过jenkins运行时,我在JMeter日志中收到以下错误。 我使用的是JMeter 2.11r版。
The logs are:
2017/09/14 17:00:16 INFO - jmeter.util.JMeterUtils: Setting Locale to en_US
2017/09/14 17:00:16 INFO - jmeter.JMeter: Loading user properties from: E:\J-Meter\bin\user.properties
2017/09/14 17:00:16 INFO - jmeter.JMeter: Loading system properties from: E:\J-Meter\bin\system.properties
2017/09/14 17:00:16 INFO - jmeter.JMeter: Copyright (c) 1998-2014 The Apache Software Foundation
2017/09/14 17:00:16 INFO - jmeter.JMeter: Version 2.11 r1554548
2017/09/14 17:00:16 INFO - jmeter.JMeter: java.version=1.8.0_121
2017/09/14 17:00:16 INFO - jmeter.JMeter: java.vm.name=Java HotSpot(TM) 64-Bit Server VM
2017/09/14 17:00:16 INFO - jmeter.JMeter: os.name=Windows 8.1
2017/09/14 17:00:16 INFO - jmeter.JMeter: os.arch=amd64
2017/09/14 17:00:16 INFO - jmeter.JMeter: os.version=6.3
2017/09/14 17:00:16 INFO - jmeter.JMeter: file.encoding=Cp1252
2017/09/14 17:00:16 INFO - jmeter.JMeter: Default Locale=English (United States)
2017/09/14 17:00:16 INFO - jmeter.JMeter: JMeter Locale=English (United States)
2017/09/14 17:00:16 INFO - jmeter.JMeter: JMeterHome=E:\J-Meter
2017/09/14 17:00:16 INFO - jmeter.JMeter: user.dir =C:\Program Files (x86)\Jenkins\workspace\J-meter
2017/09/14 17:00:16 INFO - jmeter.JMeter: PWD =C:\Program Files (x86)\Jenkins\workspace\J-meter
2017/09/14 17:00:16 INFO - jmeter.JMeter: IP: 10.150.246.100 Name: NOD-AF1-lo-D1N FullName: NOD-AF1-lo-D1N.timesgroup.com
2017/09/14 17:00:16 INFO - jmeter.JMeter: Loaded icon properties from org/apache/jmeter/images/icon.properties
2017/09/14 17:00:17 INFO - jmeter.engine.util.CompoundVariable: Note: Function class names must contain the string: '.functions.'
2017/09/14 17:00:17 INFO - jmeter.engine.util.CompoundVariable: Note: Function class names must not contain the string: '.gui.'
2017/09/14 17:00:17 INFO - jmeter.gui.action.LookAndFeelCommand: Using look and feel: javax.swing.plaf.metal.MetalLookAndFeel [Metal, CrossPlatform]
2017/09/14 17:00:17 INFO - jmeter.util.BSFTestElement: Registering JMeter version of JavaScript engine as work-round for BSF-22
2017/09/14 17:00:18 INFO - jmeter.protocol.http.sampler.HTTPSamplerBase: Cannot find .className property for htmlParser, using default
2017/09/14 17:00:18 INFO - jmeter.protocol.http.sampler.HTTPSamplerBase: Parser for text/html is
2017/09/14 17:00:18 INFO - jmeter.protocol.http.sampler.HTTPSamplerBase: Parser for application/xhtml+xml is
2017/09/14 17:00:18 INFO - jmeter.protocol.http.sampler.HTTPSamplerBase: Parser for application/xml is
2017/09/14 17:00:18 INFO - jmeter.protocol.http.sampler.HTTPSamplerBase: Parser for text/xml is
2017/09/14 17:00:18 INFO - jmeter.protocol.http.sampler.HTTPSamplerBase: Parser for text/vnd.wap.wml is org.apache.jmeter.protocol.http.parser.RegexpHTMLParser
2017/09/14 17:00:18 INFO - jmeter.gui.util.MenuFactory: Skipping org.apache.jmeter.protocol.http.control.gui.WebServiceSamplerGui
2017/09/14 17:00:18 INFO - jmeter.gui.util.MenuFactory: Skipping org.apache.jmeter.protocol.http.modifier.gui.ParamModifierGui
2017/09/14 17:00:18 INFO - jorphan.exec.KeyToolUtils: keytool found at 'C:\Program Files\Java\jre1.8.0_121\bin\keytool'
2017/09/14 17:00:18 INFO - jmeter.protocol.http.proxy.ProxyControl: HTTP(S) Test Script Recorder SSL Proxy will use keys that support embedded 3rd party resources in file E:\J-Meter\bin\proxyserver.jks
2017/09/14 17:00:18 WARN - jmeter.gui.util.MenuFactory: Could not instantiate org.apache.jmeter.protocol.smtp.sampler.gui.SmtpSamplerGui java.lang.NullPointerException
at sun.awt.shell.Win32ShellFolder2.access$200(Unknown Source)
at sun.awt.shell.Win32ShellFolder2$1.call(Unknown Source)
at sun.awt.shell.Win32ShellFolder2$1.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at sun.awt.shell.Win32ShellFolderManager2$ComInvoker$3.run(Unknown Source)
答案 0 :(得分:0)
一些Java开发人员在处理边缘情况时(或者他们根本没有足够的资格)有点放松,因为JENKINS-37013证明了这一点(偶数Workspace Whitespace Replacement Plugin存在)
我建议将Java,Jenkins和JMeter重新安装到路径中没有空格和特殊字符的文件夹中,问题应该消失,例如:
c:\apps\java
c:\apps\jenkins
c:\apps\jmeter
以防查看Continuous Integration 101: How to Run JMeter With Jenkins文章了解详情。
答案 1 :(得分:-1)
根据您的日志行,您正在使用Java 8运行JMeter 2.11:
2017/09/14 17:00:16 INFO - jmeter.JMeter:版本2.11 r1554548
2017/09/14 17:00:16 INFO - jmeter.JMeter:java.version = 1.8.0_121
JMeter仅在版本2.12之后与Java 8兼容,根据:
请参阅:
版本2.12
现在,JMeter 2.12符合Java 8。 无论如何,2.11距离3.2还有5个版本,现在很老了。
始终使用最新版本的JMeter。