Arthas tt 监控Controller异常UnsupportedOperationException

本文介绍了在使用Arthas的tt命令监控Controller时遇到UnsupportedOperationException的问题。排查过程显示Skywalking探针对Controller层进行了方法改写,导致监控失败。解决方案是关闭Skyworking,或者仅监控不受其影响的service层和mapper层。
摘要由CSDN通过智能技术生成

背景:Arthas tt命令监控一个Controller方法异常

[arthas@30620]$ tt -t com.lbdj.business.rest.erp.ErpCommonOrderController getErpOrderList
Affect(class count: 1 , method count: 1) cost in 525 ms, listenerId: 1
Enhance error! exception: java.lang.UnsupportedOperationException: class redefinition failed: attempted to change the schema (add/remove fields)
error happens when enhancing class: class redefinition failed: attempted to change the schema (add/remove fields), check arthas log: /root/logs/arthas/arthas.log

排查:依据错误描述是arthas在修改类结构的时候发现已经被修改了,所以抛出异常。

编译前源码:

package com.lbdj.business.rest.erp;

import com.github.pagehelper.PageInfo;
import com.lbdj.business.request.common.ErpCommonOrderListRequest;
import com.lbdj.business.response.common.ErpOrderListResponse;
import com.lbdj.business.service.order.ErpCommonOrderDetatilService;
import com.lbdj.business.vo.ErpOrderListVo;
import javax.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;


@Slf4j
@RestController
public class ErpCommonOrderController {

  @Resource
  private ErpCommonOrderDetatilService commonOrderDetatilService;

  @RequestMapping(value = "/ErpCommonOrderListRequest", method = RequestMethod.POST)
  public Er
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值