sofastack/sofa-jraft

ProtobufMsgFactory#static Throwable is NOPMD?

funky-eyes opened this issue · 4 comments

Your question

为什么对ProtobufMsgFactory 静态代码块中初始化parse异常时,不打印日志?
apache/incubator-seata#6083
seata集成了jraft,用户在alpine linux中运行出现了,怀疑是初始化时出了异常,但是由于不打印成日志导致我们很难获取该信息

Caused by: java.lang.IllegalStateException: Parse protocol file failed.
	at com.alipay.sofa.jraft.rpc.ProtobufMsgFactory.load(ProtobufMsgFactory.java:88)
	at com.alipay.sofa.jraft.rpc.impl.AbstractClientService.<clinit>(AbstractClientService.java:63)
	... 27 common frames omitted

Your scenes

Describe your use scenes (why need this feature)

Your advice

Describe the advice or solution you'd like

Environment

  • SOFAJRaft version:
  • JVM version (e.g. java -version): 19&21
  • OS version (e.g. uname -a): alpine linux
  • Maven version:
  • IDE version:

@fengjiachun @killme2008 Please help with this question

这不是打到标准错误流了吗?

@killme2008 This message doesn't tell you anything, the specific exception was caught, and this message alone doesn't help.

We should have encountered the bug #1066