jmeter执行接口报"status":500,"error":"Internal Server Error","exception":"java.lang.IllegalArgumentExcep"

时间:2024-04-07 07:39:16

jmeter执行接口,响应报如下:
{“timestamp”:“2020-05-12 10:16:51”,“status”:500,“error”:“Internal Server Error”,“exception”:“java.lang.IllegalArgumentException”,“message”:“JWT must have 3 tokens”,“path”:"/detection/api/user/saveOrUpdate"}

原因:请求头未添加动态认证数据
jmeter执行接口报"status":500,"error":"Internal Server Error","exception":"java.lang.IllegalArgumentExcep"

解决方法:
jmeter执行接口报"status":500,"error":"Internal Server Error","exception":"java.lang.IllegalArgumentExcep"

去使用正则替换写死的数据值
jmeter执行接口报"status":500,"error":"Internal Server Error","exception":"java.lang.IllegalArgumentExcep"jmeter执行接口报"status":500,"error":"Internal Server Error","exception":"java.lang.IllegalArgumentExcep"

再去运行接口:
jmeter执行接口报"status":500,"error":"Internal Server Error","exception":"java.lang.IllegalArgumentExcep"