Issues with maven jmeter plugin 2.0.3 (JMeter 3.0) and json path extractor usage in jmx file?

1,575 views
Skip to first unread message

Richard Olsson

unread,
Aug 9, 2016, 9:02:48 AM8/9/16
to jmeter-plugins
Hi,

I've installed JMeter 3.0 in my PC, Windows.
After installing JSON plugins from the new plugin manager could I open up an old jmx test plan file.
Before this plugin was installed did I get an error, related to json path extractor...


Anyway, the goal is to get it running with maven using maven jmeter plugin version 2.0.3. (i.e. JMeter 3.0)
Using Maven version 3.3.3.
Java 1.8

Done quite a lot googling, but can't find the route cause.
I guess this is supposed to work?

I don't see any additional jmeter plugin, such as jmeter-plugins-extras-libs in lib dir...  And don't know the reason for this...?
Any specific things missing in pom?  I've attached relevant part of it.


I get this when building. Seems to be equal to what I saw locally in gui, before adding the JSON plugin.
Now I see that it's just an INFO (hmm, why is that..?)  Anyway, no tests are executed...

...
13:56:24 [INFO]  Configuring JMeter...
13:56:24 [INFO] -------------------------------------------------------
13:56:26 [INFO] 
13:56:26 [INFO] <<< jmeter-maven-plugin:2.0.3:jmeter (jmeter-tests) < :configure @ xxxx <<<
13:56:26 [INFO] 
13:56:26 [INFO] --- jmeter-maven-plugin:2.0.3:jmeter (jmeter-tests) @ 
xxxx 
---
13:56:26 [INFO] 13:56:26 [INFO] ------------------------------------------------------- 13:56:26 [INFO] P E R F O R M A N C E T E S T S 13:56:26 [INFO] ------------------------------------------------------- 13:56:26 [INFO] Invalid value detected for <postTestPauseInSeconds>. Setting pause to 0... 13:56:26 [INFO] 13:56:26 [INFO] 13:56:26 [INFO] Executing test: xxxx.jmx
13:56:26 [INFO] Writing log file to: /var/opt/jenkins-slave/workspace/xxxx/xxxx_GCS_load_test-xxxx-583_B_feature_branch_man/target/jmeter/logs/xxxx_gcs_load_test.jmx.log
13:56:27 [INFO] Error in NonGUIDriver java.lang.IllegalArgumentException: Problem loading XML from:'/var/opt/jenkins-slave/workspace/xxxx/xxxx_GCS_load_test-xxxx-583_B_feature_branch_man/target/jmeter/testFiles/xxxx_gcs_load_test.jmx', missing class com.thoughtworks.xstream.converters.ConversionException: com.atlantbh.jmeter.plugins.jsonutils.jsonpathextractor.JSONPathExtractor : com.atlantbh.jmeter.plugins.jsonutils.jsonpathextractor.JSONPathExtractor
13:56:27 [INFO] ---- Debugging information ---- 13:56:27 [INFO] message : com.atlantbh.jmeter.plugins.jsonutils.jsonpathextractor.JSONPathExtractor 13:56:27 [INFO] cause-exception : com.thoughtworks.xstream.mapper.CannotResolveClassException 13:56:27 [INFO] cause-message : com.atlantbh.jmeter.plugins.jsonutils.jsonpathextractor.JSONPathExtractor 13:56:27 [INFO] class : org.apache.jorphan.collections.ListedHashTree 13:56:27 [INFO] required-type : org.apache.jorphan.collections.ListedHashTree 13:56:27 [INFO] converter-type : org.apache.jmeter.save.converters.HashTreeConverter 13:56:27 [INFO] path : /jmeterTestPlan/hashTree/hashTree/hashTree[3]/hashTree/hashTree[6]/com.atlantbh.jmeter.plugins.jsonutils.jsonpathextractor.JSONPathExtractor 13:56:27 [INFO] line number : 213 13:56:27 [INFO] ------------------------------- : com.atlantbh.jmeter.plugins.jsonutils.jsonpathextractor.JSONPathExtractor : com.atlantbh.jmeter.plugins.jsonutils.jsonpathextractor.JSONPathExtractor








pom-file.txt

Andrey Pokhilko

unread,
Aug 9, 2016, 9:27:09 AM8/9/16
to jmeter-...@googlegroups.com

Hi,

You should add corresponding artifact for JSON plugins. It's name is "jmeter-plugins-json": http://search.maven.org/#search%7Cga%7C1%7Ca%3A%22jmeter-plugins-json%22

Andrey Pokhilko

--
You received this message because you are subscribed to the Google Groups "jmeter-plugins" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jmeter-plugin...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Richard Olsson

unread,
Aug 9, 2016, 9:51:40 AM8/9/16
to jmeter-plugins
Thanks for quick response. Will try, need to get it to local repo first somehow

Richard Olsson

unread,
Aug 10, 2016, 3:12:06 AM8/10/16
to jmeter-plugins
Hello,

Still haven't get it to work.

Added this into the pom file,
<jmeterPlugins>
   <plugin>
     <groupId>kg.apc</groupId>
              <artifactId>jmeter-plugins-json</artifactId>
   </plugin>
</jmeterPlugins>
...
<dependency>
     <groupId>kg.apc</groupId>
     <artifactId>jmeter-plugins-json</artifactId>
     <version>2.3</version>
</dependency>

And after the nights it seems that some updates been made in our local repo... Was at least failing when building yesterday night.
The first time I run it this morning I got this info in the build,

08:12:13 [INFO] Scanning for projects...
08:12:14 [HUDSON] Collecting dependencies info
08:12:14 [INFO]                                                                         
08:12:14 [INFO] ------------------------------------------------------------------------
08:12:14 [INFO] Building NeedsloadTest 1.0-SNAPSHOT
08:12:14 [INFO] ------------------------------------------------------------------------
08:12:14 [INFO] 
08:12:14 [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ NeedsloadTest ---
08:12:14 [INFO] Deleting /var/opt/jenkins-slave/workspace/NEEDS/NEEDS_GCS_load_test-needs-583_B_feature_branch_man/target
08:12:14 [INFO] 
08:12:14 [INFO] --- maven-enforcer-plugin:1.2:enforce (enforce-versions) @ NeedsloadTest ---
08:12:14 [INFO] 
08:12:14 [INFO] --- subversion-info-maven-plugin:2.2.0:getInfo (get-subversion-info) @ NeedsloadTest ---
08:12:15 [INFO] 
08:12:15 [INFO] --- timestamp-maven-plugin:1.0.0:add-timestamp (generate-timestamp) @ NeedsloadTest ---
08:12:15 [INFO] 
08:12:15 [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ NeedsloadTest ---
08:12:15 [INFO] Using 'UTF-8' encoding to copy filtered resources.
08:12:15 [INFO] skip non existing resourceDirectory /var/opt/jenkins-slave/workspace/NEEDS/NEEDS_GCS_load_test-needs-583_B_feature_branch_man/src/main/resources
08:12:15 [INFO] 
08:12:15 [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ NeedsloadTest ---
08:12:15 [INFO] No sources to compile
08:12:15 [INFO] 
08:12:15 [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ NeedsloadTest ---
08:12:15 [INFO] Using 'UTF-8' encoding to copy filtered resources.
08:12:15 [INFO] skip non existing resourceDirectory /var/opt/jenkins-slave/workspace/NEEDS/NEEDS_GCS_load_test-needs-583_B_feature_branch_man/src/test/resources
08:12:15 [INFO] 
08:12:15 [INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ NeedsloadTest ---
08:12:15 [INFO] No sources to compile
08:12:16 [INFO] 
08:12:16 [INFO] --- maven-surefire-plugin:2.19.1:test (default-test) @ NeedsloadTest ---
08:12:16 [INFO] No tests to run.
08:12:16 [JENKINS] Recording test results
08:12:16 [INFO] 
08:12:16 [INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ NeedsloadTest ---
08:12:16 [WARNING] JAR will be empty - no content was marked for inclusion!
08:12:16 [INFO] Building jar: /var/opt/jenkins-slave/workspace/NEEDS/NEEDS_GCS_load_test-needs-583_B_feature_branch_man/target/NeedsloadTest-1.0-SNAPSHOT.jar
08:12:16 [INFO] 
08:12:16 [INFO] >>> jmeter-maven-plugin:2.0.3:jmeter (jmeter-tests) > :configure @ NeedsloadTest >>>
08:12:16 [INFO] 
08:12:16 [INFO] --- jmeter-maven-plugin:2.0.3:configure (configure) @ NeedsloadTest ---
08:12:17 [INFO] Downloading: http://artifactory.nix.cydmodule.com/artifactory/repo/kg/apc/jmeter-plugins-charts/0.1/jmeter-plugins-charts-0.1.jar
08:12:19 [INFO] Downloaded: http://artifactory.nix.cydmodule.com/artifactory/repo/kg/apc/jmeter-plugins-charts/0.1/jmeter-plugins-charts-0.1.jar (69 KB at 30.0 KB/sec)
08:12:19 [INFO] -------------------------------------------------------
08:12:19 [INFO]  Configuring JMeter...
08:12:19 [INFO] -------------------------------------------------------
08:12:21 [INFO] 
08:12:21 [INFO] <<< jmeter-maven-plugin:2.0.3:jmeter (jmeter-tests) < :configure @ NeedsloadTest <<<
08:12:21 [INFO] 
08:12:21 [INFO] --- jmeter-maven-plugin:2.0.3:jmeter (jmeter-tests) @ NeedsloadTest ---
08:12:21 [INFO]  
08:12:21 [INFO] -------------------------------------------------------
08:12:21 [INFO]  P E R F O R M A N C E    T E S T S
08:12:21 [INFO] -------------------------------------------------------
08:12:21 [INFO] Invalid value detected for <postTestPauseInSeconds>.  Setting pause to 0...
08:12:21 [INFO]  
08:12:21 [INFO]  
08:12:21 [INFO] Executing test: needs_gcs_load_test.jmx
08:12:21 [INFO] Writing log file to: /var/opt/jenkins-slave/workspace/NEEDS/NEEDS_GCS_load_test-needs-583_B_feature_branch_man/target/jmeter/logs/needs_gcs_load_test.jmx.log
08:12:22 [INFO] Error in NonGUIDriver java.lang.IllegalArgumentException: Problem loading XML from:'/var/opt/jenkins-slave/workspace/NEEDS/NEEDS_GCS_load_test-needs-583_B_feature_branch_man/target/jmeter/testFiles/needs_gcs_load_test.jmx', missing class com.thoughtworks.xstream.converters.ConversionException: com.atlantbh.jmeter.plugins.jsonutils.jsonpathextractor.JSONPathExtractor : com.atlantbh.jmeter.plugins.jsonutils.jsonpathextractor.JSONPathExtractor
08:12:22 [INFO] ---- Debugging information ----
08:12:22 [INFO] message             : com.atlantbh.jmeter.plugins.jsonutils.jsonpathextractor.JSONPathExtractor
08:12:22 [INFO] cause-exception     : com.thoughtworks.xstream.mapper.CannotResolveClassException
08:12:22 [INFO] cause-message       : com.atlantbh.jmeter.plugins.jsonutils.jsonpathextractor.JSONPathExtractor
08:12:22 [INFO] class               : org.apache.jorphan.collections.ListedHashTree
08:12:22 [INFO] required-type       : org.apache.jorphan.collections.ListedHashTree
08:12:22 [INFO] converter-type      : org.apache.jmeter.save.converters.HashTreeConverter
08:12:22 [INFO] path                : /jmeterTestPlan/hashTree/hashTree/hashTree[3]/hashTree/hashTree[6]/com.atlantbh.jmeter.plugins.jsonutils.jsonpathextractor.JSONPathExtractor
08:12:22 [INFO] line number         : 213
08:12:22 [INFO] ------------------------------- : com.atlantbh.jmeter.plugins.jsonutils.jsonpathextractor.JSONPathExtractor : com.atlantbh.jmeter.plugins.jsonutils.jsonpathextractor.JSONPathExtractor

 
So the "com.atlantbh.jmeter.plugins.jsonutils.jsonpathextractor.JSONPathExtractor" problem is still seen!! 

Should there be any more jars, or only this jmeter-plugins-charts-0.1.jar that is seen in the build log (also below)? 
...
  08:12:16 [INFO] --- jmeter-maven-plugin:2.0.3:configure (configure) @ NeedsloadTest ---
08:12:17 [INFO] Downloading: http://artifactory.nix.cydmodule.com/artifactory/repo/kg/apc/jmeter-plugins-charts/0.1/jmeter-plugins-charts-0.1.jar
08:12:19 [INFO] Downloaded: http://artifactory.nix.cydmodule.com/artifactory/repo/kg/apc/jmeter-plugins-charts/0.1/jmeter-plugins-charts-0.1.jar (69 KB at 30.0 KB/sec)
08:12:19 [INFO] -------------------------------------------------------
...

I don't see any json jars in the lib or lib/ext, except json-path and json-smart in lib/.

When I look in my local JMeter 3.0 Windows installation, I see jmeter-plugins-json-2.3 in lib/ext/.   


What can the problem be?


Thanks for support.

Regards
Richard


On Tuesday, August 9, 2016 at 3:02:48 PM UTC+2, Richard Olsson wrote:

Andrey Pokhilko

unread,
Aug 10, 2016, 3:21:11 AM8/10/16
to jmeter-...@googlegroups.com

If you run "mvn dependency:tree", will jmeter-plugins-json be there? If not, your dependency setup is wrong.

jmeter-plugins-charts has nothing to do with json, so don't look onto it.

Andrey Pokhilko

Richard Olsson

unread,
Aug 10, 2016, 4:00:58 AM8/10/16
to jmeter-plugins
Hi again,

Thanks for your support Andrey.

I don't find the jmeter-plugins-json in the tree output. See attached jmeter_tree file.


Or do you have any reference pom file with this jmeter-plugins-json support?


Thanks
Richard  


On Tuesday, August 9, 2016 at 3:02:48 PM UTC+2, Richard Olsson wrote:
maven_tree.txt

Andrey Pokhilko

unread,
Aug 10, 2016, 4:05:59 AM8/10/16
to jmeter-...@googlegroups.com

Hi,

Sorry, I don't have examples for you. You should ask the developer of jmeter-maven-plugin for advice, I have no knowledge what happens inside jmeter-maven-plugin.

Andrey Pokhilko

Richard Olsson

unread,
Aug 10, 2016, 4:15:32 AM8/10/16
to jmeter-plugins
Ok, thanks.

But if it's missing in the tree printout it's an pom issue, correct?

BR
Richard

On Tuesday, August 9, 2016 at 3:02:48 PM UTC+2, Richard Olsson wrote:

Andrey Pokhilko

unread,
Aug 10, 2016, 4:17:32 AM8/10/16
to jmeter-...@googlegroups.com

Most likely, yes. But I'm really not sure, 'cause I don't know what jmeter-maven-plugin does.

Andrey Pokhilko

Richard Olsson

unread,
Aug 10, 2016, 4:35:02 AM8/10/16
to jmeter-plugins
Ok, thanks for your support.
I'll check further.

// Richard


On Tuesday, August 9, 2016 at 3:02:48 PM UTC+2, Richard Olsson wrote:

irina...@gmail.com

unread,
Sep 2, 2016, 10:05:14 AM9/2/16
to jmeter-plugins
Hi Richard,

I'm seeing the same issue, wondering if you were able to resolve it.


Thank you.

Irina

jrlar...@gmail.com

unread,
Oct 27, 2016, 7:49:38 AM10/27/16
to jmeter-plugins
Hello,

I have followed this thread and after trying some of the options mentioned and follow the github instructions to include external jars under lib/ext I have not been able to resolve it yet. Has anyone found a solution?

Thank you in advance

Regards

Richard Olsson

unread,
Dec 20, 2016, 3:17:50 AM12/20/16
to jmeter-plugins, jrlar...@gmail.com
Hi,

Gave up this several months ago. But have some plans to give it a try again. But I'm not so positive. Hope I'm just negative...  :-)
Not sure if it's related, but got some feedback here,


Regards
Richard

Richard Olsson

unread,
Dec 21, 2016, 3:27:28 AM12/21/16
to jmeter-plugins, jrlar...@gmail.com
Hi,

As I told before. I did never get it to work completely with the 2.0.3 jmeter-maven-plugin. I'm not sure where I got stuck at the end...
I think this workaround worked actually, but not 100%. To get some jar file in the right place. 
But no guarantees...

// Richard

---------------------------
 <build>
        <plugins>
<plugin>
   <groupId>org.apache.maven.plugins</groupId>
       <artifactId>maven-antrun-plugin</artifactId>
   <version>1.1</version>
       <executions>
         <execution>
    <phase>test</phase>
       <goals>
         <goal>run</goal>
       </goals>
         <configuration>
           <tasks>
             <echo>Copying jmeter maven json jar file</echo>
     <copy file="jmeter-plugins-json-2.3.jar" tofile="target/jmeter/lib/ext/jmeter-plugins-json-2.3.jar"/>
           </tasks>
         </configuration>
  </execution>
</executions>
</plugin>

------------------------
Reply all
Reply to author
Forward
0 new messages