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 天前
Docker 中运行 JAR 文件
docker·容器·jar
Mikey_n1 天前
深入理解依赖、Jar 包与 War 包:Java 开发基石探秘
java·开发语言·jar
silence2501 天前
Spring Boot 项目:如何在 JAR 运行时读取外部配置文件
spring boot·后端·jar
桑榆非婉1 天前
同样的接口用postman/apifox能跑通,用jmeter跑就报错500
测试工具·jmeter·postman
silence2502 天前
Maven 项目中引入本地 JAR 包
java·maven·jar
may_一一2 天前
jmeter利用csv进行参数化和自动断言
jmeter
hnsqls2 天前
删除不了jar包-maven clean package失败
maven·jar
jiuweiC2 天前
spark jar依赖顺序
ajax·spark·jar
绿色果酱2 天前
UI自动化测试介绍及入门
测试工具·jmeter·metersphere·ui自动化测试·runnergo
北京_宏哥2 天前
🔥Jmeter(十九) - 从入门到精通 - JMeter监听器 -上篇(详解教程)
前端·jmeter·面试