org.springframework.aop.framework.ProxyFactory: 0 interfaces []; 2 advisors [org.springframework.aop.interceptor.ExposeInvocationInterceptor.ADVISOR, InstantiationModelAwarePointcutAdvisor: expression [@annotation(org.springframework.issues.AdivseMe) && this(c)]; advice method [public void org.springframework.issues.ComponentAspect.doSomething(org.springframework.issues.ScopedComponent)]; perClauseKind=SINGLETON]; targetSource [SingletonTargetSource for target object [org.springframework.issues.ScopedComponent@101d01]]; proxyTargetClass=false; optimize=false; opaque=false; exposeProxy=false; frozen=false) - field (class "org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor", name: "advised", type: "class org.springframework.aop.framework.AdvisedSupport") - object (class "org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor", org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor@178feba) - field (class "org.springframework.issues.ScopedComponent$$EnhancerByCGLIB$$b0bb4729", name: "CGLIB$CALLBACK_0", type: "interface org.springframework.cglib.proxy.MethodInterceptor") - root object (class "org.springframework.issues.ScopedComponent$$EnhancerByCGLIB$$b0bb4729", org.springframework.issues.ScopedComponent@101d01)

Spring JIRA | Michał Politowski | 3 years ago
  1. 0

    In a webapp run under Tomcat there is a session-scoped bean which is also the target of advice. When Tomcat is being shut down it logs a warning (logged from a reproduction project, with -Dsun.io.serialization.extendedDebugInfo=true): {noformat} 09-Oct-2013 12:33:01 org.apache.catalina.session.StandardSession writeObject WARNING: Cannot serialize session attribute scopedTarget.component for session 2FC40E979D1454DB9B01A288CF06C56F java.io.NotSerializableException: org.springframework.aop.aspectj.annotation.InstantiationModelAwarePointcutAdvisorImpl - element of array (index: 1) - array (class "[Lorg.springframework.aop.Advisor;", size: 2) - field (class "org.springframework.aop.framework.AdvisedSupport", name: "advisorArray", type: "class [Lorg.springframework.aop.Advisor;") - object (class "org.springframework.aop.framework.ProxyFactory", org.springframework.aop.framework.ProxyFactory: 0 interfaces []; 2 advisors [org.springframework.aop.interceptor.ExposeInvocationInterceptor.ADVISOR, InstantiationModelAwarePointcutAdvisor: expression [@annotation(org.springframework.issues.AdivseMe) && this(c)]; advice method [public void org.springframework.issues.ComponentAspect.doSomething(org.springframework.issues.ScopedComponent)]; perClauseKind=SINGLETON]; targetSource [SingletonTargetSource for target object [org.springframework.issues.ScopedComponent@101d01]]; proxyTargetClass=false; optimize=false; opaque=false; exposeProxy=false; frozen=false) - field (class "org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor", name: "advised", type: "class org.springframework.aop.framework.AdvisedSupport") - object (class "org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor", org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor@178feba) - field (class "org.springframework.issues.ScopedComponent$$EnhancerByCGLIB$$b0bb4729", name: "CGLIB$CALLBACK_0", type: "interface org.springframework.cglib.proxy.MethodInterceptor") - root object (class "org.springframework.issues.ScopedComponent$$EnhancerByCGLIB$$b0bb4729", org.springframework.issues.ScopedComponent@101d01) {noformat} and, what's worse, when starting again sesion deserialization fails for the same reason: {noformat} SEVERE: Exception loading sessions from persistent storage java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: org.springframework.aop.aspectj.annotation.InstantiationModelAwarePointcutAdvisorImpl - element of array (index: 1) - array (class "[Lorg.springframework.aop.Advisor;", size: 2) - field (class "org.springframework.aop.framework.AdvisedSupport", name: "advisorArray", type: "class [Lorg.springframework.aop.Advisor;") - object (class "org.springframework.aop.framework.ProxyFactory", org.springframework.aop.framework.ProxyFactory: 0 interfaces []; 2 advisors [org.springframework.aop.interceptor.ExposeInvocationInterceptor.ADVISOR, InstantiationModelAwarePointcutAdvisor: expression [@annotation(org.springframework.issues.AdivseMe) && this(c)]; advice method [public void org.springframework.issues.ComponentAspect.doSomething(org.springframework.issues.ScopedComponent)]; perClauseKind=SINGLETON]; targetSource [SingletonTargetSource for target object [org.springframework.issues.ScopedComponent@101d01]]; proxyTargetClass=false; optimize=false; opaque=false; exposeProxy=false; frozen=false) - field (class "org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor", name: "advised", type: "class org.springframework.aop.framework.AdvisedSupport") - object (class "org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor", org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor@178feba) - field (class "org.springframework.issues.ScopedComponent$$EnhancerByCGLIB$$b0bb4729", name: "CGLIB$CALLBACK_0", type: "interface org.springframework.cglib.proxy.MethodInterceptor") - root object (class "org.springframework.issues.ScopedComponent$$EnhancerByCGLIB$$b0bb4729", org.springframework.issues.ScopedComponent@101d01) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1351) {noformat}

    Spring JIRA | 3 years ago | Michał Politowski
    org.springframework.aop.framework.ProxyFactory: 0 interfaces []; 2 advisors [org.springframework.aop.interceptor.ExposeInvocationInterceptor.ADVISOR, InstantiationModelAwarePointcutAdvisor: expression [@annotation(org.springframework.issues.AdivseMe) && this(c)]; advice method [public void org.springframework.issues.ComponentAspect.doSomething(org.springframework.issues.ScopedComponent)]; perClauseKind=SINGLETON]; targetSource [SingletonTargetSource for target object [org.springframework.issues.ScopedComponent@101d01]]; proxyTargetClass=false; optimize=false; opaque=false; exposeProxy=false; frozen=false) - field (class "org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor", name: "advised", type: "class org.springframework.aop.framework.AdvisedSupport") - object (class "org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor", org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor@178feba) - field (class "org.springframework.issues.ScopedComponent$$EnhancerByCGLIB$$b0bb4729", name: "CGLIB$CALLBACK_0", type: "interface org.springframework.cglib.proxy.MethodInterceptor") - root object (class "org.springframework.issues.ScopedComponent$$EnhancerByCGLIB$$b0bb4729", org.springframework.issues.ScopedComponent@101d01)
  2. 0

    In a webapp run under Tomcat there is a session-scoped bean which is also the target of advice. When Tomcat is being shut down it logs a warning (logged from a reproduction project, with -Dsun.io.serialization.extendedDebugInfo=true): {noformat} 09-Oct-2013 12:33:01 org.apache.catalina.session.StandardSession writeObject WARNING: Cannot serialize session attribute scopedTarget.component for session 2FC40E979D1454DB9B01A288CF06C56F java.io.NotSerializableException: org.springframework.aop.aspectj.annotation.InstantiationModelAwarePointcutAdvisorImpl - element of array (index: 1) - array (class "[Lorg.springframework.aop.Advisor;", size: 2) - field (class "org.springframework.aop.framework.AdvisedSupport", name: "advisorArray", type: "class [Lorg.springframework.aop.Advisor;") - object (class "org.springframework.aop.framework.ProxyFactory", org.springframework.aop.framework.ProxyFactory: 0 interfaces []; 2 advisors [org.springframework.aop.interceptor.ExposeInvocationInterceptor.ADVISOR, InstantiationModelAwarePointcutAdvisor: expression [@annotation(org.springframework.issues.AdivseMe) && this(c)]; advice method [public void org.springframework.issues.ComponentAspect.doSomething(org.springframework.issues.ScopedComponent)]; perClauseKind=SINGLETON]; targetSource [SingletonTargetSource for target object [org.springframework.issues.ScopedComponent@101d01]]; proxyTargetClass=false; optimize=false; opaque=false; exposeProxy=false; frozen=false) - field (class "org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor", name: "advised", type: "class org.springframework.aop.framework.AdvisedSupport") - object (class "org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor", org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor@178feba) - field (class "org.springframework.issues.ScopedComponent$$EnhancerByCGLIB$$b0bb4729", name: "CGLIB$CALLBACK_0", type: "interface org.springframework.cglib.proxy.MethodInterceptor") - root object (class "org.springframework.issues.ScopedComponent$$EnhancerByCGLIB$$b0bb4729", org.springframework.issues.ScopedComponent@101d01) {noformat} and, what's worse, when starting again sesion deserialization fails for the same reason: {noformat} SEVERE: Exception loading sessions from persistent storage java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: org.springframework.aop.aspectj.annotation.InstantiationModelAwarePointcutAdvisorImpl - element of array (index: 1) - array (class "[Lorg.springframework.aop.Advisor;", size: 2) - field (class "org.springframework.aop.framework.AdvisedSupport", name: "advisorArray", type: "class [Lorg.springframework.aop.Advisor;") - object (class "org.springframework.aop.framework.ProxyFactory", org.springframework.aop.framework.ProxyFactory: 0 interfaces []; 2 advisors [org.springframework.aop.interceptor.ExposeInvocationInterceptor.ADVISOR, InstantiationModelAwarePointcutAdvisor: expression [@annotation(org.springframework.issues.AdivseMe) && this(c)]; advice method [public void org.springframework.issues.ComponentAspect.doSomething(org.springframework.issues.ScopedComponent)]; perClauseKind=SINGLETON]; targetSource [SingletonTargetSource for target object [org.springframework.issues.ScopedComponent@101d01]]; proxyTargetClass=false; optimize=false; opaque=false; exposeProxy=false; frozen=false) - field (class "org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor", name: "advised", type: "class org.springframework.aop.framework.AdvisedSupport") - object (class "org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor", org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor@178feba) - field (class "org.springframework.issues.ScopedComponent$$EnhancerByCGLIB$$b0bb4729", name: "CGLIB$CALLBACK_0", type: "interface org.springframework.cglib.proxy.MethodInterceptor") - root object (class "org.springframework.issues.ScopedComponent$$EnhancerByCGLIB$$b0bb4729", org.springframework.issues.ScopedComponent@101d01) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1351) {noformat}

    Spring JIRA | 3 years ago | Michał Politowski
    org.springframework.aop.framework.ProxyFactory: 0 interfaces []; 2 advisors [org.springframework.aop.interceptor.ExposeInvocationInterceptor.ADVISOR, InstantiationModelAwarePointcutAdvisor: expression [@annotation(org.springframework.issues.AdivseMe) && this(c)]; advice method [public void org.springframework.issues.ComponentAspect.doSomething(org.springframework.issues.ScopedComponent)]; perClauseKind=SINGLETON]; targetSource [SingletonTargetSource for target object [org.springframework.issues.ScopedComponent@101d01]]; proxyTargetClass=false; optimize=false; opaque=false; exposeProxy=false; frozen=false) - field (class "org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor", name: "advised", type: "class org.springframework.aop.framework.AdvisedSupport") - object (class "org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor", org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor@178feba) - field (class "org.springframework.issues.ScopedComponent$$EnhancerByCGLIB$$b0bb4729", name: "CGLIB$CALLBACK_0", type: "interface org.springframework.cglib.proxy.MethodInterceptor") - root object (class "org.springframework.issues.ScopedComponent$$EnhancerByCGLIB$$b0bb4729", org.springframework.issues.ScopedComponent@101d01)

    Root Cause Analysis

    1. org.springframework.aop.framework.ProxyFactory

      0 interfaces []; 2 advisors [org.springframework.aop.interceptor.ExposeInvocationInterceptor.ADVISOR, InstantiationModelAwarePointcutAdvisor: expression [@annotation(org.springframework.issues.AdivseMe) && this(c)]; advice method [public void org.springframework.issues.ComponentAspect.doSomething(org.springframework.issues.ScopedComponent)]; perClauseKind=SINGLETON]; targetSource [SingletonTargetSource for target object [org.springframework.issues.ScopedComponent@101d01]]; proxyTargetClass=false; optimize=false; opaque=false; exposeProxy=false; frozen=false) - field (class "org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor", name: "advised", type: "class org.springframework.aop.framework.AdvisedSupport") - object (class "org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor", org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor@178feba) - field (class "org.springframework.issues.ScopedComponent$$EnhancerByCGLIB$$b0bb4729", name: "CGLIB$CALLBACK_0", type: "interface org.springframework.cglib.proxy.MethodInterceptor") - root object (class "org.springframework.issues.ScopedComponent$$EnhancerByCGLIB$$b0bb4729", org.springframework.issues.ScopedComponent@101d01)

      at java.io.ObjectInputStream.readObject0()
    2. Java RT
      ObjectInputStream.readObject0
      1. java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1351)
      1 frame