sofastack / sofa-bolt

SOFABolt is a lightweight, easy to use and high performance remoting framework based on Netty.
https://www.sofastack.tech/projects/sofa-bolt/
Apache License 2.0
2.44k stars 860 forks source link

没查到此预警是什么意思 #354

Closed sue602 closed 4 months ago

sue602 commented 4 months ago

Your question

请问下这个警告是哪里设置有问题吗?

警告: unable to set field {} accessible 7月 22, 2024 11:35:51 上午 com.caucho.hessian.io.AbstractStringBuilderDeserializer 警告: coder field not found or not accessible, will skip coder check, error is Unable to make field private final byte java.lang.String.coder accessible: module java.base does not "opens java.lang" to unnamed module @2ed2d9cb Sofa-Middleware-Log:WARN [com.alipay.sofa.hessian] No log util is usable, Default app logger will be used.

Your scenes

使用:


Codec<TestCmd_1> simpleTypeCodec = ProtobufProxy
                        .create(TestCmd_1.class);

TestCmd_1 stt = new TestCmd_1();
stt.req.msg = "abc";
stt.req.idx = 100;
 byte[] bb = simpleTypeCodec.encode(stt);

TestCmd_1 rsp =(TestCmd_1) remoteCall.call(1, bb);  //此处会报如上警示

//TestCmd_1 类
@ProtobufClass
public class TestCmd_1 implements Serializable{

    @Protobuf(fieldType = FieldType.OBJECT, order=1, required = false, description = "请求")
    public Req req;
    @Protobuf(fieldType = FieldType.OBJECT, order=2, required = false, description = "返回")
    public Rsp rsp;

    public TestCmd_1(){
        req = new Req();
        rsp = new Rsp();
    }
}

// Req 类
@ProtobufClass
    public class Req implements Serializable{
        @Protobuf(fieldType = FieldType.INT32, order=1, required = false)
        public int idx;
        @Protobuf(fieldType = FieldType.STRING, order=2, required = false)
        public String msg = "";
    }

### Your advice

describe the advice or solution you'd like

### Environment

- SOFABolt version:  5.12.0
- JVM version (e.g. `java -version`):  1.8.0_361
- OS version (e.g. `uname -a`): Windows 11
- Maven version:   3.3.3 
- IDE version: NetBeans 18