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>
相关推荐
周周不一样13 小时前
Andorid基础笔记2-jar&反射
笔记·pycharm·jar
林开落L1 天前
【项目实战】博客系统完整测试报告(含自动化+性能测试)
python·功能测试·jmeter·自动化·postman·性能测试·xmind
夜晚打字声2 天前
9(九)Jmeter如何连接数据库
数据库·jmeter·oracle
夜晚打字声2 天前
8(八)Jmeter并发数集合点设置
jmeter
夜晚打字声2 天前
10(十)Jmeter使用JSR233计算签名
jmeter
沫沫-小白2 天前
【JMeter Retrier 插件:让失败请求自动重试,告别脚本繁琐循环】
jmeter
沫沫-小白2 天前
【JMeter 实战:大模型流式接口性能测试(含TTFT与Token统计)】
jmeter
测试改改2 天前
Jmeter-上传图片(一直报500的错误)
jmeter