I have a managed bean with view scope. The problem is that when I run the web application I have the following error:
GRAVE: Error Rendering View[/login.xhtml]
java.io.NotSerializableException: org.postgresql.jdbc4.Jdbc4Connection
at java.io.ObjectOutputStream.writeObject0(Unknown Source)
at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source)
at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
at java.io.ObjectOutputStream.writeObject0(Unknown Source)
at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source)
at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
at java.io.ObjectOutputStream.writeObject0(Unknown Source).........
But when I change the scope to session or request, everything works just fine. Can anyone tell my if I have done anything wrong? Maybe I forgot a configuration or something?