Search code examples
groovyjmeternimbus-jose-jwt

Jmeter does not accept nimbus jose jwt


I'm using Nimbus-jose-jwt 9.37.3 jar on jmeter. Pushed the jar to */lib/ then */lib/ext then /opt/homebrew/Cellar/jmeter/5.6.3/libexec/lib then /opt/homebrew/Cellar/jmeter/5.6.3/libexec/lib/ext. But when I try to compile the file in Groovy script, it doesn't accept the jar file (return as class missing). Other Jar file still works as normal.

unable to resolve class com.nimbusds.jose.JOSEException
unable to resolve class com.nimbusds.jose.JWK

Is there a way I can work around on this? Any help would be appreciate.


Solution

    1. For nimbus-jose-jwt-9.37.3.jar

      com.nimbusds.jose.JWK should be

      com.nimbusds.jose.jwk.JWK

    2. Don't forget to restart JMeter after amending anything in JMeter Classpath

    3. Make sure that your libexec dir location is correct

    More information on Groovy scripting in JMeter: Apache Groovy: What Is Groovy Used For?