java.io.StreamCorruptedException: invalid type code: 31

A user-settable boolean to determine whether ClassLoader.loadClass should
accept array syntax. This value may be changed during VM initialization
via the system property "sun.lang.ClassLoader.allowArraySyntax".

原因 jdk 1.5,1.6 对sun.lang.ClassLoader.allowArraySyntax的默认值设置不同1.5为true, 1.6为false
解决办法 在java启动命令或脚本中添加此虚拟机启动参数-Dsun.lang.ClassLoader.allowArraySyntax=true

你可能感兴趣的:(技术文章)