Jmeter: java.util.MissingResourceException resolved

Case

Jmeter stress test grpc api run in remote server

Operate

./jmeter -n -t 2.5.0_GRPC_AiBroker_Send_Demo_0801.jmx -l report//06.jtl -j report//06.log

Exception

java.util.MissingResourceException: Can't find bundle for base name org.jmeter.grpc.client.GrpcClientSamplerResources, locale en_EN

Log

2019-08-14 13:56:59,505 INFO o.a.j.JMeter: Creating summariser ‌‌2019-08-14 13:56:59,511 INFO o.a.j.e.StandardJMeterEngine: Running the test!‌‌2019-08-14 13:56:59,512 INFO o.a.j.s.SampleEvent: List of sample_variables: []‌‌2019-08-14 13:56:59,512 INFO o.a.j.s.SampleEvent: List of sample_variables: []‌‌2019-08-14 13:56:59,518 INFO o.a.j.e.u.CompoundVariable: Note: Function class names must contain the string: '.functions.'‌‌2019-08-14 13:56:59,519 INFO o.a.j.e.u.CompoundVariable: Note: Function class names must not contain the string: '.gui.'‌‌2019-08-14 13:56:59,907 INFO o.a.j.JMeter: Running test (1565762219906)‌‌2019-08-14 13:56:59,950 INFO o.a.j.e.StandardJMeterEngine: Starting ThreadGroup: 1 : 线程组‌‌2019-08-14 13:56:59,950 INFO o.a.j.e.StandardJMeterEngine: Starting 5 threads for group 线程组.‌‌2019-08-14 13:56:59,950 INFO o.a.j.e.StandardJMeterEngine: Thread will continue on error‌‌2019-08-14 13:56:59,950 INFO o.a.j.t.ThreadGroup: Starting thread group... number=1 threads=5 ramp-up=1 delayedStart=false‌‌2019-08-14 13:56:59,954 INFO o.j.g.c.GrpcClientSampler: Created org.jmeter.grpc.client.GrpcClientSampler@41c3f49c‌‌2019-08-14 13:56:59,955 INFO o.j.g.c.GrpcClientSampler: Created org.jmeter.grpc.client.GrpcClientSampler@1a18d5cf‌‌2019-08-14 13:56:59,957 INFO o.j.g.c.GrpcClientSampler: Created org.jmeter.grpc.client.GrpcClientSampler@28bd1857‌‌2019-08-14 13:56:59,958 INFO o.a.j.t.JMeterThread: Thread started: 线程组 1-1‌‌2019-08-14 13:56:59,959 INFO o.j.g.c.GrpcClientSampler: Created org.jmeter.grpc.client.GrpcClientSampler@6a98be57‌‌2019-08-14 13:56:59,959 INFO o.j.g.c.GrpcClientSampler: Created org.jmeter.grpc.client.GrpcClientSampler@8ac6eb5‌‌2019-08-14 13:56:59,960 INFO o.a.j.t.ThreadGroup: Started thread group number 1‌‌2019-08-14 13:56:59,960 INFO o.a.j.e.StandardJMeterEngine: All thread groups have been started‌‌2019-08-14 13:57:00,043 WARN o.a.j.t.BeanInfoSupport: Localized strings not available for bean class org.jmeter.grpc.client.GrpcClientSampler‌‌java.util.MissingResourceException: Can't find bundle for base name org.jmeter.grpc.client.GrpcClientSamplerResources, locale en_EN‌‌at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:1573) ~[?:1.8.0_181]‌‌at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1396) ~[?:1.8.0_181]‌‌at java.util.ResourceBundle.getBundle(ResourceBundle.java:854) ~[?:1.8.0_181]‌‌at org.apache.jmeter.testbeans.BeanInfoSupport.(BeanInfoSupport.java:125) [ApacheJMeter_core.jar:5.1.1 r1855137]‌‌at org.jmeter.grpc.client.GrpcClientSamplerBeanInfo.(GrpcClientSamplerBeanInfo.java:10) [grpc-client-sampler.jar:?]‌‌at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [?:1.8.0_181]‌‌at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) [?:1.8.0_181]‌‌at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) [?:1.8.0_181]‌‌at java.lang.reflect.Constructor.newInstance(Constructor.java:423) [?:1.8.0_181]‌‌at java.lang.Class.newInstance(Class.java:442) [?:1.8.0_181]‌‌at com.sun.beans.finder.InstanceFinder.instantiate(InstanceFinder.java:96) [?:1.8.0_181]‌‌at com.sun.beans.finder.InstanceFinder.find(InstanceFinder.java:66) [?:1.8.0_181]‌‌at java.beans.Introspector.findExplicitBeanInfo(Introspector.java:448) [?:1.8.0_181]‌‌at java.beans.Introspector.(Introspector.java:398) [?:1.8.0_181]‌‌at java.beans.Introspector.getBeanInfo(Introspector.java:173) [?:1.8.0_181]‌‌at org.apache.jmeter.testbeans.TestBeanHelper.prepare(TestBeanHelper.java:66) [ApacheJMeter_core.jar:5.1.1 r1855137]‌‌at org.apache.jmeter.threads.JMeterThread.doSampling(JMeterThread.java:609) [ApacheJMeter_core.jar:5.1.1 r1855137]‌‌at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:546) [ApacheJMeter_core.jar:5.1.1 r1855137]‌‌at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:486) [ApacheJMeter_core.jar:5.1.1 r1855137]‌‌at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:253) [ApacheJMeter_core.jar:5.1.1 r1855137]‌‌at java.lang.Thread.run(Thread.java:748) [?:1.8.0_181]‌‌2019-08-14 13:57:00,128 INFO o.j.g.c.GrpcClientSampler: sample‌‌2019-08-14 13:57:00,128 INFO o.j.g.c.GrpcClientSampler: initGrpcClient‌‌2019-08-14 13:57:00,155 INFO o.a.j.t.JMeterThread: Thread started: 线程组 1-2‌‌2019-08-14 13:57:00,156 INFO o.j.g.c.GrpcClientSampler: sample‌‌2019-08-14 13:57:00,156 INFO o.j.g.c.GrpcClientSampler: initGrpcClient‌‌2019-08-14 13:57:00,331 INFO o.j.g.c.GrpcClientSampler: grpcCallMethod‌‌2019-08-14 13:57:00,331 INFO o.j.g.c.GrpcClientSampler: grpcCallMethod‌‌2019-08-14 13:57:00,333 INFO o.a.j.s.SampleResult: Note: Sample TimeStamps are START times‌‌2019-08-14 13:57:00,333 INFO o.a.j.s.SampleResult: sampleresult.default.encoding is set to ISO-8859-1‌‌2019-08-14 13:57:00,333 INFO o.a.j.s.SampleResult: sampleresult.useNanoTime=true‌‌2019-08-14 13:57:00,333 INFO o.a.j.s.SampleResult: sampleresult.nanoThreadSleep=5000‌‌2019-08-14 13:57:00,351 INFO o.j.g.c.GrpcClientSampler: the channel info io.grpc.ClientInterceptors$InterceptorChannel@71bb51fd‌‌2019-08-14 13:57:00,351 INFO o.j.g.c.GrpcClientSampler: the channel info io.grpc.ClientInterceptors$InterceptorChannel@42386100‌‌2019-08-14 13:57:00,353 INFO o.a.j.t.JMeterThread: Thread started: 线程组 1-3‌‌2019-08-14 13:57:00,354 INFO o.j.g.c.GrpcClientSampler: sample‌‌2019-08-14 13:57:00,354 INFO o.j.g.c.GrpcClientSampler: initGrpcClient‌‌2019-08-14 13:57:00,369 INFO o.j.g.c.GrpcClientSampler: grpcCallMethod‌‌2019-08-14 13:57:00,369 INFO o.j.g.c.GrpcClientSampler: the channel info io.grpc.ClientInterceptors$InterceptorChannel@d7859f2‌‌2019-08-14 13:57:00,553 INFO o.a.j.t.JMeterThread: Thread started: 线程组 1-4

Analysis

GrpcClientSamplerResources.properties file not found in classes path throw the exeption

Resolve

plan a: put properties file in main/resources, then maven install to target/classes, but you need edit bundle get param the file name without .properties, that can resolved.

plan b: jmeter bundle code need *.properties in correct dir; then i try maven pom defined resources path and fail; then i try put file in resources as root resources, after maven install jar run, fail again in server. at last a handwork, open jar put .properties file in D:\apache-jmeter-5.1.1\lib\ext\grpc-client-sampler.jar\org\jmeter\grpc\client\, run jar in server again, success!

question

how to make main/java/package/.properties maven install to target/classes/package/.properties? (dont in classes/)