java.io.NotSerializableException: [英] java.io.NotSerializableException:

查看:90
本文介绍了java.io.NotSerializableException:的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我在部署我的Web应用程序时遇到此异常。它是为我为会话设置的属性而发生的。以下是设置会话属性的方法:----

展开 | 选择 | Wrap | 行号

解决方案

制作您的OffshoreResourceList等人实现了Serializable接口。这个

非常简单,因为该接口没有定义任何方法,所以简单地说

这样做:

展开 | 选择 | Wrap | 行号



使您的OffshoreResourceList等实现Serializable接口。这个

非常简单,因为该接口没有定义任何方法,所以简单地说

这样做:

展开 | 选择 | Wrap | 行号



嗨Jos,

没关系。但是我已经阅读了Vector类文档......它已经实现了serializabe接口。那么为什么我们要在这堂课中再次序列化


谢谢和问候,

madhoriya



啊,好的,然后错误诊断表明你已经把那个成员中的一个放在那个Vector中没有实现Serializable接口。我不知道

你的班级是Vector本身。


亲切的问候,


Jos


Hi,
I am getting this exception while deploying my web application. It is occuring for the attributes which I have set for the session. Here is the method which sets the session attribues :----

Expand|Select|Wrap|Line Numbers

解决方案

Make your OffshoreResourceList et al implement the Serializable interface. This
is extremely easy because that interface doesn''t define any methods, so simply
do this:

Expand|Select|Wrap|Line Numbers


Make your OffshoreResourceList et al implement the Serializable interface. This
is extremely easy because that interface doesn''t define any methods, so simply
do this:

Expand|Select|Wrap|Line Numbers


Hi Jos,
It''s Ok. But I have read the Vector class documentation...It already implements the serializabe interface. Then why we have to serialize it again in this class

Thanks and regards,
madhoriya

Ah, ok, then the error diagnostic indicates that one of the members you''ve put
in that Vector doesn''t implement the Serializable interface. I didn''t know that
your class was a Vector itself.

kind regards,

Jos


这篇关于java.io.NotSerializableException:的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆