-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
jdk16环境下example报错 #633
Comments
应该是误用了,我们改下,您要有兴趣也可以提个修复 PR |
这个不是误用,只有 sun.nio.ch.DirectBuffer 有 address() api, DirectByteBuffer 只是包可见级别,外部无法访问 |
我的意思是可以改成反射的方式,不需要强依赖。 |
我的水平太菜了,不会改,麻烦修改下,我重新下载代码 |
Method method = this.buffer.getClass().getMethod("address"); |
我下载个 zulu jdk16 看下怎么改好些 |
我下载了 jdk16, 发现可以编译,你的报错是你的 idea 报错吧? |
本地执行一下 |
跟你一样的问题,我用的jdk11,哈哈哈 |
java.lang.reflect.InaccessibleObjectException: Unable to make field private java.lang.String java.lang.StackTraceElement.classLoaderName accessible: module java.base does not “opens java.lang” to unnamed module @5cbc508c |
|
@tsgmq 这个是你自己实现的吧 |
我的jdk11也不能用。 |
感谢各位指点,主要是SerializerManager.getSerializer(SerializerManager.Hessian2).deserialize(content, clazz.getName()) 这个序列化的不行,本地解决了在服务器jdk16依然不行,我已经换成ProtoStuffSerializer来做序列化和反序列化,通过其他方式解决 |
com.alipay.sofa.jraft.storage.log.SegmentFile 编译不通过
报错信息
java: 程序包 sun.nio.ch 不可见
(程序包 sun.nio.ch 已在模块 java.base 中声明, 但该模块未将它导出到未命名模块)
The text was updated successfully, but these errors were encountered: