Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to execute goal com.lazerycode.jmeter:jmeter-maven-plugin:2.8. #412

Closed
sudheerah opened this issue Sep 14, 2021 · 17 comments
Closed

Comments

@sudheerah
Copy link

sudheerah commented Sep 14, 2021

I am getting subject error when build the maven project.

> mvn clean install

Versions:

Maven home: C:\apache-maven-3.6.3\bin\..
Java version: 16.0.2, vendor: Oracle Corporation, runtime: C:\Java\jdk-16.0.2
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"

POM:

<plugin>
                <groupId>com.lazerycode.jmeter</groupId>
                <artifactId>jmeter-maven-plugin</artifactId>
                <version>2.8.6</version>
                <configuration>
                    <skipTests>${maven.jmeter.skip}</skipTests>
                </configuration>
                <executions>
                    <!-- Generate JMeter configuration -->
                    <execution>
                        <id>configuration</id>
                        <goals>
                            <goal>configure</goal>
                        </goals>
                    </execution>
                    <!-- Run JMeter tests -->
                    <execution>
                        <id>jmeter-tests</id>
                        <goals>
                            <goal>jmeter</goal>
                        </goals>
                    </execution>
                    <!-- Fail build on errors in test -->
                    <execution>
                        <id>jmeter-check-results</id>
                        <goals>
                            <goal>results</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

Logs:

[ERROR] Failed to execute goal com.lazerycode.jmeter:jmeter-maven-plugin:2.8.6:jmeter (jmeter-tests) on project datagenerator: Test failed with exit code:1 -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.lazerycode.jmeter:jmeter-maven-plugin:2.8.6:jmeter (jmeter-tests) on project datagenerator: Test failed with exit code:1
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:78)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:567)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: org.apache.maven.plugin.MojoExecutionException: Test failed with exit code:1
    at com.lazerycode.jmeter.testrunner.TestManager.executeSingleTest (TestManager.java:177)
    at com.lazerycode.jmeter.testrunner.TestManager.executeTests (TestManager.java:113)
    at com.lazerycode.jmeter.mojo.RunJMeterMojo.doExecute (RunJMeterMojo.java:67)
    at com.lazerycode.jmeter.mojo.AbstractJMeterMojo.execute (AbstractJMeterMojo.java:234)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:78)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:567)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
[ERROR]
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[INFO] Shutdown detected, destroying JMeter process...

I tried updating jmeter-maven-plugin to the latest i.e. 3.4.0. No luck though

@Ardesco
Copy link
Contributor

Ardesco commented Sep 14, 2021

Looks like something went wrong invoking JMeter. can you run the following command:

mvn clean verify > testrun.log

And upload that file here so that I can see the entire run?

I suspect there is an issue with your .jmx file.

@sudheerah
Copy link
Author

sudheerah commented Sep 14, 2021

@Ardesco Please see below logs as requested

[INFO] Scanning for projects...
[INFO] 
[INFO] ---------------------< com.abc.pnv:datagenerator >----------------------
[INFO] Building datagenerator 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:3.1.0:clean (default-clean) @ datagenerator ---
[INFO] Deleting C:\Repo\PNV\transfers-pnv-java\target
[INFO] 
[INFO] --- maven-resources-plugin:3.2.0:resources (default-resources) @ datagenerator ---
[WARNING] The POM for commons-io:commons-io:jar:2.6 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Using 'UTF-8' encoding to copy filtered properties files.
[INFO] Copying 15 resources
[INFO] Copying 20 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ datagenerator ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 84 source files to C:\Repo\PNV\transfers-pnv-java\target\classes
[INFO] /C:/Repo/PNV/transfers-pnv-java/src/main/java/com/abc/pnv/datagenerator/service/modelgenerator/pain/AbstractPaymentModelGenerator.java: Some input files use unchecked or unsafe operations.
[INFO] /C:/Repo/PNV/transfers-pnv-java/src/main/java/com/abc/pnv/datagenerator/service/modelgenerator/pain/AbstractPaymentModelGenerator.java: Recompile with -Xlint:unchecked for details.
[INFO] 
[INFO] --- jmeter-maven-plugin:2.8.6:configure (configuration) @ datagenerator ---
[INFO] -------------------------------------------------------
[INFO]  Configuring JMeter...
[INFO] -------------------------------------------------------
[INFO]  Building JMeter directory structure...
[INFO]  Configuring JMeter artifacts :[]
[INFO]  Populating JMeter directory ...
[INFO]  Copying extensions [] to JMeter lib/ext directory C:\Repo\PNV\transfers-pnv-java\target\jmeter\lib\ext with downloadExtensionDependencies set to true ...
[INFO]  Copying  JUnit libraries [] to JMeter junit lib directory C:\Repo\PNV\transfers-pnv-java\target\jmeter\lib\junit with downloadLibraryDependencies set to true ...
[INFO]  Copying test libraries [] to JMeter lib directory C:\Repo\PNV\transfers-pnv-java\target\jmeter\lib with downloadLibraryDependencies set to true ...
[INFO]  Configuring jmeter properties ...
[INFO]  Generating JSON Test config ...
[INFO] 
[INFO] --- maven-resources-plugin:3.2.0:testResources (default-testResources) @ datagenerator ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Using 'UTF-8' encoding to copy filtered properties files.
[INFO] skip non existing resourceDirectory C:\Repo\PNV\transfers-pnv-java\src\test\resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ datagenerator ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 2 source files to C:\Repo\PNV\transfers-pnv-java\target\test-classes
[INFO] 
[INFO] --- maven-surefire-plugin:2.22.2:test (default-test) @ datagenerator ---
[INFO] 
[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO] 
[INFO] Results:
[INFO] 
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO] 
[INFO] 
[INFO] --- maven-jar-plugin:3.2.0:jar (default-jar) @ datagenerator ---
[INFO] Building jar: C:\Repo\PNV\transfers-pnv-java\target\datagenerator-0.0.1-SNAPSHOT.jar
[INFO] 
[INFO] --- spring-boot-maven-plugin:2.4.2:repackage (repackage) @ datagenerator ---
[INFO] Replacing main artifact with repackaged archive
[INFO] 
[INFO] >>> jmeter-maven-plugin:2.8.6:jmeter (jmeter-tests) > :configure @ datagenerator >>>
[INFO] 
[INFO] --- jmeter-maven-plugin:2.8.6:configure (configure) @ datagenerator ---
[INFO] -------------------------------------------------------
[INFO]  Configuring JMeter...
[INFO] -------------------------------------------------------
[INFO]  Building JMeter directory structure...
[INFO]  Configuring JMeter artifacts :[]
[INFO]  Populating JMeter directory ...
[INFO]  Copying extensions [] to JMeter lib/ext directory C:\Repo\PNV\transfers-pnv-java\target\jmeter\lib\ext with downloadExtensionDependencies set to true ...
[INFO]  Copying  JUnit libraries [] to JMeter junit lib directory C:\Repo\PNV\transfers-pnv-java\target\jmeter\lib\junit with downloadLibraryDependencies set to true ...
[INFO]  Copying test libraries [] to JMeter lib directory C:\Repo\PNV\transfers-pnv-java\target\jmeter\lib with downloadLibraryDependencies set to true ...
[INFO]  Configuring jmeter properties ...
[INFO]  Generating JSON Test config ...
[INFO] 
[INFO] <<< jmeter-maven-plugin:2.8.6:jmeter (jmeter-tests) < :configure @ datagenerator <<<
[INFO] 
[INFO] 
[INFO] --- jmeter-maven-plugin:2.8.6:jmeter (jmeter-tests) @ datagenerator ---
[INFO]  
[INFO] -------------------------------------------------------
[INFO]  P E R F O R M A N C E    T E S T S
[INFO] -------------------------------------------------------
[INFO]  
[INFO] Will generate HTML report in C:\Repo\PNV\transfers-pnv-java\target\jmeter\reports\h2h_dd_transfers_approval\S01_H2HNSTP_transfers_Goods
[INFO]  
[INFO] Executing test: S01_H2HNSTP_transfers_Goods.jmx
[INFO] Starting process with:[java, -Xms512M, -Xmx512M, -Djava.awt.headless=true, -jar, ApacheJMeter-5.1.jar, -d, C:\Repo\PNV\transfers-pnv-java\target\jmeter, -e, -j, C:\Repo\PNV\transfers-pnv-java\target\jmeter\logs\S01_H2HNSTP_transfers_Goods.jmx.log, -l, C:\Repo\PNV\transfers-pnv-java\target\jmeter\results\20210915-h2h_dd_transfers_approval_S01_H2HNSTP_transfers_Goods.csv, -n, -o, C:\Repo\PNV\transfers-pnv-java\target\jmeter\reports\h2h_dd_transfers_approval\S01_H2HNSTP_transfers_Goods, -t, C:\Repo\PNV\transfers-pnv-java\target\jmeter\testFiles\h2h_dd_transfers_approval\S01_H2HNSTP_transfers_Goods.jmx]
[INFO] An error occurred: null
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  39.807 s
[INFO] Finished at: 2021-09-15T09:26:55+10:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.lazerycode.jmeter:jmeter-maven-plugin:2.8.6:jmeter (jmeter-tests) on project datagenerator: Test failed with exit code:1 -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[INFO] Shutdown detected, destroying JMeter process...


@Ardesco
Copy link
Contributor

Ardesco commented Sep 15, 2021

Could you do that again with the latest version of the plugin (3.4.0) and then paste your log here again.

I suspect you are seeing a JMeter error which has been fixed in 5.4 (which the latest version of the plugin will pull down):

https://bz.apache.org/bugzilla/show_bug.cgi?id=64957

@sudheerah
Copy link
Author

sudheerah commented Sep 15, 2021

@Ardesco This is the outcome with jmeter-maven-plugin (3.4.0). Apparently build failure after the change.

Further, is that possible to get compatible versions matrix (java/Jmeter/Jmeter mvn plugin) some where

[INFO] Scanning for projects...
[INFO] 
[INFO] ---------------------< com.abc.pnv:datagenerator >----------------------
[INFO] Building datagenerator 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:3.1.0:clean (default-clean) @ datagenerator ---
[INFO] Deleting C:\Repo\PNV\transfers-pnv-java\target
[INFO] 
[INFO] --- maven-resources-plugin:3.2.0:resources (default-resources) @ datagenerator ---
[WARNING] The POM for commons-io:commons-io:jar:2.6 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Using 'UTF-8' encoding to copy filtered properties files.
[INFO] Copying 15 resources
[INFO] Copying 20 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ datagenerator ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 84 source files to C:\Repo\PNV\transfers-pnv-java\target\classes
[INFO] /C:/Repo/PNV/transfers-pnv-java/src/main/java/com/abc/pnv/datagenerator/service/modelgenerator/pain/AbstractPaymentModelGenerator.java: Some input files use unchecked or unsafe operations.
[INFO] /C:/Repo/PNV/transfers-pnv-java/src/main/java/com/abc/pnv/datagenerator/service/modelgenerator/pain/AbstractPaymentModelGenerator.java: Recompile with -Xlint:unchecked for details.
[INFO] 
[INFO] --- jmeter-maven-plugin:3.4.0:configure (configuration) @ datagenerator ---
[INFO]  
[INFO] -------------------------------------------------------
[INFO] C O N F I G U R I N G    J M E T E R
[INFO] -------------------------------------------------------
[INFO]  
[INFO] Creating test configuration for execution ID: configuration
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  4.951 s
[INFO] Finished at: 2021-09-15T16:50:30+10:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.lazerycode.jmeter:jmeter-maven-plugin:3.4.0:configure (configuration) on project datagenerator: Execution configuration of goal com.lazerycode.jmeter:jmeter-maven-plugin:3.4.0:configure failed: A required class was missing while executing com.lazerycode.jmeter:jmeter-maven-plugin:3.4.0:configure: com/jayway/jsonpath/spi/mapper/MappingProvider
[ERROR] -----------------------------------------------------
[ERROR] realm =    plugin>com.lazerycode.jmeter:jmeter-maven-plugin:3.4.0
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/C:/maven/localRepository/com/lazerycode/jmeter/jmeter-maven-plugin/3.4.0/jmeter-maven-plugin-3.4.0.jar
[ERROR] urls[1] = file:/C:/maven/localRepository/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import  from realm ClassRealm[maven.api, parent: null]]
[ERROR] 
[ERROR] -----------------------------------------------------
[ERROR] : com.jayway.jsonpath.spi.mapper.MappingProvider
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginContainerException

@Ardesco
Copy link
Contributor

Ardesco commented Sep 15, 2021

We only support the latest version of the plugin and the latest version of JMeter.

In theory the latest version of the plugin can support all versions of JMeter, see The Wiki for more details.

In regards to the error above, it looks like you may have a corrupted file stored in your local M2 repository, or you have some custom dependency overrides that are not playing well with the plugin. Do you have any overrides in your POM.xml, or your settings.xml in your ~/.m2 directory?

this line would imply you have overrides in your POM that you haven't shown:

[WARNING] The POM for commons-io:commons-io:jar:2.6 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details

That is not in the default dependency tree for version 3.4.0 of the plugin, which is:

[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ jmeter-maven-plugin ---
[INFO] com.lazerycode.jmeter:jmeter-maven-plugin:maven-plugin:DEV-SNAPSHOT
[INFO] +- net.javacrumbs.json-unit:json-unit-assertj:jar:2.4.0:test
[INFO] |  +- net.javacrumbs.json-unit:json-unit-core:jar:2.4.0:test
[INFO] |  |  \- org.opentest4j:opentest4j:jar:1.1.1:test
[INFO] |  \- net.javacrumbs.json-unit:json-unit-json-path:jar:2.4.0:test
[INFO] +- org.apache.maven:maven-plugin-api:jar:3.5.2:compile
[INFO] |  +- org.apache.maven:maven-model:jar:3.5.2:compile
[INFO] |  +- org.apache.maven:maven-artifact:jar:3.5.2:compile
[INFO] |  +- org.eclipse.sisu:org.eclipse.sisu.plexus:jar:0.3.3:compile
[INFO] |  |  \- javax.enterprise:cdi-api:jar:1.0:compile
[INFO] |  |     \- javax.annotation:jsr250-api:jar:1.0:compile
[INFO] |  +- org.codehaus.plexus:plexus-utils:jar:3.1.0:compile
[INFO] |  \- org.codehaus.plexus:plexus-classworlds:jar:2.5.2:compile
[INFO] +- org.apache.maven:maven-core:jar:3.5.2:compile
[INFO] |  +- org.apache.maven:maven-settings:jar:3.5.2:compile
[INFO] |  +- org.apache.maven:maven-settings-builder:jar:3.5.2:compile
[INFO] |  |  +- org.codehaus.plexus:plexus-interpolation:jar:1.24:compile
[INFO] |  |  \- org.sonatype.plexus:plexus-sec-dispatcher:jar:1.4:compile
[INFO] |  |     \- org.sonatype.plexus:plexus-cipher:jar:1.4:compile
[INFO] |  +- org.apache.maven:maven-builder-support:jar:3.5.2:compile
[INFO] |  +- org.apache.maven:maven-repository-metadata:jar:3.5.2:compile
[INFO] |  +- org.apache.maven:maven-model-builder:jar:3.5.2:compile
[INFO] |  +- org.apache.maven:maven-resolver-provider:jar:3.5.2:compile
[INFO] |  +- org.apache.maven.resolver:maven-resolver-impl:jar:1.1.0:compile
[INFO] |  +- org.apache.maven.resolver:maven-resolver-spi:jar:1.1.0:compile
[INFO] |  +- org.apache.maven.resolver:maven-resolver-util:jar:1.1.0:compile
[INFO] |  +- org.apache.maven.shared:maven-shared-utils:jar:3.1.0:compile
[INFO] |  +- org.eclipse.sisu:org.eclipse.sisu.inject:jar:0.3.3:compile
[INFO] |  +- com.google.inject:guice:jar:no_aop:4.0:compile
[INFO] |  |  \- aopalliance:aopalliance:jar:1.0:compile
[INFO] |  +- com.google.guava:guava:jar:20.0:compile
[INFO] |  +- javax.inject:javax.inject:jar:1:compile
[INFO] |  +- org.codehaus.plexus:plexus-component-annotations:jar:1.7.1:compile
[INFO] |  \- org.apache.commons:commons-lang3:jar:3.5:compile
[INFO] +- org.apache.maven.plugin-tools:maven-plugin-annotations:jar:3.5.2:provided
[INFO] +- org.apache.maven.resolver:maven-resolver-api:jar:1.6.2:compile
[INFO] +- commons-io:commons-io:jar:2.8.0:compile
[INFO] +- com.fasterxml.jackson.core:jackson-core:jar:2.12.3:compile
[INFO] +- com.fasterxml.jackson.core:jackson-databind:jar:2.12.3:compile
[INFO] +- com.fasterxml.jackson.core:jackson-annotations:jar:2.12.3:compile
[INFO] +- com.fasterxml.jackson.dataformat:jackson-dataformat-csv:jar:2.12.3:compile
[INFO] +- com.jayway.jsonpath:json-path:jar:2.5.0:compile
[INFO] |  \- net.minidev:json-smart:jar:2.3:compile
[INFO] |     \- net.minidev:accessors-smart:jar:1.2:compile
[INFO] |        \- org.ow2.asm:asm:jar:5.0.4:compile
[INFO] +- junit:junit:jar:4.13.2:test
[INFO] |  \- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] +- org.assertj:assertj-core:jar:3.19.0:test
[INFO] +- org.mockito:mockito-core:jar:3.9.0:test
[INFO] |  +- net.bytebuddy:byte-buddy:jar:1.10.20:test
[INFO] |  +- net.bytebuddy:byte-buddy-agent:jar:1.10.20:test
[INFO] |  \- org.objenesis:objenesis:jar:3.2:test
[INFO] +- org.slf4j:slf4j-api:jar:1.7.30:compile
[INFO] +- ch.qos.logback:logback-core:jar:1.2.3:compile
[INFO] \- ch.qos.logback:logback-classic:jar:1.2.3:compile
[INFO] ------------------------------------------------------------------------

One way to make sure there are no corrupted files is to delete your ~/.m2/repository directory, but that will result in maven having to re-download all dependencies again

@sudheerah
Copy link
Author

sudheerah commented Oct 2, 2021

@Ardesco
I removed commons-io:commons-io:jar:2.6 from local maven repo, then the warning mentioned above disappeared.
But still get below error while >mvn clean install

[INFO] -------------------------------------------------------
[INFO] C O N F I G U R I N G    J M E T E R
[INFO] -------------------------------------------------------
[INFO]
[INFO] Creating test configuration for execution ID: configuration
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  5.961 s
[INFO] Finished at: 2021-10-02T20:29:24+10:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.lazerycode.jmeter:jmeter-maven-plugin:3.4.0:configure (configuration) on project datagenerator: Execution configuration of goal com.lazerycode.jmeter:jmeter-maven-plugin:3.4.0:configure failed: A required class was missing while executing com.lazerycode.jmeter:jmeter-maven-plugin:3.4.0:configure: com/jayway/jsonpath/spi/mapper/MappingProvider
[ERROR] -----------------------------------------------------
[ERROR] realm =    plugin>com.lazerycode.jmeter:jmeter-maven-plugin:3.4.0
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/C:/maven/localRepository/com/lazerycode/jmeter/jmeter-maven-plugin/3.4.0/jmeter-maven-plugin-3.4.0.jar
[ERROR] urls[1] = file:/C:/maven/localRepository/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import  from realm ClassRealm[maven.api, parent: null]]
[ERROR]
[ERROR] -----------------------------------------------------
[ERROR] : com.jayway.jsonpath.spi.mapper.MappingProvider
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginContainerException

@Ardesco
Copy link
Contributor

Ardesco commented Oct 2, 2021

It looks like it can't find the jsonpath jar on your classpath. Can you see if the following directory exists on your filesystem, and what files are in it:

~/.m2/repository/com/jayway/jsonpath/json-path/2.5.0

You may want to try a mvn clean verify -U to force maven to update your dependencies.

@sudheerah
Copy link
Author

@Ardesco thanks for your prompt response.

I did find json-path/2.5.0 in local repo. Even with -U same result.

Below is the logs with -X

-----------------------------------------------------

    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:78)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:567)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution configuration of goal com.lazerycode.jmeter:jmeter-maven-plugin:3.4.0:configure failed: A required class was missing while executing com.lazerycode.jmeter:jmeter-maven-plugin:3.4.0:configure: com/jayway/jsonpath/spi/mapper/MappingProvider
-----------------------------------------------------
realm =    plugin>com.lazerycode.jmeter:jmeter-maven-plugin:3.4.0
strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
urls[0] = file:/C:/maven/localRepository/com/lazerycode/jmeter/jmeter-maven-plugin/3.4.0/jmeter-maven-plugin-3.4.0.jar
urls[1] = file:/C:/maven/localRepository/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar
Number of foreign imports: 1
import: Entry[import  from realm ClassRealm[maven.api, parent: null]]

-----------------------------------------------------

    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:171)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:78)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:567)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: org.apache.maven.plugin.PluginContainerException: A required class was missing while executing com.lazerycode.jmeter:jmeter-maven-plugin:3.4.0:configure: com/jayway/jsonpath/spi/mapper/MappingProvider

-----------------------------------------------------
realm =    plugin>com.lazerycode.jmeter:jmeter-maven-plugin:3.4.0
strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
urls[0] = file:/C:/maven/localRepository/com/lazerycode/jmeter/jmeter-maven-plugin/3.4.0/jmeter-maven-plugin-3.4.0.jar
urls[1] = file:/C:/maven/localRepository/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar
Number of foreign imports: 1
import: Entry[import  from realm ClassRealm[maven.api, parent: null]]

-----------------------------------------------------

    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:169)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:78)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:567)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: java.lang.NoClassDefFoundError: com/jayway/jsonpath/spi/mapper/MappingProvider
    at com.lazerycode.jmeter.mojo.ConfigureJMeterMojo.doExecute (ConfigureJMeterMojo.java:297)
    at com.lazerycode.jmeter.mojo.AbstractJMeterMojo.execute (AbstractJMeterMojo.java:239)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:78)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:567)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: java.lang.ClassNotFoundException: com.jayway.jsonpath.spi.mapper.MappingProvider
    at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass (SelfFirstStrategy.java:50)
    at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass (ClassRealm.java:271)
    at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass (ClassRealm.java:247)
    at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass (ClassRealm.java:239)
    at com.lazerycode.jmeter.mojo.ConfigureJMeterMojo.doExecute (ConfigureJMeterMojo.java:297)
    at com.lazerycode.jmeter.mojo.AbstractJMeterMojo.execute (AbstractJMeterMojo.java:239)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:78)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:567)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
[ERROR]
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginContainerException

@sudheerah
Copy link
Author

sudheerah commented Oct 2, 2021

That is not in the default dependency tree for version 3.4.0 of the plugin, which is:

[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ jmeter-maven-plugin ---
[INFO] com.lazerycode.jmeter:jmeter-maven-plugin:maven-plugin:DEV-SNAPSHOT
[INFO] +- net.javacrumbs.json-unit:json-unit-assertj:jar:2.4.0:test
[INFO] |  +- net.javacrumbs.json-unit:json-unit-core:jar:2.4.0:test
[INFO] |  |  \- org.opentest4j:opentest4j:jar:1.1.1:test
[INFO] |  \- net.javacrumbs.json-unit:json-unit-json-path:jar:2.4.0:test

@Ardesco BTW how did you get plugins details with dependecy:tree that you specified above. Because normal mvn dependency:tree command doesn't show plugin details.

@Ardesco
Copy link
Contributor

Ardesco commented Oct 5, 2021

I've gone over this again locally and cannot reproduce any of the issues you are seeing. What does stand out is that your local maven repository is not in the default location (it's in C:\maven\localRepository\ instead of C:\Users\<User_Name>\.m2), so I'm guessing you have a Maven misconfiguration that causing issues (I can't prove that though).

Do you have a customised settings.xml, or custom repo config in your POM file?

In regards to the plugin details, I just ran a standard mvn dependency:tree command in the base jmeter-maven-plugin repo (you would need to check out a local copy to do that).

@sudheerah
Copy link
Author

@Ardesco I don't think it's related to maven misconfiguration. Because all my other Maven projects as expected. Further I have configured my localrepo path as below in my seetngs.xml

.......
   </profiles>
   <activeProfiles>
      <activeProfile>myDev</activeProfile>
   </activeProfiles>

   <localRepository>C:/maven/localRepository</localRepository>

</settings>

In regards to the plugin details, I just ran a standard mvn dependency:tree command in the base jmeter-maven-plugin repo (you would need to check out a local copy to do that).

This make sense

@Ardesco
Copy link
Contributor

Ardesco commented Oct 6, 2021

I've tried modifying my local repository location and I'm still seeing successful runs.

Moving into the realm of wild guesses, do you have a different Java version you can run against? Our CI tests are running against the following:

  • Java 8
  • Java 11
  • Java 13

I am using Java 17 locally (I have used Java 16 in the past, but I'm running on a Mac so it's not a direct match for the Windows version of Java 16 you are running).

@sudheerah
Copy link
Author

sudheerah commented Oct 7, 2021

@Ardesco Finally I managed to run with below combination,

Maven home: C:\apache-maven-3.6.3\bin\..
Java version: 1.8.0_281, vendor: Oracle Corporation, runtime: C:\Java\jdk1.8.0_281\jre

<groupId>com.lazerycode.jmeter</groupId>
 <artifactId>jmeter-maven-plugin</artifactId>
 <version>2.8.6</version>

@Ardesco
Copy link
Contributor

Ardesco commented Oct 8, 2021

That would suggest that we specifically have an issue with the Oracle JDK version 16.0.2 at the moment.

Is the latest version of the plugin working for you with the oracle 1.8 JDK? I would suggest using the latest version rather than 2.8.6 since various fixes/enhancements have been added.

@Ardesco
Copy link
Contributor

Ardesco commented Oct 8, 2021

Possible root cause of the error:

https://openjdk.java.net/jeps/396

Need to see if we have some legacy code that tries to access JDK internals, or if we rely on any libraries that do this.

Ardesco added a commit that referenced this issue Oct 8, 2021
@Ardesco
Copy link
Contributor

Ardesco commented Oct 9, 2021

@sudheerah Could you try with version 3.5.0 (just released) and JDK 17 and see if the latest release has fixed your issues.

I've updated all our dependencies to the latest versions and removed a plugin we were using for integration tests.

I have also added JDKL 16 and 17 builds which are now passing:

https://app.travis-ci.com/github/jmeter-maven-plugin/jmeter-maven-plugin/builds/239486481

@sudheerah
Copy link
Author

@Ardesco Sorry for the late response. Tested 3.5.0 with both Java 16 and 17.

All looks good, Thanks for your support.

@Ardesco Ardesco closed this as completed Oct 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants