org.springframework.aop.framework.ProxyFactory

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • 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}
    via by Michał Politowski,
  • 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}
    via by 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) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1351)
    No Bugmate found.