Meaningless Drivel is fun!*
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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: 19654
    
  18

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Findbugs message: xxxx defines non-transient non-serializable instance
 
Similar Threads
how makeChild classes as Non Serializable if parent class is Serializable in java ?
Remote Business Service - Delegating to Local
states of stateful session bean
Can transient variables be static??
Serialization of references