wood burning stoves*
The moose likes Beginning Java and the fly likes Findbugs message: xxxx defines non-transient non-serializable instance Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Findbugs message: xxxx defines non-transient non-serializable instance" Watch "Findbugs message: xxxx defines non-transient non-serializable instance" New topic
Author

Findbugs message: xxxx defines non-transient non-serializable instance

K DeLucia
Ranch Hand

Joined: Apr 11, 2008
Posts: 68
I'm fairly new to java and I've discovered FindBugs to help me through some things. I'm getting this message:

Class com.project.controller.Application defines non-transient non-serializable instance field bean

I'm not sure what this means. Can anyone provide any info or links to help me fix this?
Thanks!
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19697
    
  20

You may want to read up on Serialization. In short, your class implements Serializable (either directly or indirectly), but it still cannot be serialized - that one field is not serializable, nor is it transient (which means it will be skipped during serialization). As a result, when you try to serialize instances of your class it will fail horribly.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
K DeLucia
Ranch Hand

Joined: Apr 11, 2008
Posts: 68
OK. Thanks! I'll check it out.
 
GeeCON Prague 2014
 
subject: Findbugs message: xxxx defines non-transient non-serializable instance