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>
相关推荐
没差c4 天前
winsw将jar、nginx等注册为Windows服务
windows·nginx·jar
真上帝的左手8 天前
2. 编程语言-Java-Spring Boot-JAR
java·spring boot·jar
LHICOD10 天前
Linux-2
java·linux·后端·jar·vmware·svm·vm
CarIise10 天前
Spring 框架:多配置文件、开发方式与 IOC 注解
junit·maven·jar
Android小码家11 天前
framework&framework-minus-apex&android.jar的区别
android·python·jar
菜鸟小杰子15 天前
手动修改 Spring Boot 嵌套 JAR 包:大包小包隔离打包实战
java·jar
banyoyo18 天前
jmeter测试使用方法
jmeter
汪汪88888818 天前
jmeter压测下载功能影响本地内存的方案
jmeter
跨境数据猎手19 天前
跨境电商系统JMeter 和 Gatling 分工
jmeter
qq_3660862219 天前
idea项目重新启动时报错找不到jar
pycharm·intellij-idea·jar