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>
相关推荐
雪碧聊技术19 小时前
什么是压力测试?压力测试的工具有哪些?一文详解
jmeter·压力测试·wrk
弹简特2 天前
【精通JMeter接口测试-完结】05-JMeter通关收官!BeanShell和接口签名
jmeter·beanshell·接口签名
某人辛木3 天前
JMeter下载安装配置
jmeter
是大强4 天前
下载的jar怎么放到本地仓库
python·pycharm·jar
疯狂成瘾者4 天前
对比JAR 包部署 vs Docker 部署方式
java·docker·jar
查拉图斯特拉面条4 天前
JMeter脚本中断排查:CSV配置导致线程提前终止
jmeter
longxibo6 天前
【flowable 7.2.0 二开之三:基于 Flowable 7.2 的审批流系统解压即用】
java·tensorflow·jar
lifewange7 天前
JMeter InfluxDB 后端监听器 全参数详解
jmeter
mldlds8 天前
SpringBoot项目如何导入外部jar包:详细指南
spring boot·后端·jar