• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
K DeLucia
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 20545
56
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
K DeLucia
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK. Thanks! I'll check it out.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic