是什么原因导致“java.lang.InknownClassChangeError:vtable存根”?
是什么原因导致“java.lang.InknownClassChangeError:vtable存根”?在我们的应用程序中,我们很少看到此错误随机弹出(到目前为止只出现两次,而且我们运行了很多次)。即使重新启动应用程序,使用相同的 jvm/jar 而不重建,它也不容易重现。
至于我们的构建过程,我们清理所有类/jar 并重建它们,因此这与其他人遇到的问题不同,他们在一个类中进行了更改并且没有重新编译其他一些依赖类。
这与与 IncompleteClassChangeError 相关的其他一些问题不同——它们都没有提到“vtable 存根”。事实上,当搜索“IncompleteClassChangeError“vtablestub””时,谷歌结果出人意料地少。
编辑:
- 使用 JDK 1.6.0_16。
- 我们没有使用 Java 序列化。
- 我们不进行字节码操作。
- 如前所述,我们正在进行“干净构建”,因此以前的构建中没有遗留任何类。
What causes "java.lang.IncompatibleClassChangeError: vtable stub"? In our application, we have seen this error pop up randomly and very seldom (just twice so far, and we run it a lot). It is not readily reproducible, even when restarting the app, using the same jvm/jars without rebuilding.
As for our build process, we clean all classes/jars and rebuild them, so it's not the same problem as others have encountered where they made a change in one class and didn't recompile some other dependent classes.
This is unlike some of the other questions related to IncompatibleClassChangeError -- none of them mention "vtable stub". In fact, there are surprisingly few google results when searching for "IncompatibleClassChangeError "vtable stub"".
Edit:
- Using JDK 1.6.0_16.
- We are not using Java serialization.
- We are not doing bytecode manipulation.
- As mentioned earlier, we are doing a "clean build", so there are no classes left over from a previous build.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
JVM 字节码世界中的 API 损坏。查找 Javadoc:
要查找的罪魁祸首是对静态最终文字值的更改,因为这些值会作为“优化”复制到字节代码中。
编辑:这可以像库升级的结果一样简单,我知道的唯一修复是干净的重建。
API breakage in the JVM byte-code world. Look up the Javadoc:
Culprits to look for would be changes to static final literal values because these get copied around in the byte code as “optimization”.
EDIT: This can be as simple as the result of a library upgrade, the only fix I know of is a clean rebuild.
看起来您已经更改了类定义(即添加额外的属性或更奇怪的东西),并且在运行以前使用的对象时变得不兼容。
也许您将对象实例存储在某个地方(数据库文件系统),然后这些旧对象定义被解组,就会发生错误。
这件事过去发生在我身上。
例如:
应用程序运行了几周,一些对象以其序列化版本存储在文件系统中。
后来由于应用程序发生更改,我们必须将地址添加为对象:
然后重新构建之前存储的对象,并尝试使它们适合这个新的描述,该错误可能< /strong> raise (就我而言,它比这复杂得多),但它可能会帮助您朝那个方向看。
Looks like you have changed the class definition ( ie adding an extra attribute or something more weird ) and when running your previously used objects become incompatible.
Perhaps you're storing object instances somewhere ( a db the filesystem ) and then those old objects definition are unmarshalled, the error occurs.
It happened to me in the past.
For instance:
The application works for a couple of weeks and some objects are stored in the filesystem in its serialized version.
Later due an application change we have to add the address as an object:
Then the previously stored objects are reconstituted and an attempt is made to make them fit in this new description, that error may raise ( in my case it was much more complex than this ) but it may help you to look in that direction.