java.io.NotSerializableException: org.springframework.aop.aspectj.annotation.InstantiationModelAwarePointcutAdvisorImpl

Spring JIRA | Boris Romashov | 4 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Here is my controller (it is Serializable). {code} @Scope (WebApplicationContext.SCOPE_SESSION) @Controller public class Some implements Serializable { @RequestMapping ("/go") @ResponseBody public String go() { return "!!!"; } @PostConstruct public void init() { System.out.println("Some.init"); } @PreDestroy public void beforeDestroy() { System.out.println("Some.beforeDestroy"); } } {code} When I stop a server I see the following stacktrace. {noformat} 02.10.2012 19:32:02 org.apache.catalina.session.StandardSession writeObject WARNING: Cannot serialize session attribute some for session 0DBD895D2086D2E121AD199A63D33DF2 java.io.NotSerializableException: org.springframework.aop.aspectj.annotation.InstantiationModelAwarePointcutAdvisorImpl at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1156) at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1146) at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509) at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150) at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509) at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150) at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509) at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326) at org.apache.catalina.session.StandardSession.writeObject(StandardSession.java:1585) at org.apache.catalina.session.StandardSession.writeObjectData(StandardSession.java:1015) at org.apache.catalina.session.StandardManager.doUnload(StandardManager.java:528) at org.apache.catalina.session.StandardManager.unload(StandardManager.java:469) at org.apache.catalina.session.StandardManager.stop(StandardManager.java:678) at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4882) at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:936) at org.apache.catalina.startup.HostConfig.undeployApps(HostConfig.java:1359) at org.apache.catalina.startup.HostConfig.stop(HostConfig.java:1330) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:326) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142) at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1098) at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1110) at org.apache.catalina.core.StandardEngine.stop(StandardEngine.java:468) at org.apache.catalina.core.StandardService.stop(StandardService.java:604) at org.apache.catalina.core.StandardServer.stop(StandardServer.java:788) at org.apache.catalina.startup.Catalina.stop(Catalina.java:662) at org.apache.catalina.startup.Catalina.start(Catalina.java:629) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414) {noformat}

    Spring JIRA | 4 years ago | Boris Romashov
    java.io.NotSerializableException: org.springframework.aop.aspectj.annotation.InstantiationModelAwarePointcutAdvisorImpl
  2. 0

    Here is my controller (it is Serializable). {code} @Scope (WebApplicationContext.SCOPE_SESSION) @Controller public class Some implements Serializable { @RequestMapping ("/go") @ResponseBody public String go() { return "!!!"; } @PostConstruct public void init() { System.out.println("Some.init"); } @PreDestroy public void beforeDestroy() { System.out.println("Some.beforeDestroy"); } } {code} When I stop a server I see the following stacktrace. {noformat} 02.10.2012 19:32:02 org.apache.catalina.session.StandardSession writeObject WARNING: Cannot serialize session attribute some for session 0DBD895D2086D2E121AD199A63D33DF2 java.io.NotSerializableException: org.springframework.aop.aspectj.annotation.InstantiationModelAwarePointcutAdvisorImpl at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1156) at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1146) at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509) at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150) at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509) at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150) at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509) at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326) at org.apache.catalina.session.StandardSession.writeObject(StandardSession.java:1585) at org.apache.catalina.session.StandardSession.writeObjectData(StandardSession.java:1015) at org.apache.catalina.session.StandardManager.doUnload(StandardManager.java:528) at org.apache.catalina.session.StandardManager.unload(StandardManager.java:469) at org.apache.catalina.session.StandardManager.stop(StandardManager.java:678) at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4882) at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:936) at org.apache.catalina.startup.HostConfig.undeployApps(HostConfig.java:1359) at org.apache.catalina.startup.HostConfig.stop(HostConfig.java:1330) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:326) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142) at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1098) at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1110) at org.apache.catalina.core.StandardEngine.stop(StandardEngine.java:468) at org.apache.catalina.core.StandardService.stop(StandardService.java:604) at org.apache.catalina.core.StandardServer.stop(StandardServer.java:788) at org.apache.catalina.startup.Catalina.stop(Catalina.java:662) at org.apache.catalina.startup.Catalina.start(Catalina.java:629) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414) {noformat}

    Spring JIRA | 4 years ago | Boris Romashov
    java.io.NotSerializableException: org.springframework.aop.aspectj.annotation.InstantiationModelAwarePointcutAdvisorImpl
  3. 0

    Problema com o Spring no Vraptor

    Google Groups | 6 years ago | Márcio Silva
    java.io.NotSerializableException: net.ledes.java.webapp.interceptor.UserInfo
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    on getting a barebones webapp running

    Google Groups | 9 years ago | Robert Koberg
    java.io.NotSerializableException: scala.PartialFunction$$anon$1
  6. 0

    Unable to compile class for JSP | Oracle Community

    oracle.com | 1 year ago
    java.io.NotSerializableException: uk.gov.sefton.scr.bom.Category

  1. batwalrus76 14 times, last 2 weeks ago
  2. treefolk 12 times, last 3 weeks ago
  3. Hronom 1 times, last 1 month ago
  4. kjhdofjosvs 1 times, last 3 months ago
  5. filpgame 4 times, last 3 months ago
13 more registered users
50 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.io.NotSerializableException

    org.springframework.aop.aspectj.annotation.InstantiationModelAwarePointcutAdvisorImpl

    at java.io.ObjectOutputStream.writeObject0()
  2. Java RT
    ObjectOutputStream.writeObject
    1. java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1156)
    2. java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338)
    3. java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1146)
    4. java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)
    5. java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474)
    6. java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
    7. java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
    8. java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)
    9. java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474)
    10. java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
    11. java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
    12. java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)
    13. java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474)
    14. java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
    15. java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
    16. java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
    16 frames
  3. Glassfish Core
    Catalina.start
    1. org.apache.catalina.session.StandardSession.writeObject(StandardSession.java:1585)
    2. org.apache.catalina.session.StandardSession.writeObjectData(StandardSession.java:1015)
    3. org.apache.catalina.session.StandardManager.doUnload(StandardManager.java:528)
    4. org.apache.catalina.session.StandardManager.unload(StandardManager.java:469)
    5. org.apache.catalina.session.StandardManager.stop(StandardManager.java:678)
    6. org.apache.catalina.core.StandardContext.stop(StandardContext.java:4882)
    7. org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:936)
    8. org.apache.catalina.startup.HostConfig.undeployApps(HostConfig.java:1359)
    9. org.apache.catalina.startup.HostConfig.stop(HostConfig.java:1330)
    10. org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:326)
    11. org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
    12. org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1098)
    13. org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1110)
    14. org.apache.catalina.core.StandardEngine.stop(StandardEngine.java:468)
    15. org.apache.catalina.core.StandardService.stop(StandardService.java:604)
    16. org.apache.catalina.core.StandardServer.stop(StandardServer.java:788)
    17. org.apache.catalina.startup.Catalina.stop(Catalina.java:662)
    18. org.apache.catalina.startup.Catalina.start(Catalina.java:629)
    18 frames
  4. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    4. java.lang.reflect.Method.invoke(Method.java:597)
    4 frames
  5. Glassfish Core
    Bootstrap.main
    1. org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
    2. org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
    2 frames