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>
相关推荐
1.01^100014 小时前
[5-02-04].第01节:Jmeter环境搭建:
jmeter
太阳之神aboluo1 天前
压测软件-Jmeter
java·运维·jmeter
三千花灯1 天前
jmeter之导出接口
jmeter
文人sec1 天前
性能测试-jmeter实战2
jmeter
会又不会1 天前
JMeter-SSE响应数据自动化2.0
jmeter·自动化
程序媛_1 天前
【JMeter】后置处理器 - 提取器
jmeter
程序员三藏1 天前
如何使用Jmeter进行压力测试?
自动化测试·软件测试·python·测试工具·jmeter·测试用例·压力测试
测试老哥2 天前
Jmeter如何进行多服务器远程测试?
自动化测试·软件测试·功能测试·测试工具·jmeter·测试用例·性能测试
酷爱码2 天前
Java -jar命令运行外部依赖JAR包的深度场景分析与实践指南
java·python·jar
测试界清流3 天前
JMeter函数整理
jmeter