local class incompatible: stream classdesc serialVersionUID = 4125096758372084309, local class serialVersionUID = 7725746634795906143

简介: local class incompatible: stream classdesc serialVersionUID = 4125096758372084309, local class serialVersionUID = 7725746634795906143 出现以上错误信息,一搬是启用...

local class incompatible: stream classdesc serialVersionUID = 4125096758372084309, local class serialVersionUID = 7725746634795906143

 

出现以上错误信息,一搬是启用了磁盘缓存,对象使用了序列化接口,而未给对象分配序列化id,当对象做出字段的改变时,就会出现版本兼容的问题,定义一个id可以有效的进行版本兼容

只需加上序列化id即可

    /**
     * 序列化id
     */
    private static final long serialVersionUID = 4125096758372084309L;

 

遗失的拂晓
目录
相关文章
Unable to interpret the implicit parameter configuration with dataType: , dataTypeClass: class java.
Unable to interpret the implicit parameter configuration with dataType: , dataTypeClass: class java.
555 0
|
17天前
|
Java 编译器 Maven
Java“class file contains wrong class”解决
当Java程序运行时出现“class file contains wrong class”错误,通常是因为类文件与预期的类名不匹配。解决方法包括:1. 确保类名和文件名一致;2. 清理并重新编译项目;3. 检查包声明是否正确。
|
3月前
|
Java Android开发
解决Android编译报错:Unable to make field private final java.lang.String java.io.File.path accessible
解决Android编译报错:Unable to make field private final java.lang.String java.io.File.path accessible
478 1
Field userMapper in zero.file.videoProject.service.UserService required a bean of type ‘zero.file.vi
Field userMapper in zero.file.videoProject.service.UserService required a bean of type ‘zero.file.vi
|
6月前
|
Java
Error:(15, 13) java: No property named “id” exists in source parameter(s). Did you mean “null”?
Error:(15, 13) java: No property named “id” exists in source parameter(s). Did you mean “null”?
141 1
|
Java
Java Error: The public type HelloWorld must be defined in its own file
Java Error: The public type HelloWorld must be defined in its own file
166 0
Error:(15, 13) java: No property named “id” exists in source parameter(s). Did you mean “null”?
Error:(15, 13) java: No property named “id” exists in source parameter(s). Did you mean “null”?
|
Java 编译器 Android开发
Java compiler error: constant string too long
Java compiler error: constant string too long
|
Java
JAVA解决方案:Missing URI template variable ‘customersno‘ for method parameter of type String
解决方案 PathVariable和RequestParam的使用 @PathVariable @RequestParam PathVariable和RequestParam的区别 区别在于一个是用?,一个使用/进行传输数据
348 0
No package ‘libmarco-private‘ found
No package ‘libmarco-private‘ found
56 0