Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jmeter-analysis-plugin IllegalArgumentException: Null or zero length 'values' argument

I am getting an illegal argument exception when running the jmeter-analysis plugin. I have validated all the output .jtl files and it doesn't appear that the xml files are malformed. Below I have posted the maven command I am using to run the performance test suite (which runs fine), as well as my project structure, pom and output. I can't quite figure out what is going on, as everything was actually working before I updated the JMeter test plan in the .jmx. The suite runs fine in the JMeter GUI and runs fine before it gets to the analyze step. Has anyone encountered this before? What can I do to solve this?

Maven

mvn -pl performance-tests clean verify -U -X

Project Structure

Project
    Performance Test Module
        src
            test
                jmeter
                    performance-tests.jmx
            resources
                properties
                    artifact_headers.properties
                    artifact_users.properties
                index.html

POM

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <parent>
        <artifactId>artifact-id</artifactId>
        <groupId>com.group.id</groupId>
        <version>1.0-SNAPSHOT</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>performance-tests</artifactId>

    <profiles>
        <profile>
            <id>default</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <properties>
                <threads>1</threads>
                <loops>1</loops>
                <ramp>1</ramp>
                <delay>1</delay>
                <account></account>
                <password></password>
            </properties>
        </profile>
    </profiles>

    <properties>
        <com.artifact.jmeter.test>${project.basedir}/src/test/jmeter/*.jmx</com.artifact.jmeter.test>
        <com.artifact.target.environment>https://dev-dot-api-dot-labs-horizon-1.appspot.com</com.artifact.target.environment>
        <com.artifact.jmeter.loops>${loops}</com.artifact.jmeter.loops>
        <com.artifact.jmeter.threads>${threads}</com.artifact.jmeter.threads>
        <com.artifact.jmeter.ramp>${ramp}</com.artifact.jmeter.ramp>
        <com.artifact.jmeter.startup.delay>${delay}</com.artifact.jmeter.startup.delay>
        <com.artifact.jmeter.account>${account}</com.artifact.jmeter.account>
        <com.artifact.jmeter.password>${password}</com.artifact.jmeter.password>
        <reportdirectory>${project.build.directory}/results</reportdirectory>
        <kg.apc.version>1.4.0</kg.apc.version>
        <commons.lang.version>2.6</commons.lang.version>
        <net.minidev.version>2.3</net.minidev.version>
        <surefire.version>2.19.1</surefire.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>com.vault</groupId>
            <artifactId>vault-lib</artifactId>
            <version>2.13</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven.surefire</groupId>
            <artifactId>surefire-junit47</artifactId>
            <version>${surefire.version}</version>
        </dependency>
        <dependency>
            <groupId>net.minidev</groupId>
            <artifactId>json-smart</artifactId>
            <version>${net.minidev.version}</version>
        </dependency>
        <dependency>
            <groupId>commons-lang</groupId>
            <artifactId>commons-lang</artifactId>
            <version>${commons.lang.version}</version>
        </dependency>
        <dependency>
            <groupId>kg.apc</groupId>
            <artifactId>jmeter-plugins-standard</artifactId>
            <version>${kg.apc.version}</version>
        </dependency>
        <dependency>
            <groupId>kg.apc</groupId>
            <artifactId>jmeter-plugins-extras</artifactId>
            <version>${kg.apc.version}</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>com.lazerycode.jmeter</groupId>
                <artifactId>jmeter-maven-plugin</artifactId>
                <version>2.0.3</version>
                <executions>
                    <execution>
                        <id>jmeter-tests</id>
                        <goals>
                            <goal>jmeter</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <customPropertiesFiles>
                        <file>${project.build.directory}/jmeter/bin/properties/artifact_headers.properties</file>
                        <file>${project.build.directory}/jmeter/bin/properties/artifact_users.properties</file>
                    </customPropertiesFiles>
                    <propertiesFilesDirectory>${project.build.directory}/jmeter/bin/properties</propertiesFilesDirectory>
                    <jmeterExtensions>
                        <extension>commons-lang:commons-lang:2.6</extension>
                        <extension>net.minidev:json-smart:2.3</extension>
                        <artifact>kg.apc:jmeter-plugins-standard:1.4.0</artifact>
                        <artifact>kg.apc:jmeter-plugins-extras:1.4.0</artifact>
                        <artifact>kg.apc:jmeter-plugins-extras-libs:1.4.0</artifact>
                        <artifact>org.apache.jmeter:jorphan:3.0</artifact>
                    </jmeterExtensions>
                    <propertiesUser>
                        <jmeter.loops>${com.artifact.jmeter.loops}</jmeter.loops>
                        <jmeter.threads>${com.artifact.jmeter.threads}</jmeter.threads>
                        <jmeter.ramp>${com.artifact.jmeter.ramp}</jmeter.ramp>
                        <jmeter.account>${com.artifact.jmeter.account}</jmeter.account>
                        <jmeter.password>${com.artifact.jmeter.password}</jmeter.password>
                        <RESULTS_PATH>${reportdirectory}</RESULTS_PATH>
                    </propertiesUser>
                    <propertiesJMeter>
                        <aggregate_rpt_pct1>80</aggregate_rpt_pct1>
                        <aggregate_rpt_pct2>90</aggregate_rpt_pct2>
                        <aggregate_rpt_pct3>99</aggregate_rpt_pct3>
                    </propertiesJMeter>
                    <overrideRootLogLevel>warning</overrideRootLogLevel>
                    <testResultsTimestamp>false</testResultsTimestamp>
                    <!--<resultsFileFormat>csv</resultsFileFormat>-->
                    <resultsDirectory>${reportdirectory}</resultsDirectory>
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.lazerycode.jmeter</groupId>
                <artifactId>jmeter-analysis-maven-plugin</artifactId>
                <version>1.0.6</version>
                <executions>
                    <execution>
                        <phase>verify</phase>
                        <id>thread</id>
                        <goals>
                            <goal>analyze</goal>
                        </goals>
                        <configuration>
                            <!--<source>${project.build.directory}/**/*.jtl</source>-->
                            <source>${reportdirectory}/performance-tests.jtl</source>
                            <targetDirectory>${reportdirectory}/generatedreport</targetDirectory>
                            <sourceDirFailed>false</sourceDirFailed>
                            <checkResult>
                                <throughput>
                                    <threshold>-1</threshold>
                                    <toleranceDirection>UPPER_LOWER_TOLERANCE</toleranceDirection>
                                    <tolerance>5</tolerance>
                                </throughput>
                                <errors>
                                    <threshold>-1</threshold>
                                    <toleranceDirection>UPPER_LOWER_TOLERANCE</toleranceDirection>
                                    <tolerance>5</tolerance>
                                </errors>
                            </checkResult>
                            <configurationCharts>
                                <width>950</width>
                                <height>500</height>
                            </configurationCharts>
                            <maxSamples>50000</maxSamples>
                            <preserveDirectories>false</preserveDirectories>
                            <sampleNames>
                                <sampleName>sample</sampleName>
                                <sampleName>httpSample</sampleName>
                            </sampleNames>
                            <processAllFilesFound>true</processAllFilesFound>
                            <remoteResourcesFromUntilDateFormat>HH:mm_yyyyMMdd</remoteResourcesFromUntilDateFormat>
                            <writers>
                                <!--<com.lazerycode.jmeter.analyzer.writer.SummaryTextToStdOutWriter/>-->
                                <!--<com.lazerycode.jmeter.analyzer.writer.SummaryTextToFileWriter/>-->
                                <!--<com.lazerycode.jmeter.analyzer.writer.HtmlWriter/>-->
                                <!--<com.lazerycode.jmeter.analyzer.writer.DetailsToCsvWriter/>-->
                                <com.lazerycode.jmeter.analyzer.writer.DetailsToHtmlWriter/>
                                <com.lazerycode.jmeter.analyzer.writer.ChartWriter/>
                            </writers>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <version>3.0.1</version>
                <executions>
                    <execution>
                        <id>copy-resources</id>
                        <phase>validate</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.build.directory}/jmeter/bin</outputDirectory>
                            <resources>
                                <resource>
                                    <directory>${pom.basedir}/src/test/resources</directory>
                                    <filtering>true</filtering>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>

Stack Trace

[ERROR] Failed to execute goal com.lazerycode.jmeter:jmeter-analysis-maven-plugin:1.0.6:analyze (thread) on project performance-tests: Error analysing: Null or zero length 'values' argument. -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.lazerycode.jmeter:jmeter-analysis-maven-plugin:1.0.6:analyze (thread) on project performance-tests: Error analysing
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
    at org.codehaus.classworlds.Launcher.main(Launcher.java:47)
Caused by: org.apache.maven.plugin.MojoExecutionException: Error analysing
    at com.lazerycode.jmeter.analyzer.AnalyzeMojo.execute(AnalyzeMojo.java:233)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
    ... 21 more
Caused by: java.lang.IllegalArgumentException: Null or zero length 'values' argument.
    at org.jfree.data.statistics.HistogramDataset.getMinimum(HistogramDataset.java:221)
    at org.jfree.data.statistics.HistogramDataset.addSeries(HistogramDataset.java:136)
    at com.lazerycode.jmeter.analyzer.writer.ChartWriter.createResponseTimesPlot(ChartWriter.java:188)
    at com.lazerycode.jmeter.analyzer.writer.ChartWriter.writeCharts(ChartWriter.java:95)
    at com.lazerycode.jmeter.analyzer.writer.ChartWriter.write(ChartWriter.java:65)
    at com.lazerycode.jmeter.analyzer.ResultAnalyzer.analyze(ResultAnalyzer.java:47)
    at com.lazerycode.jmeter.analyzer.AnalyzeMojo.analyze(AnalyzeMojo.java:318)
    at com.lazerycode.jmeter.analyzer.AnalyzeMojo.execute(AnalyzeMojo.java:217)
    ... 23 more
like image 884
moonboy Avatar asked May 30 '26 16:05

moonboy


1 Answers

I have downloaded the plugin and see the exception is happening with ChartWriter component when it doesn't have 'values' to generate charts (I think).

To by-pass it without changing code, you can disable ChartWriter (if you not really need it) by changing in pom as below.

<plugin>
                <groupId>com.lazerycode.jmeter</groupId>
                <artifactId>jmeter-analysis-maven-plugin</artifactId>
                <version>1.0.6</version>
                <executions>
                    <execution>
                        <id>create-html-report</id>
                        <phase>test</phase>
                        <configuration>
                            <processAllFilesFound>true</processAllFilesFound>
                            <source>${project.build.directory}/**/*.jtl</source>
                            <writers>
                                <com.lazerycode.jmeter.analyzer.writer.SummaryTextToStdOutWriter/>
                                <com.lazerycode.jmeter.analyzer.writer.SummaryTextToFileWriter/>
                                <com.lazerycode.jmeter.analyzer.writer.HtmlWriter/>
                                <com.lazerycode.jmeter.analyzer.writer.DetailsToCsvWriter/>
                                <com.lazerycode.jmeter.analyzer.writer.DetailsToHtmlWriter/>
                                **<!--<com.lazerycode.jmeter.analyzer.writer.ChartWriter/>-->**
                            </writers>

                        </configuration>
                        <goals>
                            <goal>analyze</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
like image 63
Nghia Do Avatar answered Jun 01 '26 18:06

Nghia Do



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!