Remember once abnormal pressure measured troubleshooting

A. Cause

System pressure test, the tank part of the data, but do not always deal with, there is no exception log query logs, very normal.

II. Troubleshooting

The first is to add various log line is positioned where the problem is, the code model is as follows:

private boolean recoverTask(List<byte[]> list) {
    
    try {
        // 第一处日志
        log.error("recoverTask===" + JSON.toJSONString(list));
        
        Object object = unPackParam(List<byte[]> list);
        
        // 第二处日志
        log.error("recoverTask===" + JSON.toJSONString(object));
        
    } catch(Exception e) {
        // 第三处日志
        log.error("recoverTask error:", e);
    }
}

public static Object unPackParam(List<byte[]> list) {
    // MessagePack序列化操作
    ......
}

Analysis: The first hit at the log, the log did not play the second place, third place logs did not play. But the problem should be serialized positioning throw an exception, but why did not hit a third of the log?

  • Log4j log file is not suspected of a problem? Troubleshoot no problem.
  • Suspect is not thread rammed dead? Playing jstack, troubleshoot no problem.

    This time is very desperate, this problem out most of the day, various logs also added a lot. Finally, after pointing into the Exception Throwable, did not play description of the log is not Exception. Back online, reproduce, log out. Misstatements are: java.lang.NoClassDefFoundError. MessagePack not find a class, and then go behind the war package, go pom investigation file, the problem is solved.

III. Summary of issues

For the operation, will produce Error, do not think that subconsciously Exception, or deep enough to understand.

Guess you like

Origin www.cnblogs.com/wudiffs/p/11361865.html