In our application, we have seen "java.lang.IncompatibleClassChangeError: vtable stub" pop up randomly and seldom. We did a clean rebuild, so the netty jar file in building environment is the same as the one in the running environment.
The code is:
@Override
protected Object decode(ChannelHandlerContext ctx, Channel channel, ChannelBuffer buffer)
throws CorruptedFrameException
{
...
buffer.readShort();
int subLength = buffer.readShort();
...
}
The first buffer.readShort() works well, but the second buffer.readShort() may throw this error randomly. The problem is similar to What causes "java.lang.IncompatibleClassChangeError: vtable stub"?. It runs with jdk 1.6.0_16, and looks like unsolved.
- We are using armv7 cpu
- the Netty version is 3.5.4
the java version is
0101C2:~ # java -version java version "1.8.0_65" Java(TM) SE Embedded Runtime Environment (build 1.8.0_65-b17, headless) Java HotSpot(TM) Embedded Client VM (build 25.65-b01, mixed mode)
UPDATE:
- It works well with -Xint option: I tested many times, the IncompatibleClassChangeError occurs over 20 times without -Xint, and It never occurs with -Xint. Every test I restart application 3 times with -Xint, and then restart application 3 times without -Xint.