0
votes

I'm new to jmeter, and I'm getting this error:

jmeter.util.BeanShellInterpreter: Error invoking bsh method: eval Could not initialize class stpl.lib.enc.tea.TEALib

I have added the jar file of the java class in the lib/ext of the jmeter. I'm trying to import the java class in the beanshell preprocessor. The package name is stpl.lib.enc.tea and the class name is TEALib so used the syntax:

import stpl.lib.enc.tea.TEALib;

TEALib t = new TEALib();    

String x = "ABCD";

vars.put("p2",x);

Also I have added a dll file in the java class which is also named as TEALib. So sometimes I also get the error saying no TEALib found in class.library.path.

The jmeter throws the two errors above.

1

1 Answers

0
votes
  1. For .jar file - copy it to JMeter's /lib folder. JMeter restart is required to pick the .jar up
  2. For .dll file - make sure it lives under one of the following locations:

You may add folder where .dll file lives to java.library.path using one of the following approaches:

  • add the next line to system.properties file (located under /bin folder of your JMeter installation)

    java.library.path=/path/to/folder/where/dll/lives
    

    Again, JMeter restart is required to apply the property.

  • set it via -D command line argument as:

    jmeter -Djava.library.path=/path/to/folder/where/dll/lives/  -t /your/testplan.jmx 
    

See Apache JMeter Properties Customization Guide for more information on JMeter properties and ways of working with them.