jmeter-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 62938] New: JSR223 Sampler in jmeter5.0 mongodb3.0 connect questions
Date Thu, 22 Nov 2018 04:57:35 GMT
https://bz.apache.org/bugzilla/show_bug.cgi?id=62938

            Bug ID: 62938
           Summary: JSR223 Sampler  in jmeter5.0 mongodb3.0 connect
                    questions
           Product: JMeter
           Version: 5.0
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HTTP
          Assignee: issues@jmeter.apache.org
          Reporter: liwei@inhand.com.cn
  Target Milestone: JMETER_5.1

add mongo-java-driver-3.9.0.jar /lib/ext
jsr223 scprits:
import com.mongodb.*
import com.mongodb.MongoCredential
import com.mongodb.BasicDBObject
MongoCredential coreCredential =MongoCredential.createCredential("admin",
"admin", "admin".toCharArray());
MongoClient coreMongoClient = new MongoClient(new ServerAddress("${ServerIp}",
27017), Arrays.asList(coreCredential));

error:

javax.script.ScriptException: groovy.lang.MissingMethodException: No signature
of method: static com.mongodb.MongoCredential.createCredential() is applicable
for argument types: (java.lang.String, java.lang.String, [C) values: [admin,
admin, admin]
        at
org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:320)
~[groovy-all-2.4.10.jar:2.4.10]
        at
org.codehaus.groovy.jsr223.GroovyCompiledScript.eval(GroovyCompiledScript.java:72)
~[groovy-all-2.4.10.jar:2.4.10]
        at javax.script.CompiledScript.eval(Unknown Source) ~[?:1.8.0_131]
        at
org.apache.jmeter.util.JSR223TestElement.processFileOrScript(JSR223TestElement.java:221)
~[ApacheJMeter_core.jar:5.0 r1840935]
        at
org.apache.jmeter.protocol.java.sampler.JSR223Sampler.sample(JSR223Sampler.java:71)
[ApacheJMeter_java.jar:5.0 r1840935]
        at
org.apache.jmeter.threads.JMeterThread.doSampling(JMeterThread.java:622)
[ApacheJMeter_core.jar:5.0 r1840935]
        at
org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:546)
[ApacheJMeter_core.jar:5.0 r1840935]
        at
org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:486)
[ApacheJMeter_core.jar:5.0 r1840935]
        at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:253)
[ApacheJMeter_core.jar:5.0 r1840935]
        at java.lang.Thread.run(Unknown Source) [?:1.8.0_131]
Caused by: groovy.lang.MissingMethodException: No signature of method: static
com.mongodb.MongoCredential.createCredential() is applicable for argument
types: (java.lang.String, java.lang.String, [C) values: [admin, admin, admin]
        at
groovy.lang.MetaClassImpl.invokeStaticMissingMethod(MetaClassImpl.java:1506)
~[groovy-all-2.4.10.jar:2.4.10]
        at
groovy.lang.MetaClassImpl.invokeStaticMethod(MetaClassImpl.java:1492)
~[groovy-all-2.4.10.jar:2.4.10]
        at
org.codehaus.groovy.runtime.callsite.StaticMetaClassSite.call(StaticMetaClassSite.java:53)
~[groovy-all-2.4.10.jar:2.4.10]
        at
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
~[groovy-all-2.4.10.jar:2.4.10]
        at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
~[groovy-all-2.4.10.jar:2.4.10]
        at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:141)
~[groovy-all-2.4.10.jar:2.4.10]
        at Script22.run(Script22.groovy:4) ~[?:?]
        at
org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:317)
~[groovy-all-2.4.10.jar:2.4.10]
        ... 9 more


but, in jmeter3.2 that's ok

-- 
You are receiving this mail because:
You are the assignee for the bug.
Mime
View raw message