kloadgen: setSchemaRegistryProperties method exception

I got this issue

net.coru.kloadgen.config.schemaregistry.SchemaRegistryConfigElement#setSchemaRegistryProperties(LinkedList [PropertyMapping(propertyName=schema.registry.auth.enabled, propertyValue=NO), PropertyMapping(propertyName=schema.registry.auth.method, propertyValue=BASIC), PropertyMapping(propertyName=schema.registry.username, propertyValue=<username>), PropertyMapping(propertyName=schema.registry.password, propertyValue=<password>), PropertyMapping(propertyName=schema.registry.bearer, propertyValue=<bearer>)]

and this is the detail.

java.lang.Error: This should never happen. Tried to invoke:
net.coru.kloadgen.config.schemaregistry.SchemaRegistryConfigElement#setSchemaRegistryProperties(LinkedList [PropertyMapping(propertyName=schema.registry.auth.enabled, propertyValue=NO), PropertyMapping(propertyName=schema.registry.auth.method, propertyValue=BASIC), PropertyMapping(propertyName=schema.registry.username, propertyValue=<username>), PropertyMapping(propertyName=schema.registry.password, propertyValue=<password>), PropertyMapping(propertyName=schema.registry.bearer, propertyValue=<bearer>)] )
	at org.apache.jmeter.testbeans.TestBeanHelper.invokeOrBailOut(TestBeanHelper.java:169) ~[ApacheJMeter_core.jar:5.2.1]
	at org.apache.jmeter.testbeans.TestBeanHelper.prepare(TestBeanHelper.java:97) ~[ApacheJMeter_core.jar:5.2.1]
	at org.apache.jmeter.threads.TestCompiler.trackIterationListeners(TestCompiler.java:183) ~[ApacheJMeter_core.jar:5.2.1]
	at org.apache.jmeter.threads.TestCompiler.subtractNode(TestCompiler.java:137) ~[ApacheJMeter_core.jar:5.2.1]
	at org.apache.jorphan.collections.HashTree.traverseInto(HashTree.java:998) ~[jorphan.jar:5.2.1]
	at org.apache.jorphan.collections.HashTree.traverseInto(HashTree.java:995) ~[jorphan.jar:5.2.1]
	at org.apache.jorphan.collections.HashTree.traverse(HashTree.java:977) ~[jorphan.jar:5.2.1]
	at org.apache.jmeter.threads.JMeterThread.initRun(JMeterThread.java:703) ~[ApacheJMeter_core.jar:5.2.1]
	at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:253) ~[ApacheJMeter_core.jar:5.2.1]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_252]
Caused by: java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_252]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_252]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_252]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_252]
	at org.apache.jmeter.testbeans.TestBeanHelper.invokeOrBailOut(TestBeanHelper.java:167) ~[ApacheJMeter_core.jar:5.2.1]
	... 9 more
Caused by: java.lang.NullPointerException
	at java.util.Hashtable.put(Hashtable.java:460) ~[?:1.8.0_252]
	at java.util.Properties.setProperty(Properties.java:166) ~[?:1.8.0_252]
	at net.coru.kloadgen.config.schemaregistry.SchemaRegistryConfigElement.serializeProperties(SchemaRegistryConfigElement.java:58) ~[kloadgen-1.2.0.jar:?]
	at net.coru.kloadgen.config.schemaregistry.SchemaRegistryConfigElement.setSchemaRegistryProperties(SchemaRegistryConfigElement.java:45) ~[kloadgen-1.2.0.jar:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_252]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_252]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_252]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_252]
	at org.apache.jmeter.testbeans.TestBeanHelper.invokeOrBailOut(TestBeanHelper.java:167) ~[ApacheJMeter_core.jar:5.2.1]
	... 9 more

From Jmeter source

/**
     * Utility method that invokes a method and does the error handling around
     * the invocation.
     *
     * @param invokee
     *            the object on which the method should be invoked
     * @param method
     *            the method which should be invoked
     * @param params
     *            the parameters for the method
     * @return the result of the method invocation.
     */
    private static Object invokeOrBailOut(Object invokee, Method method, Object[] params) {
        try {
            return method.invoke(invokee, params);
        } catch (IllegalArgumentException | IllegalAccessException | InvocationTargetException e) {
            throw new Error(createMessage(invokee, method, params), e);
        }
    }

I guess the method invoke one of those three exceptions which is illegalArgumentException, illegalAccessException and InvocationTargetException.

What am I supposed to do with that ?

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 17 (10 by maintainers)

Commits related to this issue

Most upvoted comments

Hi Kojo, thanks!! I’m gonna close this issue, if anything just open a new one please. Regards!

Hi Kojo, I cannot reproduce this error. Are you still using the same jmx file? Have you proper configured your Schema Registry with a testing avro? I need more feedback in order to analyse this error. I updated master with all fixes and some tweaks, so please try with that branch. Thanks

Hi Kojo, I took a close look to this issue and try to reproduce it. It works fine through the UI and in Server mode. Analysing the stacktrace I saw it looks like a missing Class in your classpath. Can you please verify you don’t have twice the plugin jar in your classpath? We change the version number with every ticket so it can appear twice in your lib/ext folder and cause this type of problems. It happens to us. Regards!

Hi Kojo, you were configuring the test without a ThreadGroup? It looks like the exception cames when you try to configure all the test outside a Thread Group. We use the ThreadGroup context to share values between components, and in your Trace this context look like didn’t exist. Waiting for feedback. Regards!