jmeter和metersphere引用jar包报错Error invoking bsh method和 not found in namespace

2024-01-09 09:26:38 ERROR 54b7e26f 1-1 Error invoking bsh method: eval Sourced file: inline evaluation of: // BeanShell脚本开始 import com.example.demo.DemoApplication; DemoApplica . . . '' : Typed variable declaration : Class: DemoApplication not found in namespace 2024-01-09 09:26:38 WARN 54b7e26f 1-1 Exception executing script. org.apache.jorphan.util.JMeterException: Error invoking bsh method: eval Sourced file: inline evaluation of: // BeanShell脚本开始 import com.example.demo.DemoApplication; DemoApplica . . . '' : Typed variable declaration : Class: DemoApplication not found in namespace

1.查看jar包有没有上传

2.引用包名.类名.方法名

3.查看包是否引用第三方依赖,如果有打包的是需要依赖一起打包

pom文件里面配置:

复制代码
          <plugin>  
              <artifactId>maven-assembly-plugin</artifactId>  
              <configuration>  
                  <!--这部分可有可无,加上的话则直接生成可运行jar包-->
                  <!--<archive>-->
                      <!--<manifest>-->
                          <!--<mainClass>${exec.mainClass}</mainClass>-->
                      <!--</manifest>-->
                  <!--</archive>-->
                  <descriptorRefs>  
                      <descriptorRef>jar-with-dependencies</descriptorRef>  
                  </descriptorRefs>  
             </configuration>
        </plugin>
相关推荐
程序员的世界你不懂13 小时前
Jmeter的元件使用介绍:(三)配置元件详解01
jmeter
软件测试-阿涛18 小时前
【性能测试】Jmeter+Grafana+InfluxDB+Prometheus Windows安装部署教程
测试工具·jmeter·性能优化·压力测试·grafana·prometheus
YuforiaCode2 天前
JMeter每次压测前清除全部以确保异常率准确(以黑马点评为例、详细图解)
jmeter
程序员的世界你不懂2 天前
Jmeter的元件使用介绍:(四)前置处理器详解
开发语言·python·jmeter
清心歌2 天前
Apache JMeter 使用记录踩坑
jmeter·apache
程序员的世界你不懂2 天前
Jmeter的函数助手使用
jmeter
程序员的世界你不懂2 天前
Jmeter常见问题分析(1)乱码问题
jmeter·dubbo
黑哒哒的盟友2 天前
JMeter groovy 编译成.jar 文件
java·jmeter·jar
程序员的世界你不懂2 天前
Jmeter的元件使用介绍:(二)线程组详解
jmeter