java - Jmeter 插件执行抛出 ArrayIndexOutOfBoundsException

标签 java linux jmeter jmeter-plugins

我一直在寻找这个问题的答案,但在 Internet 上找不到任何答案。也许这里有人以前遇到过这个问题。

我有一台装有 Jmeter 3.1 的 CentOS 机器。在这台机器上一切正常。我创建了一个新的虚拟机,并将 jmeter 目录复制到新机器上,一切都设置好了。测试执行工作正常,但是当我尝试使用任何插件时(cmdrunner-2.0.jar 或 JMeterPluginsCMD.sh) 我得到一个 Exception 返回,没有太多信息出了什么问题:

[root@box bin]# java -jar "/opt/apache-jmeter-3.1/lib/cmdrunner-2.0.jar" -n --tool Reporter  --input-jtl "/tmp/data.csv" --plugin-type SynthesisReport --generate-csv "/tmp/report.csv"
WARN    2017-10-22 12:41:57.204 [jmeter.u] (): Exception 'null' occurred when fetching String property:'sampleresult.default.encoding', defaulting to:ISO-8859-1
WARN    2017-10-22 12:41:57.224 [jmeter.u] (): Exception 'null' occurred when fetching String property:'jmeterPlugin.prefixPlugins'
INFO    2017-10-22 12:41:57.224 [kg.apc.j] (): Using JMeterPluginsCMD v. N/A
INFO    2017-10-22 12:41:57.229 [jmeter.u] (): Setting Locale to en_US
INFO    2017-10-22 12:41:57.238 [kg.apc.j] (): Loading user properties from: /opt/apache-jmeter-3.1/bin/user.properties
INFO    2017-10-22 12:41:57.238 [kg.apc.j] (): Loading system properties from: /opt/apache-jmeter-3.1/bin/system.properties
ERROR: java.lang.ArrayIndexOutOfBoundsException: 0
*** Problem's technical details go below ***
Home directory was detected as: /opt/apache-jmeter-3.1/lib
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0
        at sun.font.CompositeStrike.getStrikeForSlot(CompositeStrike.java:75)
        at sun.font.CompositeStrike.getFontMetrics(CompositeStrike.java:93)
        at sun.font.FontDesignMetrics.initMatrixAndMetrics(FontDesignMetrics.java:359)
...
...

ERROR: java.lang.ArrayIndexOutOfBoundsException: 0

这就是我得到的全部。两台机器的唯一区别是:

工作平台:

内核 3.10.0-514.26.2.el7.x86_64 java(内部版本 1.8.0_131-b12)

不工作:

内核 3.10.0-693.2.2.el7.x86_64, java(内部版本 1.8.0_144-b01)

没有环境变量丢失。

我们非常欢迎任何建议

最佳答案

这是这个特定平台上的 java 错误:

关于java - Jmeter 插件执行抛出 ArrayIndexOutOfBoundsException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46871769/

相关文章:

python - 在 CMake 中运行调用 Glad

testing - 来自文件的 JMeter HTTP 请求发布正文

java - 正则表达式 - 替换不在引号中的文本

java - 如何在 Android studio 中只执行一个选项卡的内容?

java - 多个服务器实例中的 Spring Boot REST 服务 HTTPS

performance - Node.js CPU 负载均衡

jmeter - 无法在Jmeter中使用 "Regular Expression Extractor"捕获响应头

java - 分析Java线程转储

linux - 如何解析 unix shell 脚本中路径的结尾?

python - 如何在 pytest 中迭代 test_function 以获得多个值?