zalopay-oss / jmeter-grpc-plugin

A JMeter plugin supports load test gRPC
Apache License 2.0
42 stars 23 forks source link

error on init #15

Closed dina304 closed 3 years ago

dina304 commented 3 years ago

Hi i get the follow error on connection to my grpc server :

java.lang.NoClassDefFoundError: scalapb/GeneratedMessage at java.lang.ClassLoader.defineClass1(Native Method) ~[?:1.8.0_251] at java.lang.ClassLoader.defineClass(ClassLoader.java:756) ~[?:1.8.0_251] at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) ~[?:1.8.0_251] at java.net.URLClassLoader.defineClass(URLClassLoader.java:468) ~[?:1.8.0_251] at java.net.URLClassLoader.access$100(URLClassLoader.java:74) ~[?:1.8.0_251] at java.net.URLClassLoader$1.run(URLClassLoader.java:369) ~[?:1.8.0_251] at java.net.URLClassLoader$1.run(URLClassLoader.java:363) ~[?:1.8.0_251] at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_251] at java.net.URLClassLoader.findClass(URLClassLoader.java:362) ~[?:1.8.0_251] at java.lang.ClassLoader.loadClass(ClassLoader.java:418) ~[?:1.8.0_251] at java.lang.ClassLoader.loadClass(ClassLoader.java:351) ~[?:1.8.0_251] at java.lang.Class.getDeclaredMethods0(Native Method) ~[?:1.8.0_251] at java.lang.Class.privateGetDeclaredMethods(Class.java:2701) ~[?:1.8.0_251] at java.lang.Class.privateGetMethodRecursive(Class.java:3048) ~[?:1.8.0_251] at java.lang.Class.getMethod0(Class.java:3018) ~[?:1.8.0_251] at java.lang.Class.getMethod(Class.java:1784) ~[?:1.8.0_251] at vn.zalopay.jmeter.grpc.utils.GrpcUtils.getBlockingStub(GrpcUtils.java:184) ~[jmeter-grpc-client-sampler.jar:?] at vn.zalopay.jmeter.grpc.client.GrpcClientSampler.initGrpcClient(GrpcClientSampler.java:80) ~[jmeter-grpc-client-sampler.jar:?] at vn.zalopay.jmeter.grpc.client.GrpcClientSampler.sample(GrpcClientSampler.java:92) ~[jmeter-grpc-client-sampler.jar:?] at org.apache.jmeter.threads.JMeterThread.doSampling(JMeterThread.java:630) ~[ApacheJMeter_core.jar:5.3] at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:558) ~[ApacheJMeter_core.jar:5.3] at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:489) ~[ApacheJMeter_core.jar:5.3] at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:256) ~[ApacheJMeter_core.jar:5.3] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_251] Caused by: java.lang.ClassNotFoundException: scalapb.GeneratedMessage at java.net.URLClassLoader.findClass(URLClassLoader.java:382) ~[?:1.8.0_251] at java.lang.ClassLoader.loadClass(ClassLoader.java:418) ~[?:1.8.0_251] at java.lang.ClassLoader.loadClass(ClassLoader.java:351) ~[?:1.8.0_251] ... 24 more

thoainguyen commented 3 years ago

Hi @dina304, can you help me see the jmx file and proto file?

dina304 commented 3 years ago

Hi @thoainguyen both jmx and proto attached its simple helloworld example (file extension need to be changed) hello_jmx.txt

helloworld_proto.txt

dina304 commented 3 years ago

this finaly worked my mistake was that i generated proto code with scala extension instead of java extension

dina304 commented 3 years ago