I am trying to connect to mongodb using JSR 223 sampler with groovy. THe signature looks completely fine and The script works fine in JMETER. But it throws error while executing it through maven. Below is the code:
==================
MongoCredential mongoCredential = MongoCredential.createScramSha1Credential("PIDPCR","adm",'pRU6Ref'.toCharArray()); coreMongoClient = new MongoClient(new ServerAddress("${addr}", 27017),Arrays.asList(mongoCredential));
=================
Below is the error thrown:
javax.script.ScriptException: javax.script.ScriptException: groovy.lang.MissingMethodException: No signature of method: static com.mongodb.MongoCredential.createScramSha1Credential() is applicable for argument types: (java.lang.String, java.lang.String, [C) values: