报错 setAttribute: Non-serializable attribute解决方法
2016-04-12 15:27
330 查看
家校通项目部署在阿里云后,登陆报错。查看日记发现错误:
该类没序列化的原因,百度了一下发现是分布式部署的时候需要序列化
原先是
变成
ok!
[ERROR] 2016-04-12 14:51:49 setAttribute: Non-serializable attribute userInfoSessionCacheKey java.lang.IllegalArgumentException: setAttribute: Non-serializable attribute userInfoSessionCacheKey
该类没序列化的原因,百度了一下发现是分布式部署的时候需要序列化
原先是
public class UserInfoCache { /** 经办人员个人资源Session缓存key */ public static final String USER_INFO_SESSION_CACHE_KEY = "userInfoSessionCacheKey";
变成
public class UserInfoCache implements java.io.Serializable{ private static final long serialVersionUID = 1L; /** 经办人员个人资源Session缓存key */ public static final String USER_INFO_SESSION_CACHE_KEY = "userInfoSessionCacheKey";
ok!
相关文章推荐
- javac和java命令的详解
- ffmpeg 对于视频进行fps改变
- 0基础学C#教程1--------comboBox的相关操作(包括下拉,多数据操作等等)
- Hbase之shell操作
- 消除 activity 启动时白屏、黑屏问题
- CSDNCODE使用图文教程(详细)
- 删除“找不到项目”的文件的方法
- c++上机作业
- 表篇分区
- 转载——web前端相关资源总结
- (String). Word Pattern
- PHP函数的实现原理及性能分析[2010年前文章]
- SDUT OJ 3328 JAVA判断合法标识符
- Android在线支付
- 结对编程项目进展——第四周
- 修改后的取得汉字首字母的lazarus函数,可以自己增加疑难汉字,这个应该比较理想了
- Activity生命周期
- DFS
- 链式队列
- thinkphp输出表格