0

I refer to this tutorial https://blazemeter.com/blog/websocket-testing-apache-jmeter

I run websocket java in jmeter ,but jmeter log responsed like this -

jmeter.JMeter: Uncaught exception: java.lang.NoClassDefFoundError: javax / websocket / CloseReason $ CloseCode

I do not know how to solve this problem ? Stacktrace Thanks in advance!

KittMedia
  • 7,368
  • 13
  • 34
  • 38
blue
  • 217
  • 6
  • 18

1 Answers1

0

Any "NoClassDefFoundError" usually means that either you don't have the relevant .jar in JMeter classpath or you haven't restarted JMeter after dropping the .jar into its lib or lib/ext folder.

I would suggest the following:

  1. Get the latest JMeter version (it is 3.0 at the moment)
  2. Install JMeter Plugins Manager
  3. Install WebSocket Sampler via the plugins manager

If you're trying to run JMeter via JSR223 Sampler and Java code example - the same, make sure Tyrus libraries are in JMeter classpath and JMeter is restarted after that.

Dmitri T
  • 159,985
  • 5
  • 83
  • 133