Announcement Announcement Module
Collapse
No announcement yet.
NotSerializableException: org.opensaml.saml2.core.impl.NameIDImpl Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • NotSerializableException: org.opensaml.saml2.core.impl.NameIDImpl

    Hi,

    Sometimes when I start my web app using spring-security-saml2-core, version1.0.0-RC2-SNAPSHOT, I got the following exception. Do you have any idea?

    SEVERE: Exception loading sessions from persistent storage
    java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: org.opensaml.saml2.core.impl.NameIDImpl
    at java.io.ObjectInputStream.readObject0(ObjectInputS tream.java:1410)
    at java.io.ObjectInputStream.defaultReadFields(Object InputStream.java:2047)
    at java.io.ObjectInputStream.readSerialData(ObjectInp utStream.java:1971)
    at java.io.ObjectInputStream.readOrdinaryObject(Objec tInputStream.java:1854)
    at java.io.ObjectInputStream.readObject0(ObjectInputS tream.java:1406)
    at java.io.ObjectInputStream.defaultReadFields(Object InputStream.java:2047)
    at java.io.ObjectInputStream.readSerialData(ObjectInp utStream.java:1971)
    at java.io.ObjectInputStream.readOrdinaryObject(Objec tInputStream.java:1854)
    at java.io.ObjectInputStream.readObject0(ObjectInputS tream.java:1406)
    at java.io.ObjectInputStream.readObject(ObjectInputSt ream.java:409)
    at org.apache.catalina.session.StandardSession.readOb ject(StandardSession.java:1470)
    at org.apache.catalina.session.StandardSession.readOb jectData(StandardSession.java:972)
    at org.apache.catalina.session.StandardManager.doLoad (StandardManager.java:394)
    at org.apache.catalina.session.StandardManager.load(S tandardManager.java:321)
    at org.apache.catalina.session.StandardManager.start( StandardManager.java:637)
    at org.apache.catalina.core.ContainerBase.setManager( ContainerBase.java:438)
    at org.apache.catalina.core.StandardContext.start(Sta ndardContext.java:4396)
    at org.apache.catalina.core.ContainerBase.addChildInt ernal(ContainerBase.java:791)
    at org.apache.catalina.core.ContainerBase.addChild(Co ntainerBase.java:771)
    at org.apache.catalina.core.StandardHost.addChild(Sta ndardHost.java:526)
    at org.apache.catalina.startup.HostConfig.deployWAR(H ostConfig.java:905)
    at org.apache.catalina.startup.HostConfig.deployWARs( HostConfig.java:740)
    at org.apache.catalina.startup.HostConfig.deployApps( HostConfig.java:500)
    at org.apache.catalina.startup.HostConfig.start(HostC onfig.java:1277)
    at org.apache.catalina.startup.HostConfig.lifecycleEv ent(HostConfig.java:321)
    at org.apache.catalina.util.LifecycleSupport.fireLife cycleEvent(LifecycleSupport.java:119)
    at org.apache.catalina.core.ContainerBase.start(Conta inerBase.java:1053)
    at org.apache.catalina.core.StandardHost.start(Standa rdHost.java:722)
    at org.apache.catalina.core.ContainerBase.start(Conta inerBase.java:1045)
    at org.apache.catalina.core.StandardEngine.start(Stan dardEngine.java:443)
    at org.apache.catalina.core.StandardService.start(Sta ndardService.java:516)
    at org.apache.catalina.core.StandardServer.start(Stan dardServer.java:710)
    at org.apache.catalina.startup.Catalina.start(Catalin a.java:593)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:76)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:602)
    at org.apache.catalina.startup.Bootstrap.start(Bootst rap.java:289)
    at org.apache.catalina.startup.Bootstrap.main(Bootstr ap.java:414)
    Caused by: java.io.NotSerializableException: org.opensaml.saml2.core.impl.NameIDImpl
    at java.io.ObjectOutputStream.writeObject0(ObjectOutp utStream.java:1189)
    at java.io.ObjectOutputStream.defaultWriteFields(Obje ctOutputStream.java:1537)
    at java.io.ObjectOutputStream.writeSerialData(ObjectO utputStream.java:1502)
    at java.io.ObjectOutputStream.writeOrdinaryObject(Obj ectOutputStream.java:1425)
    at java.io.ObjectOutputStream.writeObject0(ObjectOutp utStream.java:1183)
    at java.io.ObjectOutputStream.defaultWriteFields(Obje ctOutputStream.java:1537)
    at java.io.ObjectOutputStream.writeSerialData(ObjectO utputStream.java:1502)
    at java.io.ObjectOutputStream.writeOrdinaryObject(Obj ectOutputStream.java:1425)
    at java.io.ObjectOutputStream.writeObject0(ObjectOutp utStream.java:1183)
    at java.io.ObjectOutputStream.writeObject(ObjectOutpu tStream.java:352)
    at org.apache.catalina.session.StandardSession.writeO bject(StandardSession.java:1546)
    at org.apache.catalina.session.StandardSession.writeO bjectData(StandardSession.java:989)
    at org.apache.catalina.session.StandardManager.doUnlo ad(StandardManager.java:517)
    at org.apache.catalina.session.StandardManager.unload (StandardManager.java:463)
    at org.apache.catalina.session.StandardManager.stop(S tandardManager.java:667)
    at org.apache.catalina.core.StandardContext.stop(Stan dardContext.java:4611)
    at org.apache.catalina.core.ContainerBase.removeChild (ContainerBase.java:924)
    at org.apache.catalina.startup.HostConfig.undeployApp s(HostConfig.java:1319)
    at org.apache.catalina.startup.HostConfig.stop(HostCo nfig.java:1290)
    at org.apache.catalina.startup.HostConfig.lifecycleEv ent(HostConfig.java:323)
    at org.apache.catalina.util.LifecycleSupport.fireLife cycleEvent(LifecycleSupport.java:119)
    at org.apache.catalina.core.ContainerBase.stop(Contai nerBase.java:1086)
    at org.apache.catalina.core.ContainerBase.stop(Contai nerBase.java:1098)
    at org.apache.catalina.core.StandardEngine.stop(Stand ardEngine.java:448)
    at org.apache.catalina.core.StandardService.stop(Stan dardService.java:584)
    at org.apache.catalina.core.StandardServer.stop(Stand ardServer.java:744)
    at org.apache.catalina.startup.Catalina.stop(Catalina .java:643)
    at org.apache.catalina.startup.Catalina.start(Catalin a.java:618)


    patch

  • #2
    Hi,

    Setting property forcePrincipalAsString to true in the SAMLAuthenticationProvider will solve the issue. It will tell system to store a String as a principal inside the SAMLAuthentication object instead of the NameID from the SAML assertion.

    Vladi

    Comment

    Working...
    X