oliverCC's recent timeline updates
oliverCC

oliverCC

V2EX member #467212, joined on 2020-01-30 20:18:50 +08:00
Per oliverCC's settings, the topics list is hidden
Deals info, including closed deals, is not hidden
oliverCC's recent replies
throw new BusinessException(e.getMessage());
从日志上看这行抛出了异常,原因是你的 try catch 中发生了空指针异常,但是你这行代码没有记录日志。
正常写法应该是
log.error(String.format("压缩文件出错%s",e.getMessage()),e);
throw new BusinessException(e.getMessage(),e);

从你现有代码来看,大概率是 循环中的 getFiles 方法内有问题导致的。

之所以生产环境会报错,而本地自测不报错 那是因为程序运行时变量不同(变量包括不限于程序报错时的出入参、机器各项指标参数等 代码相同只是这些变量中的一个)

对于已经出现的这个报错如果不能添加日志来排查,可以看下能否找到这个报错之前的一些出入参和打包的文件,所有变量和本地报错一致自测复现。
如果日志这条路走不通,可以按照楼上说的 安装 arthas 或者 分布式链路追踪 pinpoint 、SkyWalking 、Zipkin 这些工具也可以作为排查的思路。
Dec 13, 2023
Replied to a topic by hzlzh macOS 🎉[福利] iOS & macOS 福利放送, 150 位, 5 选 1
分母+1
About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   858 Online   Highest 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 11ms · UTC 21:09 · PVG 05:09 · LAX 14:09 · JFK 17:09
♥ Do have faith in what you're doing.