mderevyankoaqa / jmeter-influxdb2-listener-plugin

Influx DB v2.0 listener plugin for Apache JMeter. Provides the possibility to see the online dashboard (aggregation table, errors, the response body of failures).
Apache License 2.0
114 stars 40 forks source link

java.lang.NoSuchMethodError: 'okhttp3.HttpUrl okhttp3.HttpUrl.get(java.lang.String)' at retrofit2.Retrofit$Builder.baseUrl(Retrofit.java:506) ~[jmeter-plugin-influxdb2-listener-1.1.jar:task ':jar' property 'archiveVersion'] #16

Open dipakkumar1225 opened 3 years ago

dipakkumar1225 commented 3 years ago

OS: Windows 10 Enterprise Installed Java : 14 JMeter version: 5.4.1 InfluxDB version: 2.0.6 Grafana : grafana-7.5.5

2021-05-12 05:14:01,320 INFO o.a.j.e.StandardJMeterEngine: Running the test! 2021-05-12 05:14:01,321 INFO o.a.j.s.SampleEvent: List of sample_variables: [] 2021-05-12 05:14:01,322 INFO o.a.j.s.SampleEvent: List of sample_variables: [] 2021-05-12 05:14:01,323 INFO o.a.j.e.u.CompoundVariable: Note: Function class names must contain the string: '.functions.' 2021-05-12 05:14:01,323 INFO o.a.j.e.u.CompoundVariable: Note: Function class names must not contain the string: '.gui.' 2021-05-12 05:14:01,958 INFO o.a.j.v.b.BackendListener: Backend Listener: Starting worker with class: class org.md.jmeter.influxdb2.visualizer.InfluxDatabaseBackendListenerClient and queue capacity: 5000 2021-05-12 05:14:01,960 INFO o.a.j.v.b.BackendListener: Backend Listener: Started worker with class: class org.md.jmeter.influxdb2.visualizer.InfluxDatabaseBackendListenerClient 2021-05-12 05:14:01,985 ERROR o.a.j.JMeter: Uncaught exception in thread Thread[StandardJMeterEngine,6,main] java.lang.NoSuchMethodError: 'okhttp3.HttpUrl okhttp3.HttpUrl.get(java.lang.String)' at retrofit2.Retrofit$Builder.baseUrl(Retrofit.java:506) ~[jmeter-plugin-influxdb2-listener-1.1.jar:task ':jar' property 'archiveVersion'] at com.influxdb.client.internal.AbstractInfluxDBClient.(AbstractInfluxDBClient.java:96) ~[jmeter-plugin-influxdb2-listener-1.1.jar:task ':jar' property 'archiveVersion'] at com.influxdb.client.internal.InfluxDBClientImpl.(InfluxDBClientImpl.java:96) ~[jmeter-plugin-influxdb2-listener-1.1.jar:task ':jar' property 'archiveVersion'] at com.influxdb.client.InfluxDBClientFactory.create(InfluxDBClientFactory.java:204) ~[jmeter-plugin-influxdb2-listener-1.1.jar:task ':jar' property 'archiveVersion'] at com.influxdb.client.InfluxDBClientFactory.create(InfluxDBClientFactory.java:159) ~[jmeter-plugin-influxdb2-listener-1.1.jar:task ':jar' property 'archiveVersion'] at org.md.jmeter.influxdb2.visualizer.influxdb.client.InfluxDatabaseClient.setupInfluxClient(InfluxDatabaseClient.java:39) ~[jmeter-plugin-influxdb2-listener-1.1.jar:task ':jar' property 'archiveVersion'] at org.md.jmeter.influxdb2.visualizer.InfluxDatabaseBackendListenerClient.setupInfluxClient(InfluxDatabaseBackendListenerClient.java:233) ~[jmeter-plugin-influxdb2-listener-1.1.jar:task ':jar' property 'archiveVersion'] at org.md.jmeter.influxdb2.visualizer.InfluxDatabaseBackendListenerClient.setupTest(InfluxDatabaseBackendListenerClient.java:165) ~[jmeter-plugin-influxdb2-listener-1.1.jar:task ':jar' property 'archiveVersion'] at org.apache.jmeter.visualizers.backend.BackendListener.testStarted(BackendListener.java:325) ~[ApacheJMeter_components.jar:5.4.1] at org.apache.jmeter.visualizers.backend.BackendListener.testStarted(BackendListener.java:280) ~[ApacheJMeter_components.jar:5.4.1] at org.apache.jmeter.engine.StandardJMeterEngine.notifyTestListenersOfStart(StandardJMeterEngine.java:205) ~[ApacheJMeter_core.jar:5.4.1] at org.apache.jmeter.engine.StandardJMeterEngine.run(StandardJMeterEngine.java:382) ~[ApacheJMeter_core.jar:5.4.1] at java.lang.Thread.run(Thread.java:832) [?:?]

image

nishantkavuru commented 3 years ago

I am also facing the same issue.

2021-05-14 00:18:27,096 INFO o.a.j.v.b.BackendListener: Backend Listener: Starting worker with class: class org.lacework.jmeter.InfluxDatabaseBackendListenerClient and queue capacity: 5000 2021-05-14 00:18:27,097 INFO o.a.j.v.b.BackendListener: Backend Listener: Started worker with class: class org.lacework.jmeter.InfluxDatabaseBackendListenerClient 2021-05-14 00:18:27,113 ERROR o.a.j.JMeter: Uncaught exception in thread Thread[StandardJMeterEngine,6,main] java.lang.NoSuchMethodError: okhttp3.HttpUrl.get(Ljava/lang/String;)Lokhttp3/HttpUrl; at retrofit2.Retrofit$Builder.baseUrl(Retrofit.java:506) ~[Jmeter-InfluxDB-Writer-Latest-1.0-jar-with-dependencies.jar:?] at com.influxdb.client.internal.AbstractInfluxDBClient.(AbstractInfluxDBClient.java:96) ~[Jmeter-InfluxDB-Writer-Latest-1.0-jar-with-dependencies.jar:?] at com.influxdb.client.internal.InfluxDBClientImpl.(InfluxDBClientImpl.java:96) ~[Jmeter-InfluxDB-Writer-Latest-1.0-jar-with-dependencies.jar:?] at com.influxdb.client.InfluxDBClientFactory.create(InfluxDBClientFactory.java:204) ~[Jmeter-InfluxDB-Writer-Latest-1.0-jar-with-dependencies.jar:?] at com.influxdb.client.InfluxDBClientFactory.create(InfluxDBClientFactory.java:159) ~[Jmeter-InfluxDB-Writer-Latest-1.0-jar-with-dependencies.jar:?]

The root cause for this error is. - influxdb-client uses okhttp version 4.7.2 -- By default jmeter has 3.10.0 in the lib folder. when we put this plugin in the ext and try to run the jmeter, it is pointing it to the 3.10.0 jar which has no such method and throwing the exception. So need to see how we can force the plugin to use only the 4.7.2 version in the Jmeter which is part of it.

mderevyankoaqa commented 3 years ago

Hi @dipakkumar1225 , @nishantkavuru please try to remove other listeners you have in the lib folder, it can be the issue in the Java runtime. Please leave only influxdb2 listener.

BR, Mike

nishantkavuru commented 3 years ago

@mderevyankoaqa

I don't have any other listeners. As i mentioned earlier this is the cause,

The root cause for this error is. - influxdb-client uses okhttp version 4.7.2 -- By default jmeter has 3.10.0 in the lib folder. when we put this plugin in the ext and try to run the jmeter, it is pointing it to the 3.10.0 jar which has no such method and throwing the exception. So need to see how we can force the plugin to use only the 4.7.2 version in the Jmeter which is part of it.

mderevyankoaqa commented 3 years ago

@nishantkavuru, got you.. need to take a look thanks.. but do not understand why it's working for me and others for the similar infrastructure.

BR, Mike

mderevyankoaqa commented 3 years ago

@dipakkumar1225

The example of one of the env. which is working fine. Have a lot of work, need to spare time for the investigation.

image image C:\apache-jmeter-5.4.1\apache-jmeter-5.4.1\lib>dir Volume in drive C has no label. Volume Serial Number is D693-047F

Directory of C:\apache-jmeter-5.4.1\apache-jmeter-5.4.1\lib

02/17/2021 04:06 PM

. 02/17/2021 04:06 PM .. 02/17/2021 04:03 PM 30,035 accessors-smart-1.2.jar 02/17/2021 04:03 PM 2,387 apiguardian-api-1.1.0.jar 02/17/2021 04:03 PM 121,783 asm-9.0.jar 02/17/2021 04:03 PM 113,369 bsf-2.4.0.jar 02/17/2021 04:03 PM 389,033 bsh-2.0b6.jar 02/17/2021 04:03 PM 8,008 bshclient.jar 02/17/2021 04:03 PM 921,827 caffeine-2.8.8.jar 02/17/2021 04:03 PM 230,905 checker-qual-3.8.0.jar 02/17/2021 04:06 PM 10,323 cmdrunner-2.2.jar 02/17/2021 04:03 PM 353,793 commons-codec-1.15.jar 02/17/2021 04:03 PM 588,337 commons-collections-3.2.2.jar 02/17/2021 04:03 PM 751,914 commons-collections4-4.4.jar 02/17/2021 04:03 PM 207,774 commons-dbcp2-2.8.0.jar 02/17/2021 04:03 PM 285,424 commons-io-2.8.0.jar 02/17/2021 04:03 PM 267,634 commons-jexl-2.1.1.jar 02/17/2021 04:03 PM 397,422 commons-jexl3-3.1.jar 02/17/2021 04:03 PM 577,742 commons-lang3-3.11.jar 02/17/2021 04:03 PM 61,829 commons-logging-1.2.jar 02/17/2021 04:03 PM 2,213,560 commons-math3-3.6.1.jar 02/17/2021 04:03 PM 307,003 commons-net-3.7.2.jar 02/17/2021 04:03 PM 134,858 commons-pool2-2.9.0.jar 02/17/2021 04:03 PM 216,211 commons-text-1.9.jar 02/17/2021 04:03 PM 1,556,912 darklaf-core-2.5.4.jar 02/17/2021 04:03 PM 20,650 darklaf-extensions-rsyntaxarea-0.3.4.jar 02/17/2021 04:03 PM 33,687 darklaf-macos-2.5.4.jar 02/17/2021 04:03 PM 6,204 darklaf-native-utils-2.5.4.jar 02/17/2021 04:03 PM 3,243 darklaf-platform-base-2.5.4.jar 02/17/2021 04:03 PM 74,932 darklaf-property-loader-2.5.4.jar 02/17/2021 04:03 PM 87,738 darklaf-theme-2.5.4.jar 02/17/2021 04:03 PM 46,878 darklaf-utils-2.5.4.jar 02/17/2021 04:03 PM 336,136 darklaf-windows-2.5.4.jar 02/17/2021 04:03 PM 98,115 dec-0.1.2.jar 02/17/2021 04:03 PM 320,748 dnsjava-2.1.9.jar 02/17/2021 04:03 PM 13,854 error_prone_annotations-2.4.0.jar 04/02/2021 07:43 PM ext 02/17/2021 04:03 PM 1,702,975 freemarker-2.3.30.jar 02/17/2021 04:03 PM 32,359 geronimo-jms_1.1_spec-1.1.1.jar 02/17/2021 04:03 PM 7,949,743 groovy-3.0.7.jar 02/17/2021 04:03 PM 19,457 groovy-datetime-3.0.7.jar 02/17/2021 04:03 PM 11,684 groovy-dateutil-3.0.7.jar 02/17/2021 04:03 PM 137,461 groovy-jmx-3.0.7.jar 02/17/2021 04:03 PM 133,034 groovy-json-3.0.7.jar 02/17/2021 04:03 PM 21,294 groovy-jsr223-3.0.7.jar 02/17/2021 04:03 PM 82,930 groovy-sql-3.0.7.jar 02/17/2021 04:03 PM 97,065 groovy-templates-3.0.7.jar 02/17/2021 04:03 PM 292,540 groovy-xml-3.0.7.jar 02/17/2021 04:03 PM 123,360 hamcrest-2.2.jar 02/17/2021 04:03 PM 1,499 hamcrest-core-2.2.jar 02/17/2021 04:03 PM 104,518 hamcrest-date-2.0.7.jar 02/17/2021 04:03 PM 179,964 httpasyncclient-4.1.4.jar 02/17/2021 04:03 PM 778,156 httpclient-4.5.12.jar 02/17/2021 04:03 PM 328,593 httpcore-4.4.13.jar 02/17/2021 04:03 PM 369,320 httpcore-nio-4.4.13.jar 02/17/2021 04:03 PM 41,792 httpmime-4.5.12.jar 02/17/2021 04:03 PM 68,080 jackson-annotations-2.10.5.jar 02/17/2021 04:03 PM 349,331 jackson-core-2.10.5.jar 02/17/2021 04:03 PM 1,404,939 jackson-databind-2.10.5.jar 02/17/2021 04:03 PM 78,030 javax.activation-1.2.0.jar 02/17/2021 04:03 PM 142,391 jcharts-0.7.5.jar 02/17/2021 04:03 PM 16,537 jcl-over-slf4j-1.7.30.jar 02/17/2021 04:03 PM 490,565 jmespath-core-0.5.0.jar 02/17/2021 04:03 PM 7,041 jmespath-jackson-0.5.0.jar 02/17/2021 04:06 PM 211,778 jmeter-plugins-cmn-jmeter-0.6.jar 02/17/2021 04:03 PM 1,506,993 jna-5.5.0.jar 02/17/2021 04:03 PM 403,497 jodd-core-5.0.13.jar 02/17/2021 04:03 PM 220,475 jodd-lagarto-5.0.13.jar 02/17/2021 04:03 PM 19,858 jodd-log-5.0.13.jar 02/17/2021 04:03 PM 26,047 jodd-props-5.0.13.jar 02/17/2021 04:03 PM 172,010 jorphan.jar 02/17/2021 04:06 PM 159,123 json-lib-2.4-jdk15.jar 02/17/2021 04:03 PM 223,186 json-path-2.4.0.jar 02/17/2021 04:03 PM 120,316 json-smart-2.3.jar 02/17/2021 04:03 PM 393,851 jsoup-1.13.1.jar 02/17/2021 04:03 PM 249,924 jtidy-r938.jar 02/17/2021 04:03 PM junit 02/17/2021 04:03 PM 382,708 junit-4.13.1.jar 02/17/2021 04:03 PM 48,483 jxlayer-3.0.4.jar 02/17/2021 04:03 PM 201,685 log4j-1.2-api-2.13.3.jar 02/17/2021 04:03 PM 292,301 log4j-api-2.13.3.jar 02/17/2021 04:03 PM 1,714,164 log4j-core-2.13.3.jar 02/17/2021 04:03 PM 23,590 log4j-slf4j-impl-2.13.3.jar 02/17/2021 04:03 PM 519,087 mail-1.5.0-b01.jar 02/17/2021 04:03 PM 106,939 miglayout-core-5.2.jar 02/17/2021 04:03 PM 22,390 miglayout-swing-5.2.jar 02/17/2021 04:03 PM 419,054 mongo-java-driver-2.11.3.jar 02/17/2021 04:03 PM 4,580,832 neo4j-java-driver-4.2.0.jar 02/17/2021 04:03 PM 65,261 oro-2.0.8.jar 02/17/2021 04:03 PM 1,302,550 ph-commons-9.5.1.jar 02/17/2021 04:03 PM 506,329 ph-css-6.2.3.jar 02/17/2021 04:03 PM 11,369 reactive-streams-1.0.3.jar 02/17/2021 04:03 PM 1,315,838 rhino-1.7.13.jar 02/17/2021 04:03 PM 1,196,575 rsyntaxtextarea-3.1.1.jar 02/17/2021 04:03 PM 5,506,669 Saxon-HE-9.9.1-8.jar 02/17/2021 04:03 PM 276,420 serializer-2.7.2.jar 02/17/2021 04:03 PM 41,472 slf4j-api-1.7.30.jar 02/17/2021 04:03 PM 301,161 svgSalamander-1.1.2.3.jar 02/17/2021 04:03 PM 708,157 tika-core-1.24.1.jar 02/17/2021 04:03 PM 1,336,431 tika-parsers-1.24.1.jar 02/17/2021 04:03 PM 3,154,938 xalan-2.7.2.jar 02/17/2021 04:03 PM 1,386,397 xercesImpl-2.12.0.jar 02/17/2021 04:03 PM 220,536 xml-apis-1.4.01.jar 02/17/2021 04:03 PM 671,727 xmlgraphics-commons-2.3.jar 02/17/2021 04:03 PM 7,188 xmlpull-1.1.3.1.jar 02/17/2021 04:03 PM 24,956 xpp3_min-1.1.4c.jar 02/17/2021 04:03 PM 627,848 xstream-1.4.15.jar 103 File(s) 56,435,039 bytes 4 Dir(s) 29,711,044,608 bytes free

BR, Mike

alexkorotysh commented 3 years ago

It works with com.squareup.okhttp3:okhttp:3.12.13

- name: Install okhttp
  get_url:
    url: https://repo1.maven.org/maven2/com/squareup/okhttp3/okhttp/3.12.13/okhttp-3.12.13.jar
    dest: "{{ JMETER_HOME }}/lib/okhttp-3.12.13.jar"
    mode: '0644'
alexkorotysh commented 3 years ago

I just say that I faced with this issue with fresh Linux installation 5.4.1. The issue was resolved with this fix. I want to say thx for your repo and you time and good tool!

kodjobaah commented 2 years ago

I am having the same problem..
I also put the following jars in the lib directly:

Saxon-HE-9.9.1-8.jar
accessors-smart-1.2.jar
annotations-13.0.jar
apiguardian-api-1.1.0.jar
converter-gson-2.9.0.jar
converter-scalars-2.9.0.jar
gson-2.8.6.jar
gson-fire-1.8.4.jar
influxdb-client-core-3.2.0.jar
influxdb-client-java-3.2.0.jar
jsr305-3.0.2.jar
kotlin-stdlib-1.3.71.jar
kotlin-stdlib-common-1.3.71.jar
logging-interceptor-4.7.2.jar
okhttp-4.7.2.jar
okio-jvm-2.6.0.jar
retrofit-2.9.0.jar
rxjava-2.2.19.jar
swagger-annotations-1.6.1.jar

Screenshot 2021-10-21 at 12 12 49

mderevyankoaqa commented 2 years ago

Hi @dipakkumar1225 ,

Can you try this build https://drive.google.com/file/d/1yRXvzYpMSBsZt6nW1x6sq3YPV0vYpClr/view?usp=sharing

and let me know the result, since I have no infrastructure to test.. I have no issues on my Windows 10, and Centos.

BR, Mike

ghost commented 2 years ago

@mderevyankoaqa I have same result with version from this link: https://drive.google.com/file/d/1yRXvzYpMSBsZt6nW1x6sq3YPV0vYpClr/view?usp=sharing and with okhttp-3.12.13.jar. OS: ubuntu focal. java.lang.NoSuchMethodError: 'okhttp3.MediaType okhttp3.MediaType.get(java.lang.String)' at retrofit2.converter.scalars.ScalarRequestBodyConverter.<clinit>(ScalarRequestBodyConverter.java:25) ~[jmeter-plugin-influxdb2-listener-1.4-all.jar:task ':jar' property 'archiveVersion'] at retrofit2.converter.scalars.ScalarsConverterFactory.requestBodyConverter(ScalarsConverterFactory.java:69) ~[jmeter-plugin-influxdb2-listener-1.4-all.jar:task ':jar' property 'archiveVersion'] at retrofit2.Retrofit.nextRequestBodyConverter(Retrofit.java:277) ~[JMeter-InfluxDB-Writer-plugin-1.3.0.jar:1.3.0] at retrofit2.Retrofit.requestBodyConverter(Retrofit.java:258) ~[JMeter-InfluxDB-Writer-plugin-1.3.0.jar:1.3.0] at retrofit2.ServiceMethod$Builder.parseParameterAnnotation(ServiceMethod.java:678) ~[JMeter-InfluxDB-Writer-plugin-1.3.0.jar:1.3.0] at retrofit2.ServiceMethod$Builder.parseParameter(ServiceMethod.java:333) ~[JMeter-InfluxDB-Writer-plugin-1.3.0.jar:1.3.0] at retrofit2.ServiceMethod$Builder.build(ServiceMethod.java:202) ~[JMeter-InfluxDB-Writer-plugin-1.3.0.jar:1.3.0] at retrofit2.Retrofit.loadServiceMethod(Retrofit.java:166) ~[JMeter-InfluxDB-Writer-plugin-1.3.0.jar:1.3.0] at retrofit2.Retrofit$1.invoke(Retrofit.java:145) ~[JMeter-InfluxDB-Writer-plugin-1.3.0.jar:1.3.0] at com.sun.proxy.$Proxy29.postWrite(Unknown Source) ~[?:?] at com.influxdb.client.internal.AbstractWriteBlockingClient.write(AbstractWriteBlockingClient.java:81) ~[jmeter-plugin-influxdb2-listener-1.4-all.jar:task ':jar' property 'archiveVersion'] at com.influxdb.client.internal.WriteApiBlockingImpl.lambda$writePoints$1(WriteApiBlockingImpl.java:137) ~[jmeter-plugin-influxdb2-listener-1.4-all.jar:task ':jar' property 'archiveVersion'] at java.util.LinkedHashMap.forEach(LinkedHashMap.java:684) ~[?:?] at com.influxdb.client.internal.WriteApiBlockingImpl.writePoints(WriteApiBlockingImpl.java:137) ~[jmeter-plugin-influxdb2-listener-1.4-all.jar:task ':jar' property 'archiveVersion'] at com.influxdb.client.internal.WriteApiBlockingImpl.writePoints(WriteApiBlockingImpl.java:121) ~[jmeter-plugin-influxdb2-listener-1.4-all.jar:task ':jar' property 'archiveVersion'] at org.md.jmeter.influxdb2.visualizer.influxdb.client.InfluxDatabaseClient.importData(InfluxDatabaseClient.java:115) ~[jmeter-plugin-influxdb2-listener-1.4-all.jar:task ':jar' property 'archiveVersion'] at org.md.jmeter.influxdb2.visualizer.InfluxDatabaseBackendListenerClient$1.run(InfluxDatabaseBackendListenerClient.java:312) ~[jmeter-plugin-influxdb2-listener-1.4-all.jar:task ':jar' property 'archiveVersion'] at java.util.TimerThread.mainLoop(Timer.java:556) ~[?:?] at java.util.TimerThread.run(Timer.java:506) ~[?:?]

ghost commented 2 years ago

I resolved it with fresh jmeter install and with https://repo1.maven.org/maven2/com/squareup/okhttp3/okhttp/3.12.13/okhttp-3.12.13.jar file in lib directory.

mderevyankoaqa commented 2 years ago

@mu-samoylov, got you, thanks.

Can you please share what software you had:

For example, I have been working with CentOS and red hat (no UI) - haven't faced ..

BR, Mike