2017-09-14 70 views
1

我在通过jenkins运行时遇到JMeter日志中的以下错误。 我正在使用JMeter版本2.11r。JMeter错误:无法实例化org.apache.jmeter.protocol.smtp.sampler.gui

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) 
+1

这是JMeter的一个非常旧的版本。尝试使用更新的东西? –

回答

-1

你与Java 8上运行JMeter的2.11按你的日志行:

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

JMeter是与Java兼容的8只因为2.12版本,按:

参见:

Version 2.12

Now, JMeter 2.12 is compliant with Java 8. Anyway, 2.11 is 5 versions away from 3.2, so very old now.

始终使用最新版本的JMeter。

+0

感谢您的回复。不过,我尝试了最新版本的JMeter 3.2。但是这次我得到了下面的错误信息:用户Jenkins测试 建立在工作区C:\ Program Files(x86)\ Jenkins \ workspace \ J-meter [J-meter] $ cmd/c call C:\ WINDOWS \ TEMP \ jenkins3780665126580318041.bat C:\ Program Files(x86)\ Jenkins \ workspace \ J-meter> E:\ Work \ JMeter \ bin \ jmeter.bat 错误:无法访问jarfile E:\ Work \ JMeter \ bin \ ApacheJMeter.jar errorlevel = 1 按任意键继续。 。 。 构建步骤'执行Windows批处理命令'标记为构建失败 完成:失败 – Nits

+0

谢谢,但这是另一个问题。我的回答是你最初的问题。在SO中,你需要开一个新的问题。谢谢 –

0

一些Java开发人员都有点放松,当涉及到处理边缘的情况下(或者他们根本就没有足够的资格),因为它是由JENKINS-37013证明(甚至Workspace Whitespace Replacement Plugin存在)

我会建议重新安装您的Java,詹金斯和JMeter的进入没有路径和问题,空格和特殊字符的文件夹就会消失,例如:

c:\apps\java 
c:\apps\jenkins 
c:\apps\jmeter 

万一检查出Continuous Integration 101: How to Run JMeter With Jenkins文章的更多细节。

+0

我仍然面临同样的问题。现在我所有的路径如下所示:C:\ JMeter,C:\ Program Files \ Java,C:\ Jenkins。我仍然收到错误:错误:无法访问jarfile C:\ JMeter \ bin \ ApacheJMeter.jar。我使用J Meter版本3.2,它没有bin文件夹中的\ ApacheJMeter.jar。请建议。 – Nits