c0debrain / socialauth

Automatically exported from code.google.com/p/socialauth
0 stars 0 forks source link

java.io.NotSerializableException on sever restart #330

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I am very frequently seeing java.io.NotSerializableException on server restart.

What steps will reproduce the problem?
1. Use social login to authenticate
2. After few minutes, restart the server
3.

What is the expected output? What do you see instead?
It shouldn't throw exception.

What version of the product are you using? On what operating system?
4.3 Social spring +Tomcat 7.0.50 + Spring MVC

Please provide any additional information below.
EVERE: IOException while loading persisted sessions: java.io.WriteAbortedExcept
ion: writing aborted; java.io.NotSerializableException: org.brickred.socialauth.
spring.bean.SocialAuthTemplate
java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException
: org.brickred.socialauth.spring.bean.SocialAuthTemplate
        at java.io.ObjectInputStream.readObject0(Unknown Source)
        at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
        at java.io.ObjectInputStream.readSerialData(Unknown Source)
        at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
        at java.io.ObjectInputStream.readObject0(Unknown Source)
        at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
        at java.io.ObjectInputStream.readSerialData(Unknown Source)
        at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
        at java.io.ObjectInputStream.readObject0(Unknown Source)
        at java.io.ObjectInputStream.readObject(Unknown Source)
        at org.apache.catalina.session.StandardSession.readObject(StandardSessio
n.java:1597)
        at org.apache.catalina.session.StandardSession.readObjectData(StandardSe
ssion.java:1062)
        at org.apache.catalina.session.StandardManager.doLoad(StandardManager.ja
va:284)
        at org.apache.catalina.session.StandardManager.load(StandardManager.java
:204)
        at org.apache.catalina.session.StandardManager.startInternal(StandardMan
ager.java:491)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContex
t.java:5464)

Original issue reported on code.google.com by girinamb...@gmail.com on 17 Feb 2014 at 4:49

GoogleCodeExporter commented 9 years ago
SocialAuthTemplate does not implements Serializable interface. So if you'll try 
to serialize it you may get this error.

Original comment by tarun.na...@3pillarglobal.com on 18 Feb 2014 at 4:36

GoogleCodeExporter commented 9 years ago
Hi Tarun,

Thanks for the comment! 

I don't want to serialize anything. AFAIK, I don't have any code requires 
socialauth returned attributes serialization. 

I was under impression socialauth might be doing this internally, based on your 
comment, it seems socialauth not doing this.

I am using Spring + Tomcat, one of these might be trying to do this. Have you 
come across any such scenario? 

Thank you,

Original comment by girinamb...@gmail.com on 18 Feb 2014 at 4:42

GoogleCodeExporter commented 9 years ago
This may be tomcat issue. It seems saveonrestart is true by default. I will 
test and update here if it works. 

Thanks for your time.

Original comment by girinamb...@gmail.com on 18 Feb 2014 at 4:46

GoogleCodeExporter commented 9 years ago

Original comment by tarunnag...@gmail.com on 31 Oct 2014 at 1:44

GoogleCodeExporter commented 9 years ago
On GAE I received the same error!

Original comment by cio.dan...@gmail.com on 28 Nov 2014 at 7:05