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>
相关推荐
invicinble4 小时前
jar包在执行的时候需要关注的细节(提供一个解构jvm问题的视角)
java·jvm·jar
不惑_11 小时前
在 Docker 中运行 Java JAR 包实战教程
java·docker·jar
write19941 天前
02 jmeter常用组件
jmeter
天才测试猿1 天前
Jmeter 命令行压测&生成HTML测试报告
自动化测试·软件测试·python·测试工具·jmeter·职场和发展·jenkins
帝落若烟1 天前
jmeter下载安装-1
jmeter
古城小栈1 天前
性能测试:JMeter 压测 Spring Boot 微服务
spring boot·jmeter·微服务
2501_924064112 天前
2025年优测压测平台与JMeter效率成本对比及行业实践
jmeter·接口测试·压测方案
Han.miracle2 天前
Spring Boot 项目从入门到排障:核心结构、依赖管理与启动全解析
java·jar
hgz07103 天前
Linux服务器环境部署与JMeter压测准备
linux·服务器·jmeter
早川9193 天前
JMeter的基本使用与性能测试
jmeter