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>
相关推荐
weixin_440730502 天前
手工接口测试使用总结
jmeter·接口测试
EXI-小洲3 天前
MacOS 上使用 IntelliJ IDEA 指定 Main 函数并打包为 JAR 文件
macos·intellij-idea·jar
Amir_zy3 天前
JMeter吞吐量与并发数:要求TPS达到200,并发至少是多少?
jmeter
骇客野人4 天前
Docker Compose 部署多个独立 Jar 服务完整实操步骤
docker·容器·jar
孫治AllenSun7 天前
【Jmeter】项目压测流程案例
jmeter
不老刘8 天前
【Java入门】Java服务部署方式全景对比:从java -jar到K8s
java·kubernetes·jar
是吕先森11 天前
【jmeter】简单应用
jmeter
执笔画流年呀13 天前
【性能测试】Jmeter下载安装、环境配置-小白使用手册
jmeter
带刺的坐椅13 天前
跳出 Fatjar 的束缚:Solon 插件的体外扩展(E-Spi)与热插拔(H-Spi)
java·jar·solon·plugin·fatjar